Derivation of the second total derivative of a function

multivariable-calculuspartial derivative

Let there be a function $f$ of two variables $x$ and $y$ who are dependent on a single variable $t$. I tried to derive the second order total derivative of f, $\frac{df}{dt}$

Before asking this, I have checked the topic Intuition behind second total derivative
Here the poster is not asking how to derive it, they want to get the intuition behind it. Here, I have a problem deriving that six-term expression.

So, the first total derivative is
$\frac { \mathrm d f } { \mathrm d t } = \frac { \partial f } { \partial x } \frac { \mathrm d x } { \mathrm d t } + \frac { \partial f } { \partial y } \frac { \mathrm d y } { \mathrm d t } $

and the second total derivative is

$\frac{\mathrm d}{\mathrm d t }(\frac { \mathrm d f } { \mathrm d t }) =\frac{\mathrm d}{\mathrm d t }( \frac { \partial f } { \partial x } \frac { \mathrm d x } { \mathrm d t }) + \frac{\mathrm d}{\mathrm d t }(\frac { \partial f } { \partial y } \frac { \mathrm d y } { \mathrm d t } )$

Applying the product rule to two terms to the right of equal sign:

$\frac { \mathrm d ^ 2 f } { \mathrm d t ^ 2 }$=$(\frac{\mathrm d}{\mathrm d t } \frac { \partial f } { \partial x })\frac { \mathrm d x } { \mathrm d t }+\frac { \partial f } { \partial x }\frac{\mathrm d}{\mathrm d t }\frac { \mathrm d x } { \mathrm d t }+(\frac{\mathrm d}{\mathrm d t } \frac { \partial f } { \partial y })\frac { \mathrm d y } { \mathrm d t }+\frac { \partial f } { \partial y }\frac{\mathrm d}{\mathrm d t }\frac { \mathrm d y } { \mathrm d t }$

and then:

$\frac { \ d ^ 2 f } { \mathrm d t ^ 2 }=\frac { \partial ^2f } { \partial x ^ 2 }\frac { \mathrm d x } { \mathrm d t }\frac { \mathrm d x } { \mathrm d t }+\frac { \partial f } { \partial x }\frac { \mathrm d^2 x } { \mathrm d t^2 }+\frac { \partial ^ 2 f } { \partial y ^ 2 }\frac { \mathrm d y } { \mathrm d t }\frac { \mathrm d y } { \mathrm d t }+\frac { \partial f } { \partial y }\frac { \mathrm d^2 y } { \mathrm d t^2 }$

Finally:

$\frac { \mathrm d ^ 2 f } { \mathrm d t ^ 2 }=\frac { \partial ^ 2 f } { \partial x ^ 2 } ( \frac { \mathrm d x } { \mathrm d t } ) ^ 2 +\frac { \partial f } { \partial x }\frac { \mathrm d^2 x } { \mathrm d t^2 }+\frac { \partial ^ 2 f } { \partial y ^ 2 } ( \frac { \mathrm d y } { \mathrm d t } ) ^ 2+\frac { \partial f } { \partial y }\frac { \mathrm d^2 y } { \mathrm d t^2 }$

However, the correct expression is

$\frac { \mathrm d ^ 2 f } { \mathrm d t ^ 2 } = \frac { \partial ^ 2 f } { \partial x ^ 2 } ( \frac { \mathrm d x } { \mathrm d t } ) ^ 2 + \frac { \partial ^ 2 f } { \partial y \, \partial x } \frac { \mathrm d y } { \mathrm d t } \frac { \mathrm d x } { \mathrm d t } + \frac { \partial f } { \partial x } \frac { \mathrm d ^ 2 x } { \mathrm d t ^ 2 } + \frac { \partial ^ 2 f } { \partial x \, \partial y } \frac { \mathrm d x } { \mathrm d t } \frac { \mathrm d y } { \mathrm d t } + \frac { \partial ^ 2 f } { \partial y ^ 2 } ( \frac { \mathrm d y } { \mathrm d t } ) ^ 2 + \frac { \partial f } { \partial y } \frac { \mathrm d ^ 2 y } { \mathrm d t ^ 2 } $

I am missing $\frac { \partial ^ 2 f } { \partial y \, \partial x } \frac { \mathrm d y } { \mathrm d t } \frac { \mathrm d x } { \mathrm d t }$ and $\frac { \partial ^ 2 f } { \partial x \, \partial y } \frac { \mathrm d y } { \mathrm d t } \frac { \mathrm d x } { \mathrm d t }$

Where do these two terms come from?

Best Answer

I'm confused about your comment ‘the first and third terms again need the product rule’; if you used the product rule on them, then they would again split into two terms each, and you'd have your six terms total. They're not products, so they don't really need the product rule; however, they do need another rule that splits things into two terms each, which is the rule for the total derivative.

Specifically, just as $$ \frac { \mathrm d } { \mathrm d t } f = \frac { \partial } { \partial x } f \cdot \frac { \mathrm d x } { \mathrm d t } + \frac { \partial } { \partial x } f \cdot \frac { \mathrm d y } { \mathrm d t } $$ in the first total derivative, so $$ \frac { \mathrm d } { \mathrm d t } \biggl ( \frac { \partial f } { \partial x } \biggr ) = \frac { \partial } { \partial x } \biggl ( \frac { \partial f } { \partial x } \biggr ) \cdot \frac { \mathrm d x } { \mathrm d t } + \frac { \partial } { \partial y } \biggl ( \frac { \partial f } { \partial x } \biggr ) \cdot \frac { \mathrm d y } { \mathrm d t } $$ in the first of your four terms for the second total derivative, and similarly in your third term. This is where you get the additional terms with the mixed second partial derivatives.

It's also worth noticing that (as long as $ f $ is twice differentiable as a function of $ x $ and $ y $) these two terms are equal, so they can now be combined into a single term.

Related Question