# Failure of L’Hospital’s rule to $\lim_{x\rightarrow\infty} x\left(\arctan\left(\frac{x+1}{x+2}\right)-\frac\pi 4\right)$?

I rewrote the limit

$$\lim_{x\rightarrow\infty} x\left(\arctan\left(\frac{x+1}{x+2}\right)-\frac\pi 4\right) =\lim_{x\rightarrow\infty} \frac{\left(\arctan\left(\frac{x+1}{x+2}\right)-\frac\pi 4\right)}{\frac 1x},$$

noting that both the numerator and denominator tend to zero as $$x\rightarrow \infty$$ so that the conditions for L’Hospital’s rule are fulfilled. However, differentiating top and bottom then yields:

$$\lim_{x\rightarrow\infty} \frac{\left(\arctan\left(\frac{x+1}{x+2}\right)-\frac\pi 4\right)}{\frac 1x}=\lim_{x\rightarrow\infty} \frac{\frac{1}{1+\left(\frac{x+1}{x+2}\right)^2}}{-\frac 1{x^2}}=\lim_{x\rightarrow\infty} \frac{-x^2(x+2)^2}{(x+2)^2+(x+1)^2}=\infty,$$

which is incorrect. What went wrong?

• You didn't do the Chain Rule when you differentiated the numerator. Commented Oct 21, 2021 at 19:34
• I see that after rewriting the denominator tends to $0$ and the numerator tends to $\frac{\pi}{4}$ since $x \to \infty$. Commented Oct 21, 2021 at 19:58

You forgot to use chain rule in the numerator:

$$\frac{d}{dx}(arctan(\frac{x+1}{x+2})-\frac{\pi}{4}) = \dfrac{\frac{x+2-(x+1)}{(x+2)^2}}{1+(\frac{x+1}{x+2})^2} = \frac{1}{(x+2)^2+(x+1)^2}$$

Now the limit exists.

Alternatively, with the trigonometric identity,

$$\tan^{-1} (a) - \tan^{-1}( b) = \tan^{-1} \left( \dfrac{ a - b}{1 + ab} \right)$$

Set $$a = \frac{x+1}{x+2}$$ and $$b = 1 ,$$

$$\tan^{-1} \left( \dfrac{x+1}{x+2} \right) - \dfrac \pi4 = \tan^{-1} \left( \dfrac1{-2x-3} \right)$$

So the limit is $$L :=\lim_{x\to\infty} x \cdot \tan^{-1} \left( \dfrac1{-2x-3} \right) = \lim_{x\to\infty}-x \cdot \tan^{-1} \left( \dfrac1{2x+3} \right)$$

Can you finish it off from here?

• It's nice to see you back on Maths SE! Your stuff on Brilliant and with bprp has been an inspiration - keep doing what you do. Commented Oct 23, 2021 at 3:56