<s>[INST] Determine the derivative of $\arctan$ function Find $f'(x)$ for the function:
$f(x)= \arctan(\frac{a+x}{1-ax}))$ , $a\in R$
So this is what I've done:
$f(x) = \arctan x$
$f'(x) = \frac{1}{1+x^2}$
$x= \frac{a+x}{1-ax}$
$f'(x) =  \frac{1}{1+\frac{(a+x)^2}{(1-ax)^2}}$
$f'(x) = \frac{(1-ax)^2}{(1-ax)^2+(a+x)^2}$
Is this correct?
 [/INST] you must use the chain rule: $${1 \left(  \left( -ax+1 \right) ^{-1}+{\frac { \left( a+x \right) a}{
 \left( -ax+1 \right) ^{2}}} \right)  \left( {\frac { \left( a+x
 \right) ^{2}}{ \left( -ax+1 \right) ^{2}}}+1 \right) ^{-1}}
$$
simplified to
$$\frac{1}{1+x^2}$$
</s>