<s>[INST] Evaluating limits using Taylor expansions The limits are
$$\lim_{x\to 0}(\frac{\cos{x}-e^{-x^2/2}}{x^4})$$
$$\lim_{x\to 0}\frac{e^x\cdot\!\sin{x}-x(1+x)}{x^3}$$
Probably wrong things that I've tried
$\lim_{x\to 0}\frac{\cos{x}-e^{-x^2/2}}{x^4}=\lim_{x\to 0}(\frac{1-\frac{x^2}{2!}+\frac{x^4}{4!}+o(x^5)-1+\frac{x^2}{2}+\frac{x^4}{4}+o(x^4)}{x^4})$
$\lim_{x\to 0}\frac{e^x\cdot\!\sin{x}-x(1+x)}{x^3}=\lim_{x\to 0}\frac{(1+x+\frac{x^2}{2}+o(x^2))(x+o(x^2))-x-x^2)}{x^3}=\lim_{x\to 0}\frac{\frac{x^3}{2}+o(x^2)}{x^3}=1/2$
Could you please help me understand how these kinds of limits can be computed I keep getting all of them wrong and if this goes on for a little bit longer I may have a panic attack.
 [/INST] $$\forall\;x\in\Bbb R\;,\;\;\;e^x=\sum_{n=0}^\infty\frac{ x^n}{n!}=\implies e^{-x^2/2}=1-\frac{x^2}2+\frac{x^4}{4\cdot2!}-\ldots$$
and since
$$\cos x=1-\frac{x^2}2+\frac{x^4}{4!}-\ldots$$
we get
$$\cos x-e^{-x^2/2}=1-\frac{x^2}2+\frac{x^4}{24}-\ldots-\left(1-\frac{x^2}2+\frac{x^4}8-\ldots\right)=-\frac{x^4}{12}+\ldots$$
and thus
$$\lim_{x\to0}\frac{\cos x-e^{-x^2/2}}{x^4}=-\frac1{12}$$
The parts with "$\;\ldots\;$" mean there are powers of $\;x\;$ higher than $\;4\;$ , so at the limit those will cancel with $\;x^4\;$ in the denominator and all that part will tend to zero. Try to make this formal in your proof of the value of this limit, and attempt the other one in a simlar fashion.
</s>