# A question regarding the chain rule for partial derivatives

Let $$f: \mathbb{R^2} \to \mathbb {R}$$ be a differentiable function and consider the function $$F:\mathbb{R^3}\to \mathbb{R}, F(x, y, z)=f(x^2-y+2yz^2, z^3e^{xy})$$. Compute $$\frac{\partial F}{\partial x}$$, $$\frac{\partial F}{\partial y}$$ and $$\frac{\partial F}{\partial z}$$ in terms of $$f$$'s first order partial derivatives.
I began by recognising that $$F=f\circ g$$, where $$g:\mathbb{R}^3 \to \mathbb{R^2}, g(x, y, z)=(x^2-y+2yz^2, z^3e^{xy})$$. Let's denote by $$u(x,y,z):=x^2-y+2yz^2$$ and $$v(x,y,z)=z^3e^{xy}$$ $$g$$'s components.
By the chain rule I know that $$\frac{\partial F}{\partial x}(x,y,z)=\frac{\partial f}{\partial u}(x^2-y+2yz^2, z^3e^{xy})\cdot \frac{\partial u}{\partial x}(x,y,z)+ \frac{\partial f}{\partial v}(x^2-y+2yz^2, z^3e^{xy})\frac{\partial v}{\partial x}(x,y,z)$$ and the same relations hold for $$\partial y$$ and $$\partial z$$, but I don't understand how/if I could further simplify $$\frac{\partial f}{\partial u}(x^2-y+2yz^2, z^3e^{xy})$$ and $$\frac{\partial f}{\partial v}(x^2-y+2yz^2, z^3e^{xy})$$. As far as I understand, these are the partials derivatives of $$f$$ with respect to the functions $$u$$ and $$v$$. How do I compute these?

• $\dfrac{\partial f}{\partial z}$ does not exist Aug 19 '20 at 18:10
• @Bernard yes, sorry, I have a typo, I will fix it now. Aug 19 '20 at 18:11
• I think that more of a confusion instead of a typo Aug 19 '20 at 18:12

To make things clearer, denote $$u$$ and $$v$$ the variables for $$f$$, where $$u=x^2-y+2yz^2,\qquad v=z^3\mathrm e^{xy}.$$

The chain rule asserts that \begin{align} \frac{\partial F(x,y,z)}{\partial x}&=\frac{\partial f(u,v )}{\partial u}\biggl|_{\substack{u=x^2-y+2yz^2\\v=z^3\mathrm e^{xy}}}\!\cdot \frac{\partial u(x,y,z)}{\partial x}+\frac{\partial f(u,v)}{\partial v}\biggl|_{\substack{u=x^2-y+2yz^2\\v=z^3\mathrm e^{xy}}}\!\cdot\frac{\partial v(x,y,z)}{\partial x} \\ &=\frac{\partial f(u,v)}{\partial u}\biggr|_{\substack{u=x^2-y+2yz^2\\v=z^3\mathrm e^{xy}}}\!\cdot 2x+\frac{\partial f(u,v)}{\partial v}\biggr|_{\substack{u=x^2-y+2yz^2\\v=z^3\mathrm e^{xy}}}\!\cdot yz^3\mathrm e^{xy} \end{align} and similarly for the other partial derivatives.

• Thanks! Just to be sure I get this right, if I actually had a formula for $\frac{\partial f(a,b)}{\partial a}$, $\forall (a,b) \in \mathbb{R}^2$, in order to compute $\frac{\partial f(u,v)}{\partial u}$ would I just need to plug in $u$ and $v$ into that formula? Aug 19 '20 at 18:39
• Yes, $u$ would replace $a$ and $v$ replace $b$. Aug 19 '20 at 18:41

If you use the chain rule for the derivative of $$multivariate$$ functions, you can read off the $$partial$$ derivatives. More precisely, following your idea, we have

$$F'(x_0,y_0,z_0)=(f\circ g)'(x_0,y_0,z_0)=f'(g(x_0,y_0,z_0))\circ g'(x_0,y_0,z_0).$$

In matrix form,

$$\begin{pmatrix} F_x(x_0,y_0,z_0) &F_y(x_0,y_0,z_0) &F_z (x_0,y_0,z_0) \end{pmatrix}=$$

$$\begin{pmatrix} f_x(g(x_0,y_0,z) & f_y(g(x_0,y_0,z_0) \end{pmatrix}\begin{pmatrix} 2x_0 &2z_0^2-1 & 2y_0z_0\\ y_0z_0^3e^{x_0y_0}& x_0z_0^3e^{x_0y_0} & 3z_0^2e^{x_0y_0} \end{pmatrix}$$

Now multilpy the matrices to read off the derivatives.