<s>[INST] limit of $\lim\limits_{x \to \infty} (1+ \frac{\pi}{2} - \arctan(x))^x$ Question: Limit of $\lim\limits_{n \to \infty} (1+ \frac{\pi}{2} - \arctan(x))^x$
The first things I notice are : $\lim\limits_{x \to \infty} \arctan(x) = \frac{\pi}{2}$ and the limit looks something of the form $(1 + \frac{1}{x})^x$. Unfortunetly, I can not seem to apply these ideas to solve the limits. I am not sure if it is right:
$$\ln(y) = \lim\limits_{x \to \infty} x \ln(1 + \frac{\pi}{2} - \arctan(x)) = \lim\limits_{x \to \infty}\frac{\ln(1+\frac{\pi}{2}- \arctan(x))}{\frac{1}{x}}$$
Apply l'hopital's rule ... ?
Could someone confirm this approach is right, or if wrong provide a correct approach?
 [/INST] $$A=\left(1+ \frac{\pi}{2} - \tan^{-1}(x)\right)^x=\left(1+\tan ^{-1}\left(\frac{1}{x}\right)\right)^x$$
$$\log(A)=x \log\left(1+\tan ^{-1}\left(\frac{1}{x}\right)\right)$$
By Taylor
$$\tan ^{-1}\left(\frac{1}{x}\right)=\frac{1}{x}-\frac{1}{3 x^3}+O\left(\frac{1}{x^5}\right)$$
$$\log\left(1+\tan ^{-1}\left(\frac{1}{x}\right)\right)=\frac{1}{x}-\frac{1}{2 x^2}+\frac{1}{12
   x^4}+O\left(\frac{1}{x^5}\right)$$
$$\log(A)=1-\frac{1}{2 x}+\frac{1}{12 x^3}+O\left(\frac{1}{x^4}\right)$$
$$A=e^{\log(A)}=e \left(1-\frac{1}{2 x}+\frac{1}{8 x^2}+\frac{1}{16
   x^3} \right)+O\left(\frac{1}{x^4}\right)$$
Edit
Consider $x=\frac {11}{24}\pi$ (this is quite far away from $\infty$) for which the arctangent is $\left(1+\sqrt{2}\right) \left(\sqrt{2}+\sqrt{3}\right)$.
the exact value is $1.97993$ while this truncated expression gives $1.99516$.
In fact, the relative error is smaller than $0.01$% if $x\geq3$
</s>