Asymptotic approximation of the arctangent?

That is, I am looking for an algebraic function $f(x)$ that approximates $\arctan x$ for large values of $x$.

The approximation could be reasonably modest -- perhaps something like

$$\tan (f(x)) = \frac{\pi}{4} + O\left(\frac{1}{x^2}\right).$$

Use the following

$$\arctan(x) + \arctan\left(\frac{1}{x}\right) = \frac{\pi}{2} \Leftrightarrow$$

$$\arctan(x) = \frac{\pi}{2}-\arctan\left(\frac{1}{x}\right)$$

The series for $\arctan(x)$ is

$$\arctan(x)=x-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+\ldots$$

Now substitute $\frac1x$ to get the result

$$\arctan(x)=\frac{\pi}{2}-\frac{1}{x}+\frac{1}{3x^3}-\frac{1}{5x^5} +\ldots$$

So for large values of $x$

$$\arctan(x)\sim\frac{\pi}{2}$$

which is logical, because $\displaystyle \lim_{x\to\infty}\arctan(x)=\frac{\pi}{2}$.

$$\arctan\left(x\right) ={\pi \over 2}\,{\rm sgn}\left(x\right) - \arctan\left(1 \over x\right) \approx{\pi \over 2}\,{\rm sgn}\left(x\right) - {1 \over x}\,,\qquad \left\vert\,x\,\right\vert \gg 1$$