I have always had problems with the algebraic manipulation of square roots. For example, recently I encountered this in a problem I was working on:
$$\sqrt{\left(\dfrac{x-1}{2x}\right)^2 - \dfrac{y}{x}} = \dfrac{1}{2x} \sqrt{(x-1)^2 -4xy}$$
I still don't grasp why this is correct and in general, I have trouble knowing when you can factor out something when dealing with square roots. Can someone enlighten me.
Observe that: $$ \begin{align*} \sqrt{\left(\dfrac{x-1}{2x}\right)^2 - \dfrac{y}{x}} &= \sqrt{\dfrac{(x-1)^2}{(2x)^2} - \dfrac{y}{x} \cdot \dfrac{4x}{4x}} \\ &= \sqrt{\dfrac{(x-1)^2}{(2x)^2} - \dfrac{4xy}{4x^2}} \\ &= \sqrt{\dfrac{(x-1)^2}{(2x)^2} - \dfrac{4xy}{(2x)^2}} \\ &= \sqrt{\dfrac{(x-1)^2-4xy}{(2x)^2}} \\ &= \sqrt{\dfrac{1}{(2x)^2} \cdot \left( (x-1)^2-4xy \right)} \\ &= \sqrt{\left(\dfrac{1}{2x}\right)^2 \left((x-1)^2 -4xy\right)} \\ &= \sqrt{\left(\dfrac{1}{2x}\right)^2}\cdot \sqrt{(x-1)^2 -4xy} \\ &= \dfrac{1}{2x} \sqrt{(x-1)^2 -4xy} \end{align*} $$ assuming that $x>0$.