# Compute $\lim_{x\to\infty}x-\sqrt{x^2+x+1}\frac {\ln(e^x+x)}{x}$

Compute $\lim_{x\to\infty}x-\sqrt{x^2+x+1}\frac {\ln(e^x+x)}{x}$

My attempt with de l'Hôpital:

$$\lim_{x\rightarrow\infty}\frac {x^2-\sqrt{x^2+x+1}\ln(e^x+x)}{x}=\lim_{x\to\infty}\frac {4x\sqrt{x^2+x+1}-(2x+1)\ln(e^x+x)-\frac {(e^x+1)(x^2+x+1)}{e^x+x}}{\sqrt{x^2+x+1}}.$$ I tried to get to the common denominator and then applying de l'Hôpital but it is not getting any easier. Maybe there is something i should do before applying de l'Hôpital?

• @gavd yeah right, it was a typo, the second step is actually done with $x$ in the denominator – C. Cristi May 24 '18 at 6:51
• Informally, you can ignore the $x$ term under the logarithm as it is "infinitely smaller" than the exponential, and the ratio can safely be replaced by $1$. Then by completing the square, the radical is well approximated by $x+\frac12$ and after simplification the limit is $-\frac12$. – Yves Daoust May 24 '18 at 7:20

Check this:

$$\lim_{x \to +\infty} x -\sqrt{x^2+x+1}\cdot \frac{\ln(e^x+x)}{x} =$$ $$\lim_{x \to +\infty} x-\sqrt{1+\frac{1}{x}+\frac{1}{x^2}}\ln\left( e^x\left(1+\frac{x}{e^x} \right)\right) =$$ $$\lim_{x \to +\infty} x -\sqrt{1+\frac{1}{x}+\frac{1}{x^2}}\left(x+\ln \left(1+\frac{x}{e^x} \right) \right) =$$ $$\lim_{x \to +\infty} x\left(1-\sqrt{1+\frac{1}{x}+\frac{1}{x^2}} \right) - \sqrt{1+\frac{1}{x}+\frac{1}{x^2}}\ln \left(1+\frac{x}{e^x} \right).$$ Now, since $a-b = \frac{a^2-b^2}{a+b}$, you get $$\lim_{x \to +\infty} x\frac{1-1-\frac{1}{x}-\frac{1}{x^2}}{1+\sqrt{1+\frac{1}{x}+\frac{1}{x^2}}}-\sqrt{1+\frac{1}{x}+\frac{1}{x^2}}\ln\left(1+\frac{x}{e^x} \right) = -\frac{1}{2}.$$

• Can you be a little more detalied of what happens from step 3 to 4? – C. Cristi May 24 '18 at 7:10
• Nevermind, got it – C. Cristi May 24 '18 at 7:19

We have that

$$\sqrt{x^2+x+1}=x(1+1/x+1/x^2)^\frac12=x+\frac12+\frac1{2x}+o(x^{-1})$$

$$\frac{\ln(e^x+x)}x=\frac{\ln e^x+\ln (1+x/e^x)}x=1+\frac1{e^x}+o(e^{-x})$$

then

$$x-\sqrt{x^2+x+1}\frac {\ln(e^x+x)}{x}=x-x-\frac12-\frac1{2x}+o(x^{-1})\to -\frac12$$