solve x^2+x-2=0

show step by step

To solve the quadratic equation x^2 + x - 2 = 0, we can use the quadratic formula:

x = (-b ± sqrt(b^2 - 4ac)) / 2a

where a = 1, b = 1, and c = -2.

Plugging these values into the formula, we get:

x = (-1 ± sqrt(1^2 - 4*1*(-2))) / 2*1
x = (-1 ± sqrt(1 + 8)) / 2
x = (-1 ± sqrt(9)) / 2
x = (-1 ± 3) / 2

Now we have two possible solutions for x:

1) x = (-1 + 3) / 2 = 2 / 2 = 1
2) x = (-1 - 3) / 2 = -4 / 2 = -2

Therefore, the solutions to the equation x^2 + x - 2 = 0 are x = 1 and x = -2.