<s>[INST] Help differentating $f(x) = \sqrt\frac{x^2-1}{x^2+1}$ The equation I'm trying to differentiate is, $ f(x) = \sqrt\frac{x^2-1}{x^2+1}$ and I know the answer is meant to be 
$$=\frac{\frac{x\sqrt {x^2+1}}{\sqrt {x^2-1}}-\frac{x\sqrt {x^2-1}}{\sqrt {x^2+1}}}{x^2+1}$$
But when I do the working out I get this
$$=\frac{(x^2-1)^\frac{1}{2}}{(x^2+1)^\frac{1}{2}}$$ 
$$=\frac{\frac{1}{2}(x^2-1)^\frac{-1}{2}\cdot2x\cdot(x^2+1)^\frac{1}{2}-(x^2-1)^\frac{1}{2}\cdot\frac{1}{2}(x^2+1)^\frac{-1}{2}\cdot2x}{x^2+1}$$
simplify 
$$=\frac{x(x^2-1)^\frac{-1}{2}\cdot(x^2+1)^\frac{1}{2}-(x^2-1)^\frac{1}{2}\cdot x(x^2+1)^\frac{-1}{2}}{x^2+1}$$
$$=\frac{\frac{\sqrt {x^2+1}}{x\sqrt {x^2-1}}-\frac{\sqrt {x^2-1}}{x\sqrt {x^2+1}}}{x^2+1}$$
As you can see two of my $x$'s are in the wrong location, and I just can't figure out what I'm doing wrong.  Any help as to what steps I'm doing wrong or missing would be much appreciated.
 [/INST] Going from your second last line to the last line, you put the $x$ factors into the denominator. Instead, you need to leave them in the numerator. This is because the power of $\frac{-1}{2}$ only apply to the expressions in the brackets, but the $x$ factors are outside of the brackets, so they are not affected. Thus, for example, with the first term in the numerator, you have
$$\begin{equation}\begin{aligned}
x(x^2-1)^\frac{-1}{2}\cdot(x^2+1)^\frac{1}{2} & = x\left((x^2-1)^\frac{-1}{2}\cdot(x^2+1)^\frac{1}{2}\right) \\
& = x\left(\frac{\sqrt {x^2+1}}{\sqrt {x^2-1}}\right) \\
& = \frac{x\sqrt {x^2+1}}{\sqrt {x^2-1}}
\end{aligned}\end{equation}\tag{1}\label{eq1}$$
</s>