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.

Just a small trick.
When you face expressions which contains products, quotients, powers, logarithmic differentiation makes life easier.
$$y= \sqrt\frac{x^2-1}{x^2+1}\implies \log(y)=\frac 12 \log(x^2-1)-\frac 12 \log(x^2+1)$$ Differentiate both sides
$$\frac {y'} y=\frac 12 \frac {2x}{x^2-1}-\frac 12 \frac {2x}{x^2+1}=\frac{2x}{(x^2-1)(x^2+1)}$$
$$y'=y\times\frac {y'} y=\sqrt\frac{x^2-1}{x^2+1}\times\frac{2x}{(x^2-1)(x^2+1)}$$ and simplify.
