To solve the equation \( x^2 = -x + 2 \), you can first rearrange it into standard quadratic form. Start by adding \( x \) and subtracting 2 from both sides:
\[ x^2 + x - 2 = 0 \]
Now, you can factor the quadratic equation. We need two numbers that multiply to \(-2\) (the constant term) and add up to \(1\) (the coefficient of \(x\)). Those numbers are \(2\) and \(-1\).
So, we can factor the equation as:
\[ (x + 2)(x - 1) = 0 \]
Now we can set each factor to zero:
\( x + 2 = 0 \)
- \( x = -2 \)
\( x - 1 = 0 \)
- \( x = 1 \)
Thus, the solutions to the equation \( x^2 = -x + 2 \) are:
\[ x = -2 \quad \text{and} \quad x = 1 \]