Series expansion of $\arctan$ at arbitrary real point I'm looking for a closed form for the coefficients of the series expansion of $\arctan(x)$ at some real $x_0$. If $x_0 = 0$, the expansion is of course the well-known
$$\sum_{n\geq 0} \frac{(-1)^n z^{2n+1}}{2n+1}\ .$$
In general, due to analyticity, the expansion is
$$\sum_{n\geq 0} \arctan^{(n)}(x_0) \cdot (x - x_0)^n = \\\arctan(x_0) + \sum_{n\geq 0}\left(\frac{d^n}{dx^n}\frac{1}{1+x^2}\right)_{\!|\, x=x_0}\! \cdot (x - x_0)^{n+1}$$
but I'm struggling to find a closed form for these coefficients
$$\left(\frac{d^n}{dx^n}\frac{1}{1+x^2}\right)_{\!|\, x=x_0}$$
In fact, I don't necessarily need a closed form as such; a recursive formula would also be all right.
UPDATE: Mathematica says the $n$-th coefficient in the series expansion of $\arctan(x)$ at $x = x_0$ is:
$$\frac{-i}{2}\left((-i-x_0)^{-(n+1)} - (i-x_0)^{-(n+1)}\right)$$
One can probably derive this using a partial fraction expansion like Daniel Fischer suggested in his comment and then the geometric series. But I'm struggling to simplify this result to a ‘purely real’ formula.
UPDATE: After some rewriting, I found the following formula:
$$\arctan(x) = \arctan(0) + \sum_{n=1}^\infty \frac{\sin(n\arg(i-x_0))}{n(x_0^2+1)^{\frac{n}{2}}} (x - x_0)^n$$
I guess one can simplify the $\arg(i-x_0)$ using $\arctan$. Not sure if the result is the easiest form one can get though.
 A: For $n\in\mathbb{N}$, the $n$th derivative of $\arctan z$ is
\begin{equation*}
(\arctan z)^{(n)}
=\frac{(n-1)!}{(2z)^{n-1}}\sum_{k=0}^{n-1}(-1)^k\binom{k}{n-k-1}\frac{(2z)^{2k}}{(1+z^2)^{k+1}}.
\end{equation*}
Using this result, one can write out Taylor's series expansion of arctan at arbitrary real point. This result can be found in the following paper:

*

*Feng Qi and Mark Daniel Ward, Closed-form formulas and properties of coefficients in Maclaurin's series expansion of Wilf's function, arXiv (2021), available online at https://arxiv.org/abs/2110.08576v1.

A: As shown in the updates of my question, I did find some rather ugly closed-form solutions for the coefficients, but I wasn't very happy with them.
I then realised that, given the partial fraction decomposition pointed out by Daniel Fischer, I could simply find a linear recurrence equation for them:
$$\arctan(x) = \arctan(x_0) + \sum_{n\geq 1} \frac{b_n}{n}(x-x_0)^n$$
$$\quad\text{where}\quad b_n = \begin{cases} 0 & \text{if}\ n = 0\\ \frac{1}{1+x_0^2} & \text{if}\ n = 1\\ -\frac{1}{1+x_0^2}\left(2x_0 b_{n-1} + b_{n-2}\right) & \text{otherwise}\end{cases}$$
That's pretty much exactly what I wanted – purely real and easy to compute. Thanks for all the suggestions!
