Limit $\lim_{x\to\infty}x\tan^{-1}(f(x)/(x+g(x)))$

I am investigating the limit

$$\lim_{x\to\infty}x\tan^{-1}\left(\frac{f(x)}{x+g(x)}\right)$$

given that $f(x)\to0$ and $g(x)\to0$ as $x\to\infty$. My initial guess is the limit exists since the decline rate of $\tan^{-1}$ will compensate the linearly increasing $x$. But I'm not sure if the limit can be non zero. My second guess is the limit will always zero but I can't prove it. Thank you.

EDIT 1: this problem ca be reduced into proving that $\lim_{x\to\infty}x\tan^{-1}(M/x)=M$ for any $M\in\mathbb{R}$. Which I cannot prove it yet.

EDIT 2: indeed $\lim_{x\to\infty}x\tan^{-1}(M/x)=M$ for any $M\in\mathbb{R}$. Observe that

$$\lim_{x\to\infty}x\tan^{-1}(M/x)=\lim_{x\to0}\frac{\tan^{-1}(Mx)}{x}.$$ By using L'Hopital's rule, the right hand side gives $M$. So the limit which is being investigated is equal to zero for any $f(x)$ and $g(x)$ as long as $f(x)\to0$ and $g(x)\to0$ as $x\to\infty$. The problem is solved.


I thought it would be instructive to present a way forward that relies only on elementary tools. We first develop a basic inequality for the arctangent by recalling from geometry that the sine and cosine functions satisfy the inequalities

$$|z\cos(z)|\le |\sin(z)|\le |z| \tag 1$$

for $|z|\le \pi/2$ (SEE THIS ANSWER).

Then, dividing both sides of $(1)$ by $|\cos(z)|$ yields

$$|z|\le\left|\tan(z)\right|\le \left|\frac{z}{\cos(z)}\right| \tag 2$$

Substituting $z=\arctan(x)$ into $(2)$ yields

$$\bbox[5px,border:2px solid #C0A000]{\frac{|x|}{\sqrt{1+x^2}} \le|\arctan(x)|\le |x|} \tag 3$$

for all $x$.

We will now use the inequality in $(3)$ to evaluate the limit of interest. We substitute $x\to \frac{f(x)}{x+g(x)}$ into $(3)$ and write

$$\left|\frac{\frac{xf(x)}{x+g(x)}}{\sqrt{1+\left(\frac{f(x)}{x+g(x)}\right)^2}}\right| \le \left|x\arctan\left(\frac{f(x)}{x+g(x)}\right)\right|\le \left|\frac{xf(x)}{x+g(x)}\right| \tag 4$$

whereupon applying the squeeze theorem to $(4)$ reveals that

$$\bbox[5px,border:2px solid #C0A000]{\lim_{x\to \infty} x\arctan\left(\frac{f(x)}{x+g(x)}\right)=0}$$


Note that $$\lim_{y\to0}{\arctan y\over y}=\lim_{y\to0}{\arctan y-\arctan0\over y-0}=\arctan{\,'}(0)=1\ .$$ It follows that under the given assumptions $$\lim_{x\to\infty}\left( x\arctan{f(x)\over x+g(x)}\right)=\lim_{x\to\infty}\left({\arctan{f(x)\over x+g(x)}\over{f(x)\over x+g(x)}}\cdot{ f(x)\over 1+{g(x)\over x}}\right)=\lim_{x\to\infty} f(x)=0\ .$$