<s>[INST] Doubt regarding validity of answer in a mod equation question 
$$|x^2-2x+2|-|2x^2-5x+2|=|x^2-3x|$$
Find the set of values of $x$.

The answer given is $[0,\frac12]\cup [2,3]$.
What I don't get is how is the solution a range? I'm getting the solution as $0,\frac 12, 2 ,3, \frac 25$. That makes sense to me as the first expression is always positive, $$\because x^2-2x+1+1=(x-1)^2+1> 0$$ and the other two expressions give two cases which on being solved gives 4 solutions in total as it's a quadratic.
$$x^2-2x+2-|(x-2)(2x-1)|-|(x-0)(x-3)|=0$$
Using wavy curve on the two expressions inside mod, we get that they are negative for $x\in (\frac 12,2)$ and $x\in [0,3]$ respectively. So, we can conclude that if the first expression is negative then the second expression is negative too as $[\frac 12,2]$ is in $[0,3]$. So we can get 3 cases:
Both are positive, or both are negative, or the first one is positive and the second one is negative.
Solving for each gives the solutions which I said I've received earlier in the post.
So where is the range coming from? Am I interpreting the mod operator wrong? Or is my book wrong?
 [/INST] As you've mentioned, $|x^2-2x+2| = |(x-1)^2+1|$ is always positive.
So  $|x^2-2x+2| =x^2-2x+2$.
$|2x^2-5x+2| = \begin{cases}2x^2-5x+2 & \text{for } x \in (-\infty,0.5] \cup [2,\infty)\\ -(2x^{2}-5x+2) &\text{for } x \in [0.5,2]\end{cases}$
So,

$|x^2-2x+2| - |2x^2-5x+2| = \begin{cases}-x^2+3x &\text{for } x \in (-\infty,0.5]\cup [2,\infty)\\3x^2-7x+4&\text{for } x \in [0.5,2]\end{cases}$

and,
$|x^2-3x| = \begin{cases}x^2-3x&\text{for } x \in (-\infty,0]\cup [3,\infty) \\ -(x^2-3x) &\text{for } x \in [0,3]\end{cases}$

Now segregating a little bit,
$|x^2-2x+2| - |2x^2-5x+2| = \begin{cases}-x^2+3x &\text{for } x \in (-\infty,0]\cup[0,0.5]\cup [2,3] \cup[3,\infty)\\3x^2-7x+4&\text{for } x \in [0.5,2]\end{cases}$
and,
$|x^2-3x| = \begin{cases}x^2-3x&\text{for } x \in (-\infty,0]\cup [3,\infty) \\ -x^2+3x &\text{for } x \in [0,0.5]\cup[0.5,2]\cup[2,3]\end{cases}$

So, the common range for which, $|x^2-2x+2| - |2x^2-5x+2|=|x^2-3x|$ is $[0,0.5] \cup [2,3]$

</s>