We have ∣∣x2−x−6∣∣=x+2...(i)
or ∣(x−3)(x+2)∣=x+2
Case I: When −2≤x or x≥3
From Eq. (i) x2−x−6=x+2 ⇒x2−2x−8=0 ⇒(x−4)(x+2)=0 ⇒x=−2,4
Case II : When −2<x<3
From Eq. (i) −(x2−x−6)=x+2 ⇒−x2+x+6=x+2 ⇒−x2=−4 ⇒x=±2 ⇒x=2(∵x=−2 not lies in the interval)
Hence, the roots are {−2,2,4} Alternate Solution :
Case I : When −2≤x or x≥3
Let y=x2−x−6=x+2
Now, y=x2−x−6 (x2−x+41)=y+6+41 (x−21)2=y+425
and y=x+2 ⇒2y−2x=1
Case II : When −2<x<3
Let y=−(x2−x−6)=x+2
Now, y=−(x2−x−6) −(x2−x+41)=y−6−41 (x−21)2=−(y−425)
and y=x+2
It is clear from the above two figures that the curve will intersect the line in three different noints ie {−2,2,4}.