sorry for the very basic question. I am writing a Fortran program in which I have a quite complicated function in a non-linear system of equations and I need to differentiate it numerically in order to get a member of the Jacobian for solving the system with the Newton-Raphson method. The question is... being a composite function like
$$g(f(x))$$
is the numerical derivative (central difference formula) simply:
$$ \dfrac{\partial g(f(x))}{\partial x} = \dfrac{g(f(x+h)) - g(f(x-h))}{2h}$$
?
Do I need to change this formula according to the chain rule?
Regards.