# Multivariable Calculus - Chain rule - Partial derivatives computation

Suppose you are given that $f$ is a differentiable function of two variables $u$ and $v$. Let $g(r,s)=f(r^2-s^2, 2rs)$. Compute $\nabla g(r,s)$ in terms of $\partial f\over\partial u$, $\partial f\over\partial v$ and other functions.

I expressed $f$ as $f(u,v)=f(r^2-s^2, 2rs)$ and set $u=r^2-s^2$ and $v=2rs$. To calculate the gradient I did:

$$\nabla g(r,s)=\frac{\partial g}{\partial r}\mathbf i + \frac{\partial g}{\partial s}\mathbf j$$

From there:

$$=\left({\partial f\over\partial u}{\partial u\over\partial r}\right)\mathbf i + \left({\partial f\over\partial v}{\partial v\over\partial s}\right)\mathbf j$$

This is the step where I lost points but I can't seem to figure out where I went wrong.

In replacing $\frac{\partial g}{\partial r}$ with $\left({\partial f\over\partial u}{\partial u\over\partial r}\right)$, you are treating $f$ as if it were a function of $u$ alone, and similarly in replacing $\frac{\partial g}{\partial s}$ with $\left({\partial f\over\partial v}{\partial v\over\partial s}\right)$, you are treating $f$ as if it were a function of $v$ alone.
The correct formulas are:$$\frac{\partial g}{\partial r} = {\partial f\over\partial u}{\partial u\over\partial r} + {\partial f\over\partial v}{\partial v\over\partial r}\\\frac{\partial g}{\partial s} = {\partial f\over\partial u}{\partial u\over\partial s} + {\partial f\over\partial v}{\partial v\over\partial s}$$
• If I understand correctly: $g(r,s)=f(r^2-s^2,2rs)=f(u,v)$ Set $u=r^2-s^2$ and $v=2rs$ Branch diagram: f-->(u or v), u-->(r or s), v-->(r or s) Is my logical approach correct? – Omrane Dec 5 '15 at 22:15
• I have no clue what you mean by "Branch diagram: $f\ u\ v\ r\ s\ r\ s$". The rest is okay. But the problem is still that you overlooked the dependence of $f$ on $v$ when substituting for $\partial g\over\partial r$, and of $f$ on $u$ when substituting for $\partial g\over\partial s$ – Paul Sinclair Dec 5 '15 at 22:20