How to calculate $\lim_{x \to \infty}[(x-1/2)^{2}-x^{4}\ln^2{(1+1/x)}]$ I'm working on real analysis and struggled with the problem for days.
It seems to me that I should factor the formula into $[(x-1/2)-x^2\ln{(1+1/x)}][(x-1/2)+x^2\ln{(1+1/x)}]$ and try a way out though $\lim_{x \to \infty}\frac{\ln{1+1/x}}{1/x}=1$. But I failed.
Would you help me find it out? I'd appreciate your help. Best regards.
 A: $\ln(1+t)=t-\dfrac{t^2}{2}+\dfrac{t^3}{3}-\dfrac{t^4}{4}+\cdots$
$\ln^2(1+t)=\left(t-\dfrac{t^2}{2}+\dfrac{t^3}{3}-\dfrac{t^4}{4}+\cdots\right)^2=t^2-t^3+\dfrac{11}{12}t^4+O(t^5)$
$x^4\ln^2(1+\dfrac1x)=x^2-x+\dfrac{11}{12}+O(\dfrac1x)$
$(x-\dfrac12)^2-x^4\ln^2(1+\dfrac1x)=-\dfrac{2}{3}+O(\dfrac1x)$
A: Let's put   $y=\displaystyle{\frac{1}{x}}$, then $y\to 0^{+}$  because $x\to\infty$. So
$$L=\lim_{x\to\infty}\left(\left(x-\frac{1}{2}\right)^{2}-x^{4}\ln^{2}\left(1+\frac{1}{x}\right)\right)=\lim_{y\to 0^{+}}\left(\left(\frac{1}{y}-\frac{1}{2}\right)^{2}-\frac{\ln^{2}\left(1+y\right)}{y^4}\right)
=\lim_{y\to 0^{+}}\left(\frac{y^{2}(2-y)^{2}-4\ln^{2}(1+y)}{4y^{4}}\right).$$ 
Then applying L'hôpital's rule 2 times you can get rid of the squared logarithm in the expression and then will get $-\frac{2}{3}$. In effect,
$\displaystyle{\lim_{y\to 0^{+}}\frac{y^{4}-4y^{3}+4y^{2}-4\ln^{2}(1+y)}{4y^{4}} } 
\overset{L.H.}{=}\lim_{y\to 0^{+}}\displaystyle{\frac{4y^{3}-12y^{2}+8y-8\ln(1+y)\displaystyle{\frac{1}{1+y}}}{16y^{3}}}
=\lim_{y\to 0^{+}}\frac{(1+y)(4y^{3}-12y^{2}+8y)-8\ln(1+y)}{16y^{3}(1+y)}
=\lim_{y\to 0^{+}}\frac{(4y^{3}-12y^{2}+8y)+(4y^{4}-12y^{3}+8y^{2})-8\ln(1+y)}{16y^{4}+16y^{3}}
=\lim_{y\to 0^{+}}\frac{4y^{4}-8y^{3}-4y^{2}+8y-8\ln(1+y)}{16y^{4}+16y^{3}}
\overset{L.H.}{=}\lim_{y\to 0^{+}}\frac{16y^{3}-24y^{2}-8y+8-\displaystyle{\frac{8}{1+y}}}{64y^{3}+48y^{2}}
=\lim_{y\to 0^{+}}\frac{(6y^{3}-24y^{2}-8y+8)(1+y)-8}{(64y^{3}+48y^{2})(1+y)}\overset{L.H.}{=} \lim_{y\to 0^{+}}\frac{6y^{4}-18y^{3}-32y^{2}}{64y^{4}+112y^{3}+48y^{2}}= \lim_{y\to 0^{+}}\frac{6y^{2}-18y-32}{64y^{2}+112y+48}=\frac{-32}{48}=\frac{-2}{3}$
This can be donne also in similar cases like:
$$ \lim_{x\to \infty}\left(x-\frac{x}{e}\left(1+\frac{1}{x}\right)^{x}\right)=\frac{1}{e}\cdot\lim_{y\to 0^{+}}\left(\frac{e-(1+y)^{\frac{1}{y}}}{y}\right)=\frac{1}{2}.$$
Where $e$ is the Euler's number.
The limit $\displaystyle{\lim_{y\to 0^{+}}\left(\frac{e-(1+y)^{\frac{1}{y}}}{y}\right)}$ is of the form $\frac{0}{0}$ and by L.H. rule:
$$ \lim_{y\to 0^{+}}\left(\frac{e-(1+y)^{\frac{1}{y}}}{y}\right)=\frac{e}{2}. $$
As before you can do the same change of variables $y=\displaystyle{\frac{1}{x}}$ and apply L'hôpital's rule to verify the answer. Clearly the most difficult thing is to compute well the derivative of $(1+y)^{\frac{1}{y}}$ w.r.t. $y$.
A: Let's put $x=1/t$ so that $t\to 0^{+}$. And the limit gets transformed into $$\lim_{t\to 0^{+}}\frac{t^{2}(t-2)^{2}-4(\log(1+t))^{2}}{4t^{4}}$$ The numerator can now be factorized and we can write the above as $$\lim_{t\to 0^{+}}\frac{t^{2} -2t - 2\log(1+t)}{4t}\cdot\frac{t^{2}-2t+2\log(1+t)}{t^{3}}$$ The first fraction above tends to $(0-2-2)/4=-1$ and hence the limit is equal to $$\lim_{t\to 0^{+}}\frac{2t-t^{2}-2\log(1+t)}{t^{3}}$$ and after this we can use Taylor expansions to get the answer $-2/3$. Proceeding in this manner avoids any manipulation of Taylor series and the result is arrived using a famous and easy to remember series for $\log(1+t)$. Often a little algebra before Taylor series expansions helps to simplify the use of these expansions. 
It is also possible to evaluate the last limit above using L'Hospital's Rule. Using L'Hospital's Rule we get $$\frac{1}{3}\lim_{t\to 0^{+}}\dfrac{2-2t-\dfrac{2}{1+t}}{t^{2}}=\frac{2}{3}\lim_{t\to 0^{+}}\frac{-1}{1+t}=-\frac{2}{3}$$ and thus just a single application of L'Hospital's Rule is all we need to evaluate the limit. Like in case of Taylor expansions, it is always better to apply a little bit of algebra to simplify the expression before applying L'Hospital's Rule and one should avoid its repeated application.

While the factorization  of numerator in the initial step is obvious it is not at all clear why the denominator is split as $t\cdot t^{3}$ instead of the more natural $t^{2}\cdot t^{2}$. Well, before posting this answer I did factorize the denominator as $t^{2}\cdot t^{2}$, but then the first fraction diverged and second one was converging to $0$. When a limit is split as a product of two limits it is desirable to have one of the limits as non-zero and finite so that that particular limit is evaluated and the focus shifts on the evaluation of the other limit. It was easy to observe that the first factor would give a non-zero limit if the denominator is split as $t\cdot t^{3}$ and then I posted the same here. 
