Prove that $\arctan(x) = \frac{\pi}{2} - \frac{1}{x} + O\left(\frac{1}{x^3}\right)$ for $x \to +\infty$ Want to prove that $$\arctan(x) = \frac{\pi}{2} - \frac{1}{x} + O\left(\frac{1}{x^3}\right) \ \text{as}~~~  x \to +\infty$$
Wolfram says that it's true but I'm trying to find some formal prove of this equality.
Here's what i found about that:
We know that $\arctan(x) = \frac{\pi}{2} - \int_x^{+\infty}\frac{dt}{1 + t^2}$ (we can easily prove this by solving such integral). But what this one can give us for asymptotic assessment?
Seems like we have to prove that this integral equals to $-\frac{1}{x} + O\left(\frac{1}{x^3}\right)$, but how?

To show $$\arctan(x) = \frac{\pi}{2} - \frac{1}{x} + O\left(\frac{1}{x^3}\right) \ \text{as}~~~  x \to +\infty,$$
you have to prove (by definition)
$$\limsup_{ x\to +\infty}\left|\frac{\arctan(x)-\frac{\pi}{2} + \frac{1}{x}}{\frac{1}{x^3}}\right|<\infty.
$$
This can be easily done by calculating $\lim_{ x\to +\infty}\frac{\arctan(x)-\frac{\pi}{2} + \frac{1}{x}}{\frac{1}{x^3}}$ using L'Hôpital's rule. As you want to use $\arctan(x) = \frac{\pi}{2} - \int_x^{+\infty}\frac{dt}{1 + t^2}$, you get
$$\lim_{ x\to +\infty}\frac{\arctan(x)-\frac{\pi}{2} + \frac{1}{x}}{\frac{1}{x^3}}=\lim_{ x\to +\infty}\frac{- \int_x^{+\infty}\frac{dt}{1 + t^2} + \frac{1}{x}}{\frac{1}{x^3}} =\lim_{ x\to +\infty}\frac{\frac{1}{1 + x^2} - \frac{1}{x^2}}{-\frac{3}{x^4}}=\lim_{ x\to +\infty}\frac{1}{3}\frac{x^2}{1 + x^2}=\frac{1}{3}.
$$
