Studying for my exam I came across this problem:
$$\lim _{x\to 0}\left(\frac{1-e^{x^2/2}\cdot\cos x}{x^4}\right) \\$$
In the answer they solve it by first expanding, when $t\to0$, $$e^t=1+t+\frac{t^2}{2}++O\left(t^3\right)$$ and when $x\to0$, $$e^{x^2/2}=1+\frac{x^2}{2}+\frac{x^4}{8}+O\left(x^6\right)$$ and $$\cos \left(x\right)=1-\frac{x^2}{2}+\frac{x^4}{24}+O\left(x^6\right)$$
Then we're supposed plug it in to the numerator to get
$$1-e^{x^2/2}\cos \left(x\right)=-\left(\frac{1}{8}-\frac{1}{4}+\frac{1}{24}\right)x^4+O\left(x^6\right)=\frac{1}{12}x^4+O\left(x^6\right)$$
and then divide by $x^4$ to be left with just $\frac{1}{12}$.
I don't understand what happens after we plug everything in to the numerator, however. There seems to have been some steps of simplifying as I can see the resemblance between the left-hand side and the right. Some explanation would be greatly appreciated.
Using the taylor series, they have found that:
$e^{\frac{x^2}{2}}=1+\frac{x^2}{2}+\frac{x^4}{8}+O\left(x^6\right), x\rightarrow 0$
$\cos \left(x\right)=1-\frac{x^2}{2}+\frac{x^4}{24}+O\left(x^6\right), x\rightarrow 0 \\$
Note that we can ignore the terms of $x$ which are higher powers when computing the limit as $x\rightarrow 0$, because they go to $0$ 'faster' than lower powers of $x$. We refer to them as 'dominant' terms.
So, we can consider the powers of $x$ up to $x^{4}$ and see what we get.
$e^{\frac{x^{2}}{2}}\cos x = (1+\frac{x^{2}}{2}+\frac{x^{4}}{8} + O(x^{6}))(1-\frac{x^{2}}{2}+\frac{x^{4}}{24} + O(x^{6}))$
We want to only consider the terms up to and including $x^{4}$
$e^{\frac{x^{2}}{2}}\cos x = 1 -\frac{x^{2}}{2} + \frac{x^{4}}{24} +\frac{x^{2}}{2} -\frac{x^{4}}{4} +\frac{x^{4}}{8} + O(x^{6})$
Then we get $1- e^{\frac{x^{2}}{2}}\cos x =1 -(1 -\frac{x^{2}}{2} + \frac{x^{4}}{24} +\frac{x^{2}}{2} -\frac{x^{4}}{4} +\frac{x^{4}}{8})$
$1- e^{\frac{x^{2}}{2}}\cos x = \frac{x^{4}}{12} + O(x^{6})$
Again, note that we don't care what the coefficient of the terms after $x^{4}$ are, since they will all tend to $0$ as $x\rightarrow 0$ much faster than $x^{4}$ will.
When you factorise the numerator you get the following:
$\frac{x^{4}(\frac{1}{12} + \frac{O(x^{6})}{x^{4}})}{x^{4}}$
Now by considering what happens when $x \rightarrow 0$, you can see that all terms after $\frac{1}{12}$ go to $0$, therefore the limit is $\frac{1}{12}$