Write the sum of real roots of the equation x2 + |x| – 6 = 0.

First of all, the equation is x2 + |x| − 6 = 0

CASE 1: x>0 then |x| = x


x2 + x− 6 = 0


x2 + 3x – 2x – 6 = 0


(x + 3)(x−2) = 0


x = 2, – 3


CASE 2: x<0 |x| = – x


x2−x−6 = 0


x2 − 3x + 2x−6 = 0


(x−3)(x + 2) = 0


x = −2, 3


So the sum of the roots is 2 + (– 3) + (– 2) + 3


= 0


5