This may be a trivial question, but I've always wondered...
For the classical, central finite difference schemes, if I'm interested in determining the second derivative, does applying the first derivative scheme recursively (2x) give the same answer as performing the second derivative scheme once? What about the behavior of the truncation error?
I'm wondering if I should code a first-central FD and just call it recursively, or have a second-central FD separately to handle second derivatives. What are the differences and why choose one approach over the other?
The link I provided should help clarify my question.
EDIT: I'll be more explicit. If I go to the link above, I can choose a 3-point stencil which evaluates at $x_{i-1},x_0,x_{i+1}$. I have two options to calculate a second derivative.
Option 1: choose a first derivative central scheme, second order accurate, with coefficents $\{-1/2,0,1/2\}$. If I apply this recursively, I obtain the second derivative.
Option 2: choose a second derivative central scheme, second order accurate, with coefficients $\{1,-2,1\}$. I only have to apply this once to obtain the second derivative.
In the end, are they the same? I suspect the truncation errors are different, but I'm not sure.