I'm asked to find the optimal $k$ such that $\cos{x}-1+x^2/2=O(x^k)\quad (x\to 0)$.
By Taylor's theorem I know that $\cos{x}-1+x^2/2=(1/4!)\xi^4$ for some $\xi\in (0,x)$. So $0<\cos{x}-1+x^2/2<(1/4!)x^4$, that is $\cos{x}-1+x^2/2=O(x^4)$.
My reasoning is as follows: if $0
Next I try to see whether $\cos{x}-1+x^2/2=O(x^{4+\delta})$:
$\frac{\cos{x}-1+x^2/2}{x^{4+\delta}}=\frac{1}{x^\delta}\frac{\cos{x}-1+x^2/2}{x^4}.$ But by repeated application of L'Hôpital's, $\lim_{x\to 0}\frac{\cos{x}-1+x^2/2}{x^4}=1/24,$ so $\displaystyle\lim_{x\to 0} \frac{\cos{x}-1+x^2/2}{x^{4+\delta}}=\infty$.
This seems to show that $x^4$ is indeed the optimal order.
So is all that correct? Also, $1/24=1/4!$, so surely that's not a coincidence, but I don't see how to arrive at that limit in a different way (I don't know how that $\xi$ above depends on $x$).