<s>[INST] $\frac{(x-a)^2}{(x-2a)^2}=\left\lvert{ {\frac{x-a}{x-2a}} }\right\rvert$ leading to contradictory solutions I have the following equation
$$\frac{(x-a)^2}{(x-2a)^2}=\left\lvert{ {\frac{x-a}{x-2a}} }\right\rvert$$
And to find the critical values for the absolute value function I carried out polynomial long division and ended up with
$$1+ \frac{a}{x-2a}, x>2a$$
$$-(1+ \frac{a}{x-2a}), x<2a$$
I first attempted to solve this using the original form of both equations
For the case where $x>2a$:
$$\frac{(x-a)^2}{(x-2a)^2} =\frac{x-a}{x-2a} $$
$$\frac{x-a}{x-2a} =1$$
$$x-a=x-2a$$
However this lead me to the answer
$$-a=-2a$$
Which is self contradictory, I am extremely confused on where I messed up, have I made a problem cross multiplying or is it something else?
 [/INST] If $$\frac{(x-a)^2}{(x-2a)^2}=\left|\frac{x-a}{x-2a} \right|$$
Let's $r = \left|\frac{x-a}{x-2a} \right|$.
This just says that $r^2=r$, hence $r=0$ or $r=1$.
If $r=0$, we have $x=a$.
Otherwise, $|x-a|=|x-2a|$, the distance from $a$ is equal to the distance from $2a$, hence $x=\frac{3a}{2}$.

Now, let's examine your solution.
If $x> 2a$, we know that $x -a > a$, it is unclear if $|x-a| = x-a$ isn't it?
In fact, if $x=a$, then you divided by $x-a$, which is $0$.
If $x=\frac32a$ and $\frac32 a > 2a$, then we have $a<0$. $x-a=\frac12a$ which is negative.
</s>