Let $f$ be a function and we want to approximate $f$ using a different function $P$ near $x=0$. The error of approximation is $E(x)=f(x)-P(x)$. If the approximation is going to be any good, we want $\lim\limits_{x\rightarrow 0}E(x)=0$. In fact, we want $E(x)$ approaches $0$ fast as $x\rightarrow 0$
Definition for $good \ approximation$: we say that $P$ is a good approximation of order $n$ for $f$ near $x=0$ when $E(x)$ approaches $0$ faster than $h_n(x)=x^n$.
Definition for $approache\ 0\ faster$: Assume $\lim\limits_{x\rightarrow 0}f(x)=\lim\limits_{x\rightarrow 0}g(x)=0$. We say $\lim\limits_{x\rightarrow 0}f(x)$ approaches $0$ faster than $g(x)$, as $x\rightarrow 0$, when $\lim\limits_{x\rightarrow 0}\frac{f(x)}{g(x)}=0$.
How to prove $P(x)=1-\frac{x^2}{2}$ is a good approximation of order $3$ for $f(x)=\cos x$ near $x=0$?
Here is my try:
We have $E(x)=f(x)-P(x)=\cos x -1+\frac{x^2}{2}$. Since $E(x)$ and $x^3$ are continuous and $E(0)=0^3=0$, then $\frac{E(x)}{x^3}=\frac{\cos x -1+\frac{x^2}{2}}{x^3}=\frac{\frac{\cos x}{x^2}-\frac{1}{x^2}+\frac{1}{2}}{x}$. Clearly $\lim\limits_{x\rightarrow 0}\frac{E(x)}{x^3}=0$. I think we can conclude that $P$ is a good approximation as $E(x)$ approaches $0$ faster than $x^3$.
However I am sure the steps shouldn't be this simple. Could someone help?
Your mostly done already. The only jump in logic is the statement that
"Clearly $\lim\limits_{x\rightarrow 0}\frac{E(x)}{x^3}=0$."
This is not clear based on the previous line as the prior line if you were to plug in 0 would get you 0 over 0. You can deal with this by using L'Hospital's rule.
$\lim\limits_{x\rightarrow 0} \frac{E(x)}{x^3} = \lim\limits_{x\rightarrow 0} \dfrac{\frac{\cos x}{x^2} - \frac{1}{x^2} + \frac{1}{2}}{x}$
$= \lim\limits_{x\rightarrow 0} -\frac{x^2\sin x + 2x\cos x}{x^4} +\frac{2}{x^3} = \lim\limits_{x\rightarrow 0} \frac{2}{x^3} - \frac{x\sin x + 2\cos x}{x^3} = \lim\limits_{x\rightarrow 0} \frac{2-x\sin x -2\cos x}{x^3}$
Applying L'Hospital's rule a few more times and,
$\lim\limits_{x\rightarrow 0} -\frac{x\cos x + \sin x - 2\sin x}{3x^2} = \lim\limits_{x\rightarrow 0} -\frac{x\cos x - \sin x}{3x^2} = \lim\limits_{x\rightarrow 0} -\frac{\cos x - x\sin x - \cos x}{6x} =\lim\limits_{x\rightarrow 0} -\frac{\sin x}{6} = 0$
which completes the problem. In practice, you would normally just apply taylor's theorem assuming you know your function has enough derivatives (and $\cos x$ has as many derivatives as you can want).