I have been having trouble coming up with an approximation formula for numerical differentiation (2nd derivative) of a function based on the truncation of its Taylor Series. I am not sure if the error is an algebraic one or otherwise.
I start of with the truncated Taylor series expanded about an arbitrary point a, which is derived from Taylor's theorem:
$f(a+h) = f(a) + h \cdot f'(a) + \frac { h^2 \cdot f''(a)}{2}$
The unknown is $f''(a)$, so let's switch the equation around:
$\frac{ h^2 \cdot f''(a) }{2} + h \cdot f'(a) + f(a) = f(a+h)$
Substracting $h \cdot f'(a) + f(a)$ from both sides, I get:
$\frac{f''(a)}{h^2}= f(a+h) - f(a) - h \cdot f'(a) $
Since h is small, I then substitute $f'(a)$ by the secant $\frac{( f(a+h) - f(a) )}{h}$ :
$ \frac { h^2 \cdot f'(a)}{2} = f(a+h) - f(a) - h \cdot \frac{( f(a+h) - f(a) )}{h} $
$ \frac { h^2 \cdot f'(a)}{2}$ = $f(a+h) - f(a)$ $-$ $f(a+h) + f(a)$ = 0
I thus end up with the confusing result that f''(a) = 0 for arbitrary values of a. Can anybody tell me what went wrong?