I have a trivariate implicit function: $f(x,y,z)=0$ or in more detail: $f(x,y(x),z(x,y(x))=0$
I have the implicit equation for $f(x,y,z)$ and explicit equation for $z(x,y)$, hence I can evaluate the analytical derivatives. To solve, for any given $x$, I iterate using Newton-Raphson to find $y$.
I am trying to find $\frac{d^2z}{dx^2}$.
I tried to expand this post Second derivative of function of two variables to three variables but the extra $z$ is proving a little tricky.
I started off with:
$\frac{df}{dx}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}.\frac{dy}{dx}+\frac{\partial f}{\partial z}.\frac{dz}{dx}$
from this post: Deriving the Formula of Total Derivative for Multivariate Functions
Which I guess is correct if $z$ is not a function of $y$.
But I don't think this is correct if $z$ is a function of $y$ as well as the $\frac{dz}{dx}$ I get from this is not the same as the derivative calculated numerically. So before I use this to calculate $\frac{d^2z}{dx^2}$, I need to get the first derivative correct.
Can someone help with the formula?
if $\frac{df}{dx}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}.\frac{dy}{dx}=0$,
but $\frac{df}{dx}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}.\frac{dy}{dx}+\frac{\partial f}{\partial z}.\frac{dz}{dx}=0$, ie. we have an extra $z$ term
– Adrian Oct 28 '19 at 13:01