Solutions for $|x^2-5x+2|=4$ Problem: 

Find all values of $x$ such that $|x^2-5x+2|=4$

The only way I can see to solve this would be to square both sides of the equation so as to eliminate the modulus sign. However, that could lead to very messy equations to deal with if the expression inside the modulus sign is more complicated. Is there a neater way to solve such questions? Many thanks in advance for your response!
 A: When you have an equation with a modulus, it's often useful to just consider the two separate cases. Let's first suppose what's inside the modulus is positive, and so the equation is:
$$x^2-5x-2=0$$
this has solutions $x=\frac{5\pm\sqrt{25+8}}{2}=\frac{5\pm\sqrt{33}}{2}$.
Now, let's suppose what's inside the modulus is negative. Then the equation reduces to
$$-x^2+5x-6=0$$
for which you can calculate the solutions.
Now, as the last step, you have to make sure that the solutions work. That is, for the positive modulus solutions, you have to check that $x^2-5x+2$ is actually a positive number, and for the negative modulus ones you have to check that's a negative number.
I leave that to you.
Regards.
A: In this case, it's much easier to just eliminate the modulus. The left side is a quadratic, but the side that will be affected by eliminating the modulus is actually the right side, which is just a constant. Therefore it's actually relatively easy to solve the two equations $x^2-5x+2=4$ and $x^2-5x+2=-4$ via Quadratic Equation.
