# Chain rule for multivariable calculus.

I can't seem to figure out this problem.

We let s and p be real functions that are twice continuously differentiable. And we define r and f such that: $$r =r(x,y,z) = \sqrt{x^2+y^2+z^2}$$ and $$f(x,y,z,t) = \frac{1}{r}( \ p (r-ct) + s(r+ct) \ )$$ We need to show that $\frac{\partial^2f}{\partial t^2} = c^2(\frac{\partial^2f}{\partial x^2} + \frac{\partial^2f}{\partial y^2} + \frac{\partial^2f}{\partial z^2})$

I know that we have to use the chain rule, so I tried finding functions g and h so that $f = g \circ h$ but I can't seem to do so. Any tips to how I can understand this problem?

• You don't need to write that f is a composition, just that when encountering each term you use appropriate rules, also are s and p real functions of how many of the variables? Is $s=s(x,y,z)$ And likewise for p? – Triatticus May 26 '17 at 13:55
• @Triatticus I thought that it was necessary to know the composition for the chain rule. How can you use the chain rule if you don't know the exact functions? s and p are functions of 4 variables x,y,z and t. – K.Kamal May 26 '17 at 14:15
• Well there wouldn't be a unique way of setting it up, for instance you need the chain rule to evaluate $r^{-1}$ which appears out front. Also now that I mention are the parentheses for s and p the arguments of those functions? Because that's a chain rule right there. As in $p(r(x,y,z) - c t)$ – Triatticus May 26 '17 at 14:17

As Triatticus said, all you need is a straightforward application of the chain rule without needing to introduce any extraneous functions to define $f$.

HINT: I would define $u=r+ct$ and $v=r-ct$ so that you have terms like $\frac{\partial p}{\partial t}=c\frac{\partial p}{\partial u}$ and $\frac{\partial p}{\partial x}=\frac{\partial p}{\partial u}\frac{\partial r}{\partial x}$, etc etc and then you can collect terms with the partial derivatives of $p$ and $s$ with respect to $u$ and $v$ to simplify your algebra.

You're being asked in essence to derive the wave equation in 3 spatial dimensions.

Here is a hint on how to proceed:

The first term of $f$ is:

$$f(x,y,z,t) = \frac{p(r(x,y,z) - c t )}{r(x,y,z)}$$

We differentiate both sides with respect to t first:

$$\frac{\partial f}{\partial t} = \frac{\partial}{\partial t}\frac{p(r(x,y,z) - c t )}{r(x,y,z)} = \frac{r \frac{\partial p}{\partial t} - p \frac{\partial r}{\partial t}}{r^2}$$

Here is where the chain rule comes into play:

$$\frac{\partial p(r(x,y,z)-ct))}{\partial t} = \frac{\partial p(r(x,y,z)-ct)}{\partial (r(x,y,z)-ct)}\frac{\partial (r(x,y,z)-ct)}{\partial t}$$

This is in spirit of the chain rule since $$\frac{\partial}{\partial x} f (g(x,y,z)) = \frac{\partial f}{\partial g}\frac{\partial g}{\partial x}$$

The spatial derivatives are computed similarly, you just need to know if the spatial variables are dependent on t, if not the derivative of r is zero with respect to t: $\dfrac{\partial r}{\partial t} = 0$.

For a hint on the spatial part (we need the second derivatives w.r.t. each variable):

$$\frac{\partial f}{ \partial x} = \frac{r \frac{\partial p}{\partial x} - p \frac{\partial r}{\partial x}}{r^2}$$

Where

$$\frac{\partial p(r- ct)}{\partial x} = \frac{\partial p(r-ct)}{\partial (r-ct)}\frac{\partial (r-ct)}{\partial x}$$

Once you are done with all derivatives you should see that the equation orginaly given is satisfied.