Why are these 2 algebraic expressions equivalent? I just solved a long problem for my physics w/calculus homework that required a simplification using a quadratic formula. The "textbook" (flipItPhysics) came up with a different simplification than mine but it turns out they are equivalent. I can't, for the life of me, figure out how to simplify mine into theirs.
Mine:
$$
x = \frac{d\left(q\pm\sqrt{Qq}\right)}{q - Q}
$$
Theirs:
$$
x = d \cdot \left(\frac{q}{q- Q}\right)  \left(1 \pm\sqrt{\frac{Q}{q}}\right)
$$
Can someone show me how to get from mine to theirs? I'm specifically confused about how to make the inside of the square root a division instead of a multiplication.
 A: It’s a little easier to go the other way: assuming that $q>0$, we have
$$q\sqrt{\frac{Q}q}=\sqrt{q^2}\cdot\sqrt{\frac{Q}q}=\sqrt{q^2\cdot\frac{Q}q}=\sqrt{qQ}\;.$$
If $q<0$, $q=-\sqrt{q^2}$, so you get $-\sqrt{qQ}$; since you have a $\pm$ sign, it doesn’t matter: as long as $q\ne 0$, you get both signs.
A: Notice that both expressions have a factor of $d$ (you have it in the numerator, and the textbook has it as the first factor), and both expressions have a factor of $q-Q$ in the denominator.  So let's ignore those and compare what's left.  We need to show that
$$q \pm \sqrt{Qq}$$
and
$$q \cdot \left(1 \pm \sqrt{\frac{Q}{q}} \right)$$
are equal.
It should be obvious that if you distribute the $q$ in the second expression through the parentheses, you end up with the $q$ in the first term of the first expression.  Really, then, the only things we have to compare are $\sqrt{Qq}$ and $q\sqrt{\frac{Q}{q}}$.  They both contain a factor of $\sqrt{Q}$, so let's ignore that.  The only real mystery is, why is $\sqrt{q}$ equal to $q\sqrt{\frac{1}{q}}$?
This turns out to be one of those properties that's really simple to understand once you see it a few times, but for some reason it is rarely taught in high school.  It comes down to the fact that $$q\sqrt{\frac{1}{q}}=\frac{q}{\sqrt{q}}=\frac{\sqrt{q}\sqrt{q}}{\sqrt{q}}=\sqrt{q}$$
I think the real question here is why the textbook writes the answer in what is (in my opinion at least) less simplified than the form of the answer you came up with.
