$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.
 A: In some old notes I had lying around I had the formula
$$\frac{d^n}{dx^n}(\tan^{-1}(x))=\frac{(-1)^{n-1}(n-1)!}{(1+x^2)^{n/2}}\sin\left(n\sin^{-1}\left(\frac{1}{\sqrt{1+x^2}}\right)\right).$$
Note that this is not my own formula, and I noted that I sourced it from here which goes into the $n$th derivative of $f(x)=\tan^{-1}(x)$ in great detail.
A: Since:
$$\frac{d}{dx}\,\arctan x=\frac{1}{1+x^2} = \frac{1}{2i}\left(\frac{1}{x-i}-\frac{1}{x+i}\right)\tag{1}$$
it is enough to differentiate the RHS of $(1)$ $n-1$ times to have:
$$\frac{d^n}{dx^n}\,\arctan x = (-1)^{n-1}\frac{(n-1)!}{2i}\left(\frac{1}{(x-i)^n}-\frac{1}{(x+i)^n}\right).\tag{2}$$
The conclusion of user17762 also follows.
A: let $y = \tan^{-1}(x).$  then $$y' = \frac 1{1+x^2} = 1 - x^2 + x^4 - x^6 + \cdots$$  then $$y^{(2n+1)}(0)=(-1)^n\frac1{(2n)!},\quad y^{(2n)}(0) = 0. $$
$\bf edit:$
in the general case, we need to do more work. taking the derivative once more we get $$y'' = \frac{2x}{(1+x^2)^2}=2x(y')^2$$ that is $$v' = 2xv^2, v = y' \tag 1$$ we can differentiate $(1)$ repeatedly to get $$v'' = 2v^2 + 4xvv'=2v^2 + 8x^2v^3 \tag 2$$
$$v''' = 4vv'+16xv^3+24x^2v^2v'=24xv^3+48x^3v^4\tag 3$$ you can continue this.
A: 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)$$
