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.
 A: You have$$e^x\sin(x)=x+x^2+\frac{x^3}3+o(x^3),$$and therefore$$\lim_{x\to0}\frac{e^x\sin(x)-x-x^2}{x^3}=\frac13.$$
A: The first rule is that, when you use Taylor's expansion, you use it at the same order for all terms. The second rule is that, when you have a product of expansions, or a composition, you expand it with the usual rules for polynomials, and truncate the result at the chosen order.
I'll start it for the first example, for which you had an error in the expansion of the exponential. We'll expand at order $4$:
\begin{align}
\cos x- \mathrm e^{-x^2/2}
&=1-\frac{x^2}2+\frac{x^4}{24}+o\bigl(x^4\bigr)-\Bigl(1-\frac{x^2}2+\frac{x^4}8+o\bigl(x^4\bigr)\Bigr)\\
&=\frac{x^4}{24}-\frac{x^4}8+o\bigl(x^4\bigr)=-\frac{x^4}{12}+o\bigl(x^4\bigr)
\end{align}
A: The first limit is straightforward as one can write the Taylor series for $\cos x$ and $e^{-x^2/2}$ directly from memory without any calculations.
For the second one it is better to rewrite the expression as $$e^x\cdot \frac{\sin x-x} {x^3}+\frac{e^x-1-x}{x^2}$$ and now we can see that desired limit is $1\cdot(-1/6)+(1/2)=1/3$.
In general one should avoid multiplication, division and composition of two Taylor series and instead focus on algebraic simplification of the expression under limit. In other words try to get coefficients of Taylor series from memory instead of calculating them.
A: $$\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.
