<s>[INST] $n^\text{th}$ derivative of $\tan^{-1} x$ Find $$\frac{d^n(\tan^{-1}x)}{dx^n}$$
Or find the  $n^\text{th}$ derivative of $\tan^{-1}x$ w.r.t. $x$.
Differentiation 4-5 times did not patternize so as to find out the $n^\text{th}$ derivative. Please help me.
 [/INST] Setting $y=\arctan(x)$, we obtain $x=\tan(y)$. We have
$$\dfrac{dy}{dx} = \dfrac1{dx/dy} = \dfrac1{1+\tan^2(y)} = \dfrac1{1+x^2}$$
Differentiating again, we obtain
$$\dfrac{d^2y}{dx^2} = \dfrac{d}{dx}\left(\dfrac1{1+x^2}\right) = -\dfrac{2x}{(1+x^2)^2}$$
Further, differentiating, we obtain
\begin{align}
\dfrac{d^3y}{dx^3} & = - \dfrac{d}{dx}\left(\dfrac{2x}{(1+x^2)^2}\right) = -\dfrac{2(1+x^2)^2-2x\cdot2(1+x^2)\cdot(2x)}{(1+x^2)^4}\\
& =- \dfrac{2(1+x^2)-8x^2}{(1+x^2)^3} = -2 \cdot \dfrac{1+5x^2}{(1+x^2)^3}
\end{align}
So in general, we have
$$\dfrac{d^ny}{dx^n} = \dfrac{P_{n-1}(x)}{(1+x^2)^n}$$
where $P_n(x)$ is a polynomial of degree $n$. We have
$$\dfrac{d^{n+1}y}{dx^{n+1}} = \dfrac{P'_{n-1}(x)}{(1+x^2)^n} + \left(\dfrac{-2nx}{(1+x^2)^{n+1}}\right)P_{n-1}(x) = \dfrac{(1+x^2)P'_{n-1}(x)-2nxP_{n-1}(x)}{(1+x^2)^{n+1}}$$
Hence, in general,
$$\dfrac{d^ny}{dx^n} = \dfrac{P_{n-1}(x)}{(1+x^2)^n}$$
where $P_n(x)$ is a polynomial of degree $n$ satisfying the recurrence
$$P_n(x) = (1+x^2)P'_{n-1}(x)-2nxP_{n-1}(x)$$
</s>