I have to evaluate \begin{equation} L=\lim_{x\to 0} \frac{1-e^{\frac{x^2}{2}}\cos x}{2\sin^2x -x \arctan2x} \end{equation}
I tried with de l'Hopital's rule but it seems not working, am I missing something?
EDIT: I'll explain better what I tried & where I got stuck.
Straightforward substitution leads to a $\frac{0}{0}$ form.
So I tried de l'Hopital:
Let $f(x)=1-e^{\frac{x^2}{2}}\cos x$ (the numerator) and $g(x)=2\sin^2x -x \arctan2x$ (the denominator).
We have:
\begin{equation} f'(x) = e^{\frac{x^2}{2}}(\sin x -x \cos x) \end{equation}
\begin{equation} g'(x) = -\frac{2x}{1+4x^2}-\arctan(2x) +4\sin x \cos x \end{equation}
This still leads to a $\frac{0}{0}$ form.
Differentiating again, we have
\begin{equation} f''(x) = xe^{\frac{x^2}{2}}(2\sin x -x \cos x) \end{equation}
\begin{equation} g''(x)= 4\left(-\sin^2 x +\cos^2 x -\frac{1}{(4x^2+1)^2} \right) \end{equation}
Still, evaluating the limit again leads to a $\frac{0}{0}$ form. Am I losing something?
Actually, if you want to use de l'Hopital's rule, you have to tediously calculate derivatives up to the fourth order. If we denote with $f(x)=1-e^\frac{x^2}{2}\cos(x)$ and $g(x)=2\sin^2(x)-x\arctan(2x)$, we have that: $$f^{(4)}(x)=e^\frac{x^2}{2}\left[(4x^3+8x)\sin(x)+(2-x^4)\cos(x)\right]$$ and $$g^{(4)}(x)=16\sin^2(x)-16\cos^2(x)+\frac{64}{(4x^2+1)^2}-\frac{1792x^2}{(4x^2+1)^3}+\frac{6144x^4}{(4x^2+1)^4}$$ The hypothesis of de l'Hopital's rule allow us to conclude that: $$\lim_{x\to 0}\frac{f(x)}{g(x)}=\lim_{x\to 0}\frac{f^{(4)}(x)}{g^{(4)}(x)}=\frac{2}{-16+64}=\frac{1}{24}$$
Edit: As pointed out in the comments, we first have to show that the limit $\lim_{x\to 0}\frac{f^{(3)}(x)}{g^{(3)}(x)}$ is in the $0/0$ form. Writing that we have to tediously calculate derivatives up to the fourth order, in order to make my answer more concise, I implicitly assumed, wrongly, that this fact could be easily shown. Obviously I shoud have specified it. Anyway... We have that: $$f^{(3)}(x)=e^\frac{x^2}{2}\left[(3x^2+2)\sin(x)-x^3\cos(x)\right]$$ and $$g^{(3)}(x)=-16\cos(x)\sin(x)+\frac{64x}{(4x^2+1)^2}-\frac{256x^3}{(4x^2+1)^3}$$ So $$\lim_{x\to 0}\frac{f^{(3)}(x)}{g^{(3)}(x)}$$ is in the form $0/0$. The fact that all the limits $\lim_{x\to 0}\frac{f^{(k)}(x)}{g^{(k)}(x)}$, for $k\leq 3$, are in the indeterminate form $0/0$ and that we can, finally, apply de l'Hopital's rule when $k=4$, is a consequence, as shown by other users, that the McLaurin series of $f(x)$ and $g(x)$ both have the first non-zero term of order $4$.