Taylor series at infinity I'm required to make a Taylor series expansion of a function $f(x) = \arctan(x)$ at $x = +\infty$. In order to do this I introduce new variable $z = \frac{1}{x}$, so that $x \to +\infty$ is the same as $z \to +0$. Thus I can expand $f(z)$ at $z = 0$: $$f(z) = z - \frac{z^3}{3}+\frac{z^5}{5}-...$$
Then I try to reverse the substitution but this is either incomplete or incorrect: $$f\bigg(\frac{1}{x}\bigg) = \frac{1}{x} - \frac{1}{3x^3} + \frac{1}{5x^5} - ...$$

We could use the Taylor expansion of $\arctan(x)$ when $x \rightarrow 0$ and that
$$
\forall x \in \mathbb{R}^*_+, \arctan(x) + \arctan\bigg(\frac{1}{x}\bigg) = \frac{\pi}{2}
$$
and find the correct result.
But as @janosch points out, it's faster to use
$$
\arctan'\bigg(\frac{1}{x}\bigg)= -\frac{1}{x^2 +1}
$$
and fix the integrating constant to
$\lim_{x \rightarrow 0} \arctan(1/x) = \frac{\pi}{2}$ and finally get
$$
\arctan(x) =_{x \rightarrow + \infty} \frac{\pi}{2} - \frac{1}{x} + \frac{1}{3x^3} - \frac{1}{5x^5} + o\bigg(\frac{1}{x^5}\bigg).
$$
