<s>[INST] Calculate the value of the following limit So I have given the limit:
$$\lim_{x\to0} \frac{2\sin\left ( e^{-\frac{x^2}{2}} -\cos x \right)}{(\arctan(\sinh(x^2))^2}$$
I have been struggling for hours with it. Since i got the undefined form when i put $x=0$ i tried out with L'Hopital method and I come to this point:
$$\lim_{x\to 0} \frac{2\cos(e^{-\frac{x^2}{2}}-\cos x)(e^{-\frac{x^2}{2}}(-x)+\sin x)}{\frac{4x \arctan(\sinh(x^2))\cosh(x^2)}{\sinh(x^2)+1}}$$
Still here when i substitute x with $0$ i still get $0$. I tried factorising the x, i also tried using the identities $cos(A-B)$ and so on, but nothing.
I think the answer that should come out is $\frac{1}{6}$
I would be very thankful for your help,
Annalisa
 [/INST] If you are aware of Taylor expansions then:
$$
e^{\frac{-x^2}{2}} =_{x \rightarrow 0} 1-\frac{x^2}{2} + \frac{x^4}{8} + o(x^4)
$$
$$
\cos(x) =_{x \rightarrow 0} 1 - \frac{x^2}{2} + \frac{x^4}{4!} + o(x^4)
$$
Then
$$
e^{\frac{-x^2}{2}} - \cos(x) =_{x \rightarrow 0} \frac{x^4}{12} + o(x^4)
$$
Now because $sin(x) =_{x \rightarrow 0} x + o(x)$ then
$$ 
2 \sin( e^{\frac{-x^2}{2}} - \cos(x)) =_{x \rightarrow 0} \frac{x^4}{6} + o(x^4)
$$
And for the denominator:
$$
\sinh(x^2) =_{x \rightarrow 0} x^2 + o(x^2)
$$
$$
\arctan(x) =_{x \rightarrow 0} x + o(x)
$$
So:
$$
(\arctan(\sinh(x^2))^2 =_{x \rightarrow 0} x^4 + o(x^4)
$$
And thus:
$$
\frac{2 \sin( e^{\frac{-x^2}{2}} - \cos(x))}{(\arctan(\sinh(x^2))^2} =_{x \rightarrow 0} \frac{1}{6} + o(1)
$$
</s>