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$).
 A: Start by writing (all symbols $\sim$ are taken as $x \to +\infty$)
$$
\log(1+x) = \log x + \log \left( 1+ \frac{1}{x} \right) \sim \log x + \frac{1}{x} - \frac{1}{2x^2} + \frac{1}{3x^3}.
$$
Hence
$$
x \log (1+x) - x\log x + \arctan \frac{1}{2x} \sim 1 - \frac{1}{2x} + \frac{1}{3x^2} + \frac{1}{2x} - \frac{1}{24 x^3} \sim 1+\frac{1}{3x^2}.
$$
Now you conclude easily since
$$
\lim_{x \to +\infty} \left(1+\frac{1}{3x^2} \right)^{x^2 \arctan x} = e^{\frac{1}{3} \frac{\pi}{2}} = e^{\pi/6}.
$$
As you can see, a zero-order expansion is not enough, since you can cancellation of low-order terms.
A: Let $f(x)$ be your function.
we have
$x\ln(1+\frac{1}{x})+\arctan(\frac{1}{2x})=$
$=x(\frac{1}{x}-\frac{1}{2x^2}+\frac{1}{3x^3})+(\frac{1}{2x}-\frac{1}{24x^3})+\frac{1}{x^3}\epsilon(x)$
$=1+\frac{1}{3x^2}(1+\epsilon(x))$
thus
$\ln(f(x))\sim \frac{1}{3}\arctan(x)\;\; (x\to+\infty)$
and
$$\lim_{x\to+\infty}f(x)=e^{\frac{\pi}{6}}.$$
A: $"=^{*}"$ 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}.$ 
