Why is my procedure for the evaluation of $\lim_{n\to \infty} (\frac{1}{\pi}\arctan (u n)+\frac{1}{2})^n$ wrong? I need to find the following limit  $$\lim_{n\to \infty} \left(\frac{1}{\pi}\arctan (u n)+\frac{1}{2}\right)^n$$
For $u >0$ constant
My try:
$$\lim_{n\to \infty} \left(\frac{1}{\pi}\arctan (u n)+\frac{1}{2}\right)^n=e^{\left(\lim_{n\to \infty} n\log\left(\frac{1}{\pi}\arctan (u n)+\frac{1}{2}\right)\right)}$$
Since as $n\to \infty$,   $\arctan (u n) \to \frac{\pi}{2} \implies $ $ \frac{1}{\pi}\arctan (u n)+\frac{1}{2}\to 1 $ $\implies \log(\frac{1}{\pi}\arctan (u n)+\frac{1}{2}) \to 0 $ and $n\log(\frac{1}{\pi}\arctan (u n)+\frac{1}{2}) \to  \infty$ since the $\log$ is dwarfed by $n$  so the limit must be $e^{\infty}=\infty$. However the answer should be $e^{\frac{-1}{\pi u}}$
Why is the previous calculation wrong? And how should I proceed ?
 A: $$a_n=\left(\frac{1}{\pi}\arctan (u \,n)+\frac{1}{2}\right)^n \implies \log(a_n)=n \log\left(\frac{1}{\pi}\arctan (u \,n)+\frac{1}{2}\right)$$
Now Taylor series
$$\arctan (u \,n)=\frac{\pi }{2}-\frac{1}{n u}+\frac{1}{3 n^3
   u^3}+O\left(\frac{1}{n^5}\right)$$
$$\frac{1}{\pi}\arctan (u \,n)+\frac{1}{2}=1-\frac{1}{\pi  n u}+\frac{1}{3 \pi  n^3
   u^3}+O\left(\frac{1}{n^5}\right)$$
$$\log\left(\frac{1}{\pi}\arctan (u \,n)+\frac{1}{2}\right)=-\frac{1}{\pi  n u}-\frac{1}{2 n^2 \pi ^2 u^2}+O\left(\frac{1}{n^3}\right)$$
$$\log(a_n)=-\frac{1}{\pi   u}-\frac{1}{2 n \pi ^2 u^2}+O\left(\frac{1}{n^2}\right)$$
$$a_n=e^{\log(a_n)}=e^{-\frac{1}{\pi  u}}\left(1-\frac{1}{2 n \pi ^2 u^2}+O\left(\frac{1}{n^2}\right)\right)$$
A: From $\log(\frac{1}{\pi}\arctan \left(u n)+\frac{1}{2}\right) \to 0$ we can't conclude that
$$n\log\left(\frac{1}{\pi}\arctan (u n)+\frac{1}{2}\right) \to  \infty$$
since this is an indeterminate form $\infty \cdot 0$.
We can proceed by standard limits as follows using that
$$\arctan (u n)=\frac \pi 2 -\arctan \left(\frac1{u n}\right)$$
and then
$$n\log\left(\frac{1}{\pi}\arctan (u n)+\frac{1}{2}\right)=n\log\left(1-\frac1\pi \arctan \left(\frac1{u n}\right)\right)=$$
$$=\frac{\log\left(1-\frac1\pi \arctan \left(\frac1{u n}\right)\right)}{\frac1\pi \arctan \left(\frac1{u n}\right)}\frac{\frac1\pi \arctan \left(\frac1{u n}\right)}{\frac1\pi \frac1{u n}}\frac1{\pi u} \to -1\cdot 1\cdot \frac1{\pi u}=-\frac1{\pi u}$$
and therefore
$$\lim_{n\to \infty} \left(\frac{1}{\pi}\arctan (u n)+\frac{1}{2}\right)^n= e^{-\frac1{\pi u}}$$
