# Chain rule with higher derivatives.

Suppose $z = f(x,y)$, where $x = g(s,t)$ and $y = h(s,t)$. Find $\frac{∂^2z}{∂t^2}$.

I am at: $$\frac{∂^2z}{∂t^2} = \frac{∂}{∂t}\left(\frac{∂z}{∂x}\right)\frac{∂x}{∂t} + \frac{∂}{∂t}\left(\frac{∂x}{∂t}\right)\frac{∂z}{∂x} + \frac{∂}{∂t}\left(\frac{∂z}{∂y}\right)\frac{∂y}{∂t} + \frac{∂}{∂t}\left(\frac{∂y}{∂t}\right)\frac{∂z}{∂y}$$

Solution should be: $$\frac{∂^2z}{∂t^2} = \frac{∂^2z}{∂x^2}\left(\frac{∂x}{∂t}\right)^2 + 2\left(\frac{∂^2z}{∂x∂y}\right)\frac{∂x}{∂t}\frac{∂y}{∂t} + \frac{∂^2z}{∂y^2}\left(\frac{∂y}{∂t}\right)^2 + \frac{∂z}{∂x}\frac{∂^2x}{∂t^2} + \frac{∂z}{∂y}\frac{∂^2y}{∂t^2}$$

-
Edited for readability. My old eyes... – David Mitra Dec 9 '12 at 22:54
Thanks. I was wondering how to make it a bigger font too. Now I know. This fancy new LaTex thing... – cRaZiRiCaN Dec 9 '12 at 22:55
@David It's not just "old" eyes that have to squint to read some posts! – amWhy Dec 9 '12 at 23:02

You were at: $$\frac{∂^2z}{∂t^2} = \frac{∂}{∂t}\left(\frac{∂z}{∂x}\right)\frac{∂x}{∂t} + \frac{∂}{∂t}\left(\frac{∂z}{∂y}\right)\frac{∂y}{∂t} + \frac{∂z}{∂x}\frac{∂^2x}{∂t^2} + \frac{∂z}{∂y}\frac{∂^2y}{∂t^2}$$

The question at this point is, what is $\frac{∂}{∂t}\frac{∂z}{∂x}$? The point is that (thank you Leibniz notation) it is still true that $\frac{∂}{∂t} = \frac{∂x}{∂t}\frac{∂}{∂x} + \frac{∂y}{∂t}\frac{∂}{∂y}$, so applying this rule, we get:

$$\frac{∂^2z}{∂t^2} = \left(\frac{∂x}{∂t}\frac{∂}{∂x} + \frac{∂y}{∂t}\frac{∂}{∂y}\right)\left(\frac{∂z}{∂x}\right)\frac{∂x}{∂t} + \left(\frac{∂x}{∂t}\frac{∂}{∂x} + \frac{∂y}{∂t}\frac{∂}{∂y}\right)\left(\frac{∂z}{∂y}\right)\frac{∂y}{∂t} + \frac{∂z}{∂x}\frac{∂^2x}{∂t^2} + \frac{∂z}{∂y}\frac{∂^2y}{∂t^2}$$

$$\frac{∂^2z}{∂t^2} = \frac{∂x}{∂t}\frac{∂}{∂x}\left(\frac{∂z}{∂x}\right)\frac{∂x}{∂t} + \frac{∂y}{∂t}\frac{∂}{∂y}\left(\frac{∂z}{∂x}\right)\frac{∂x}{∂t} + \frac{∂x}{∂t}\frac{∂}{∂x}\left(\frac{∂z}{∂y}\right)\frac{∂y}{∂t} + \frac{∂y}{∂t}\frac{∂}{∂y}\left(\frac{∂z}{∂y}\right)\frac{∂y}{∂t} + \frac{∂z}{∂x}\frac{∂^2x}{∂t^2} + \frac{∂z}{∂y}\frac{∂^2y}{∂t^2}$$

$$\frac{∂^2z}{∂t^2} = \frac{∂^2z}{∂x^2}\left(\frac{∂x}{∂t}\right)^2 + 2\left(\frac{∂^2z}{∂x∂y}\right)\frac{∂x}{∂t}\frac{∂y}{∂t} + \frac{∂^2z}{∂y^2}\left(\frac{∂y}{∂t}\right)^2 + \frac{∂z}{∂x}\frac{∂^2x}{∂t^2} + \frac{∂z}{∂y}\frac{∂^2y}{∂t^2}$$

And that's it.

-

Well, let's examine one of your terms: $\displaystyle{\partial \over\partial t}{\partial z\over\partial x}$.

To perhaps simplify things, let $q=\displaystyle{\partial z\over\partial x}$. Note that $q$ is a function of $x$ and $y$; so to find $\displaystyle{{\partial q\over \partial t}} ={\partial\over\partial t}{\partial z\over\partial x}$, you just apply the chain rule as you did when computing the first partial of $z$: \eqalign{ {\partial\over\partial t}{\partial z\over\partial x} &={\partial q\over\partial t}\cr &={\partial q\over \partial x}{\partial x\over\partial t}+ {\partial q\over \partial y}{\partial y\over\partial t}\cr &={\partial^2 z\over \partial x^2} {\partial x\over \partial t}+{\partial z\over\partial x\partial y} {\partial y\over\partial t}.}

Similar computations are made to simplify the remaining partials in your partial (heh) answer. After that that a bit of algebraic simplification should get you where you want (it seems equality of mixed partials was assumed as well).

-
Is (∂/∂t)(∂z/∂x) equal to (∂z/∂t)(∂z/∂x)? – cRaZiRiCaN Dec 9 '12 at 23:34
@cRaZiRiCaN No, it's the partial derivative of $\partial z\over\partial x$ with respect to $t$. The notation $\partial z\over\partial x$ represents a function (in this case the partial of $z$ with respect to $x$). The notation $\partial\over\partial t$ represents an operator: it tells you to take the partial derivative of something else (in this case the partial of $z$ with respect to $x$). You compute this as I did above, using the chain rule. – David Mitra Dec 9 '12 at 23:42
I still do not understand how you went from $\frac{∂q}{∂x}\frac{∂x}{∂t} + \frac{∂q}{∂y}\frac{∂y}{∂t}$ to $\frac{∂^2z}{∂x^2}\frac{∂x}{∂t} + \frac{∂z}{∂x∂y}\frac{∂y}{∂t}$ Are there any intermediate steps? – cRaZiRiCaN Dec 10 '12 at 5:16
@cRaZiRiCaN It's just notation: for example, ${\partial q\over \partial x}={\partial\over \partial x} q ={\partial \over\partial x} {\partial z\over\partial x}={\partial^2 z\over\partial x^2}$. – David Mitra Dec 10 '12 at 12:16