for a function $f(x)=e^{2x}-\cos(2x)$,
at grid points $x \in {-0.3,-0.2,-0.1,0}$
I perform a central difference for the derivative at $x=-0.2$
$$\frac{df}{dx}=\frac{f(-0.1)-f(-0.3)}{2*(-0.1--0.3)}=0.28795$$ The derivative of this function (per mathematica) is $0.561803$ So the error is $$Abs[0.561803-0.28795]=0.273853$$
I have a formula for the upper bound of the error, and that formula is $$\frac{M^*\Delta x^2}{3!}=\frac{8*(-0.1--0.3)}{6}=0.0533333\\\text{Where }M^*=\text{Max}(f''(x)|x\in[-0.3,0])=f(0)=8$$
The issue is the error, $0.27$, is greater than the supposid error bound, $0.05$. When I graph this function with its central difference though, it looks correct.
Any idea why my derivatives are higher than the upper bound? The error does seem pretty high.

I got the formula from someone else's notes! I couldn't find it with a google search hahaha.
– Frank Dec 01 '18 at 00:04