<s>[INST] differentiate arctan (maclaurin?) I have this assignment: 
Differentiate this expression:
$$ f(x) =\arctan \frac{x-1}{x+1} $$
There is also known that $-1 < x$ (Why is that important?). I do not know how to solve this problem... By using Maclaurin I can come up with this:
$$ f(x) = \arctan (g(x)) $$ 
$$ g(x) = \frac{x-1}{x+1} $$
$$ \arctan g(x) = g(x) - \frac{g(x)^3}{3} + \frac{g(x)^5}{5} + O(g(x)^7) $$ 
I am confused by the inner function g(x) when using Maclaurin, should I just differentiate g(x) or should I not do that?
 [/INST] The stating of $x \gt -1$ merely defines a valid domain for inner function so that differentiation is possible, since at $x=1$ we would have a singularity.
Differentiate $f(x)$ using the chain rule, where $$f'(z)=(\tan^{-1} (z))'=\frac{1}{1+z^2}.$$
Thus, if $g(x) = \frac {x-1}{x+1}$, we have by the chain rule: $$\begin{equation}\begin{split}\left[f(g(x))\right]'=f'(g(x))\cdot g'(x)&=\left(\tan^{-1} \left(\frac {x-1}{x+1}\right)\right)'\\ & =\frac{1}{1+\left(\frac {x-1}{x+1}\right)^2}\cdot\left(\frac {x-1}{x+1}\right)'\\& =\frac{1}{1+\frac {\left(x-1\right)^2}{\left(x+1\right)^2}}\cdot\frac {2}{\left(x+1\right)^2}\\&=\frac{2}{\left(x+1\right)^2+\left(x-1\right)^2}\\&=\frac{2}{2x^2+2}=\frac{1}{1+x^2}\end{split}\end{equation}$$
</s>