<s>[INST] Evaluate $\lim_\limits{x \to +\infty}\left(x\ln (1+x)-x\ln x + \arctan\frac{1}{2x}\right)^{x^2\arctan x}$ $$\lim_{x \to +\infty}\left(x\ln (1+x)-x\ln x + \arctan\frac{1}{2x}\right)^{x^2\arctan x}$$
My attempt
\begin{align*}
&=\exp \lim_\limits{x \to +\infty} x^2\arctan x \cdot\ln\left[x\ln (1+x)-x\ln x + \arctan\frac{1}{2x}\right]\\
&=\exp \lim_{x \to +\infty} \frac{\pi}{2}x^2 \ln\left[\frac{\ln x}{\frac{1}{x}} + \frac{\ln \left(1+\frac{1}{x}\right)}{\frac{1}{x}}-\frac{\ln x}{\frac{1}{x}} + \arctan\frac{1}{2x}\right]\\
&=\exp \lim_{x \to +\infty} \frac{\pi}{2}x^2\ln\left[1 + \arctan \frac{1}{2x}\right]
\end{align*}
Here I don't know what to do. One thing I did was to multiply and divide by $\arctan \frac{1}{2x}$ in order to get rid of the logarithm. But I ended up with 
$$\frac{\pi}{2}x^2\arctan \frac{1}{2x}$$
$\arctan \frac{1}{2x} \to \pi/2$ as $x \to +\infty$ but that doesn't lead to the right answer (I'd get a limit of $+\infty$).
 [/INST] $"=^{*}"$ denotes equality by L'Hospital's Rule.
Define $$\displaystyle f(x) = x\ln\Big(\frac{x+1}{x}\Big)\text{ and }g(x) = f(x)+\arctan\Big(\displaystyle \frac{1}{2x}\Big),\text { for } x > 0.$$  $$\displaystyle 1 = \lim_{x \to \infty}\frac{x}{x+1}=^{*}\lim_{x \to \infty}\frac{\ln\Big(\displaystyle \frac{x+1}{x}\Big)}{x^{-1}} = \lim_{x \to \infty}f(x)= \lim_{x\to\infty}g(x).$$An easy calculation shows that $\displaystyle \lim_{x\to\infty}g'(x)=0.$ $$\displaystyle {1}/{3} = \lim_{x \to \infty}\frac{x^3(32x^3+8x^2-1)}{6(x+1)^2(4x^{2}+1)^2}=\lim_{x \to \infty}\frac{x^4}{6}\Big(\frac{16x^2}{(4x^2+1)^2}-\frac{1}{x(x+1)^2}\Big)= \lim_{x\to\infty}\frac{g''(x)}{6x^{-4}}=^{*}\lim_{x\to\infty}\frac{g'(x)}{-2x^{-3}}=\lim_{x\to\infty}\Big(\frac{1}{g(x)}\Big(\frac{g'(x)}{-2x^{-3}}\Big)\Big)=^{*}\lim_{x\to\infty}\frac{\ln(g(x))}{x^{-2}}=\lim_{x\to\infty}\ln(g(x)^{\displaystyle x^2}).$$
Hence, $\displaystyle \lim_{x\to\infty}(g(x)^{\displaystyle x^2})= e^{\frac{1}{3}}$.Thus, $\displaystyle \lim_{x\to\infty}((g(x)^{\displaystyle x^{2}})^ {\displaystyle\arctan(x)})= e^{\frac{1}{3}\displaystyle\lim_{x\to\infty}\arctan(x)}=e^\frac{\pi}{6}.$ 
</s>