Computing the derivative of $f(x,\varphi(x))=0$ß

29 Views Asked by At

how can I compute the derivative of $f(x, \varphi(x))=0$ using the chain rule? I know that the chain rule says $D(f\circ g)=D_f(g(x))\circ Dg(x)$.

1

There are 1 best solutions below

0
On BEST ANSWER

I assume $x$ is a real numer. Let $h(x) = f(x,\phi(x))$ and $f:(x_1,x_2) \to f(x_1,x_2)$. The derivative of $h$ with respect to $x$ is the total derivative of $f$ with respect to $x$, then :

$$h'(x)=\frac{dh}{dx} = \frac{\partial f}{\partial x_1} + \frac{\partial \phi(x)}{\partial x} \frac{\partial f}{\partial \phi(x)}.$$

Nothing particular is done for the first variable $x_1$ since we plug $x$ as its value. But $x_2 = \phi(x)$, so the chain rule comes into play. We have :

$$\frac{\partial f}{\partial \phi(x)} = \frac{\partial f} {\partial x_2}.$$

Since $\phi$ only depends on $x$ :

$$ \frac{\partial \phi(x)}{\partial x} = \frac{d \phi(x)}{dx} = \phi'(x).$$

Finally :

$$\frac{dh}{dx}(x) = \frac{\partial f}{\partial x_1}(x,\phi(x)) + \phi'(x)\frac{\partial f}{\partial x_2}(x,\phi(x)).$$

From a Jacobian matrix point of view, if we let $g(x) = (x,\phi(x))$ and $h = f(g(x))$

$Dg(x) = \begin{bmatrix}1 \\ \phi'(x) \end{bmatrix}$ and $Df(g(x))=\begin{bmatrix} \frac{\partial f}{\partial x_1}(g(x)) & \frac{\partial f}{\partial x_2}(g(x)) \end{bmatrix}$.

Then, as a matrix multiplication :

$$h'(x) =Df(g(x)) Dg(x) = \frac{\partial f}{\partial x_1}(g(x)) + \phi'(x) \frac{\partial f}{\partial x_2}(g(x)) $$

And we landed back on our feets.