<s>[INST] Solving a limit by two methods with different results I'm considering this limit
$$\lim_{x\to 0}\frac{(1-\cos x^2)\arctan x}{e^{x^2}\sin 2x - 2x + \frac{2}{3}x^3}.$$
My first attempt was using the following equivalent infinitesimals
$$1-\cos x^2 \sim \frac{x^4}{2},\quad \arctan x \sim x, \quad \sin 2x \sim 2x, \quad e^{x^2} - 1 \sim x^2 \,\,\,\,\text{when}\,\,\,\,x\rightarrow 0,$$
and then
\begin{align*}
\lim_{x\to 0}\frac{(1-\cos x^2)\arctan x}{e^{x^2}\sin 2x - 2x + \frac{2}{3}x^3}&=\lim_{x\to 0}\frac{x^5/2}{2xe^{x^2}-2x+\frac{2}{3}x^3}=\lim_{x\to 0}\frac{x^4}{4(e^{x^2}-1)+\frac{4}{3}x^2}\\
&=\lim_{x\to 0}\frac{x^4}{4x^2+\frac{4}{3}x^2}=\lim_{x\to 0}\frac{3}{16}x^2=0.
\end{align*}
Later, inspecting this other approach combining infinitesimals and the Taylor expansions
\begin{align*}
e^{x^2} &= 1+x^2+\frac{x^4}{2}+o(x^4),\\
\sin 2x &= 2x - \frac{4x^3}{3} + \frac{4x^5}{15} + o(x^5),\\
e^{x^2}\sin 2x &= 2x - \frac{2x^3}{3} - \frac{x^5}{15} + o(x^5),
\end{align*}
I get this other result
\begin{align*}
\lim_{x\to 0}\frac{(1-\cos x^2)\arctan x}{e^{x^2}\sin 2x - 2x + \frac{2}{3}x^3}&=\lim_{x\to 0}\frac{x^5/2}{2x - \frac{2x^3}{3} - \frac{x^5}{15} + o(x^5)-2x+\frac{2}{3}x^3}\\
&=\lim_{x\to 0}\frac{x^5/2}{-x^5/15 + o(x^5)}=-\frac{15}{2}.
\end{align*}
Can someone help me to identify what am I getting wrong? 
Thanks.
 [/INST] Both computations are incorrect. The first method amounts to writing
\begin{equation}
\begin{array}{l}
1 - \cos(x^2) = \frac{x^4}{2} + o(x^4)\cr
\arctan(x) = x + o(x)\cr
\sin(2x)= 2x + o(x)\cr
e^{x^2}= 1 + x^2 + o(x^2)
\end{array}
\end{equation}
but substituting these values in the fraction cannot tell us the limit because it gives
\begin{equation}
\frac{\frac{x^5}{5}+ o(x^5)}{o(x)}
\end{equation}
which limit is not known.
In the second method, as @JoséCarlosSantos pointed out, there is a wrong sign. It is most probable that the sign before $\frac{2}{3}x^3$ is already wrong in the initial fraction. Apart from this point, the second method should work.
</s>