Consider the function $f(x)=\lim\limits_{n\to \infty}\dfrac{ \log_e(2+x)-x^{2n}\sin x}{1+x^{2n}}\;\;,\quad x>0\,.$
Is $f(x)$ continuous at $x=1$ ? Justify your answer. Show that $f(x)$ does not vanish anywhere in the interval $[0,\frac{\pi}{2}]$ and indicate the points where $f(x)$ changes its sign.
My solution goes like this:
We have, $$f(x)=\lim_{n\to \infty}\frac {\log_e(2+x)-x^{2n}\sin x}{1+x^{2n}}\;\;,\quad x>0\,.$$ Now, $$f(x)=\lim_{n\to \infty}\frac {\log_e(2+x)-x^{2n}\sin x}{1+x^{2n}}=\\=-\lim_{n\to \infty}\frac {-\log_e(2+x)+x^{2n}\sin x}{1+x^{2n}}.$$ Applying L'Hospital's rule , when $x> 1,$ we get, $$\lim_{n\to \infty}\frac {-\log_e(2+x)+x^{2n}\sin x}{1+x^{2n}}=\\=\lim_{n\to \infty}\frac {2x^{2n}\log x\sin x}{2x^{2n}\log x}=\sin x.$$ Thus, $f(x)=-\sin x.$ Next, if $x<1$ then $x^{2n}\to 0$ as $n\to\infty$, and hence, $f(x)=\log(2+x).$ Finally, if $x=1$ then, $f(x=1)=\frac{\log 3-\sin 1}{2}.$ Now, we verify the continuity at $x=1.$ Now, $\lim_{x\to 1_+}f(x)=-\sin 1$ and $\lim_{x\to 1_-}f(x)=\log 3$. Thus, $f(x)$ is not continuous at $x=1.$ Again, it's given in the definition of $f(x)$ that $x>0$ and in the interval $[0,\frac{\pi}{2}],$ which requires the examination, we should exclude $x=0$, so the interval to examine is $(0,\frac{\pi}{2}].$ Now, this is the first quadrant and $\sin x>0$ in the 1st quadrant and this essentially establishes the fact that $f(x)$ doesnot vanish here. From the properties of sine function, $f(x)$ changes sign between the 2nd quadrant and 3rd quadrant i.e the sign is retained in 1st and 2nd quadrant while the opposite sign appears in the 3rd and 4th quadrant when $x>1$. If $x<1$, then $f(x)=\log (2+x)$ is positive. If $x=1$ then $f(x)$ is easily verified positive.
Is the above solution correct? If not, where is it going wrong?
(An edited solution after the clarifications by Thomas Andrews)
There are three possible cases.
Case 1:
If $\;0<x<1\,,\;$ then $\;\lim\limits_{n\to\infty} x^{2n}=0\;,\;$ hence ,
$f(x)=\lim\limits_{n\to\infty}\dfrac{\log_e(2+x)-x^{2n}\sin x}{1+x^{2n}}=\log_e(2+x)\,.$
Case 2:
If $\;x=1\,,\;$ then $\;\lim\limits_{n\to\infty} x^{2n}=1\;,\;$ hence ,
$f(x)=\lim\limits_{n\to\infty}\dfrac{\log_e(2+x)-x^{2n}\sin x}{1+x^{2n}}=\dfrac{\log_e3-\sin1}2>0\,.$
Case 3:
If $\;x>1\,,\;$ then $\;\lim\limits_{n\to\infty} x^{2n}=+\infty\;,\;$ moreover ,
$\begin{align}f(x)&=\lim\limits_{n\to\infty}\dfrac{\log_e(2+x)-x^{2n}\sin x}{1+x^{2n}}=\\&= \lim\limits_{n\to\infty}\dfrac{x^{2n}\left[\frac{\log_e(2+x)}{x^{2n}}-\sin x\right]}{x^{2n}\left[\frac1{x^{2n}}+1\right]}=\\&=\lim\limits_{n\to\infty}\dfrac{\frac{\log_e(2+x)}{x^{2n}}-\sin x}{\frac1{x^{2n}}+1}=\dfrac{0-\sin x}{0+1}=-\sin x\,.\end{align}$
Consequently, we get that
$f(x)=\begin{cases}\log_e(2+x)&\text{if }\;0<x<1\\\\\dfrac{\log_e3-\sin1}2>0&\text{if }\;x=1\\\\-\sin x&\text{if }\;x>1\end{cases}$
$f(x)\;$ is not continuos at $\;x=1\;$ because
$\lim\limits_{x\to1^-}f(x)=\lim\limits_{x\to1^-}\log_e(2+x)=\log_e3\;,$
$\lim\limits_{x\to1^+}f(x)=\lim\limits_{x\to1^+}\big(\!\!-\!\sin x\big)=-\sin1\;,$
but $\;\log_e3\neq f(1)=\dfrac{\log_e3-\sin1}2\neq-\sin1\,.$
Moreover ,
$f(x)\,$ does not vanish anywhere in the interval $\,\left]0,\frac{\pi}2\right]\,$ because
$f(x)=\log_e(x+2)>\log_e2>0\;\;$ for any $\;x\in\,]\,0,1[\;,$
$f(1)=\dfrac{\log_e3-\sin1}2>0\;,$
$f(x)=-\sin x<0\;\;$ for any $\;x\in\left]1,\frac{\pi}2\right]\,.$