Implicit differentiation of a trivariate function

148 Views Asked by At

In this post: Deriving the Formula of Total Derivative for Multivariate Functions, it is stated that the first derivative of a trivariate function $f(x,y(x),z(x))$ with respect to $x$ is $$\large \frac{df}{dx}=\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}\frac{dy}{dx}+\frac{\partial f}{\partial z}\frac{dz}{dx}$$ I have an implicit equation $f(x,y(x),z(x))=0$

As part of a calculation for $\frac{dy}{dx}$, I differentiate both sides. Doing this I get: $\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}\frac{dy}{dx}+\frac{\partial f}{\partial z}\frac{dz}{dx}=0$

which gives:

$\large\frac{dy}{dx}=-\frac{\frac{\partial f}{\partial x}+\frac{\partial f}{\partial z}\frac{dz}{dx}}{\frac{\partial f}{\partial y}}$

To make sure I have the correct expression, I check this with a simple example:

$f(x,y,z)=x+xy+yz-z^2=0$

where:

$y=2x$ ; $z=5x$

So:

$\frac{\partial f}{\partial x}=1+y$; $\frac{\partial f}{\partial y}=x+z$; $\frac{\partial f}{\partial z}=y-2z$; $\frac{dz}{dx}=5$

It is easy to solve $f(x,y,z)=x+xy+yz-z^2=0$ giving $x=\frac{1}{13}$, $y=\frac{2}{13}$ and $z=\frac{5}{13}$

So $\frac{dy}{dx}=-\frac{(1+y)+5(y-2z)}{x+z}=4.16666$, but we know it should be $2.0$.

Problem, so let's check the original equation:

Substituting into: $\frac{\partial f}{\partial x}+\frac{\partial f}{\partial y}\frac{dy}{dx}+\frac{\partial f}{\partial z}\frac{dz}{dx}$, I get:

$(1+y)+(x+z)*2+(y-2z)*5$ which equals $-1$, ie. not the $0$ I was expecting.

What am I missing?

1

There are 1 best solutions below

5
On BEST ANSWER

You shouldn't derive equation $f=0$. It's only the equation of point(s) which you need the derivative at it(them). You should drive $f$ to get $\frac{df}{dx}$ expression (as you did correctly). Beside it solve equation $f=0$ to get solution(s) $x=x_i$. Then compute $\frac{df}{dx}(x_i)$ to reach final answer(s).

Your Example:

Equation $f=0$ has only one solution that is the point $(\frac{1}{13},\frac{2}{13},\frac{5}{13})$. So it is fixed at that point and no function or variable change. Therefore there is nothing to drive! Since single point domain function doesn't support derivative!!