Second order total differential definition unclear I'm studying a calculus course and I have a problem understanding the definition of the second order total differential:
\begin{align}
d^2f &= d(df) = d(\frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy) \\
&=\frac{\partial}{\partial x}\left (\frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy\right )dx + \frac{\partial}{\partial y}\left (\frac{\partial f}{\partial x}dx + \frac{\partial f}{\partial y}dy\right )dy \\
&= \left ( \frac{\partial^2 f}{\partial x^2}dx + \frac{\partial f}{\partial x}\frac{\partial }{\partial x}(dx)+\frac{\partial^2 f}{\partial x \partial y}dy+0 \right )dx+\left ( \frac{\partial^2 f}{\partial y \partial x}dx+0+\frac{\partial^2 f}{\partial y^2}dy + 0 \right )dy \\
&= \frac{\partial^2 f}{\partial x^2}dx^2+2\frac{\partial^2 f}{\partial x \partial y}dx dy + \frac{\partial^2 f}{\partial y^2}dy^2=\left ( \frac{\partial }{\partial x}(dx)+\frac{\partial }{\partial y}(dy) \right )^{"2"}f
\end{align}
I don't get where the zeros on the second line come from. On the same I also don't see where the $\frac{\partial f}{\partial x}\frac{\partial }{\partial x}(dx)$ term comes from and what it exactly means.
 A: Your two questions have the same answer.  To differentiate $ \frac { \partial f } { \partial x } \, \mathrm d x $ by the Product Rule, you differentiate $ \frac { \partial f } { \partial x } $ in one term and differentiate $ \mathrm d x $ in the other term.  When differentiating with respect to $ x $, this gives you both $ \frac { \partial ^ 2 f } { \partial x ^ 2 } \, \mathrm d x $ and $ \frac { \partial f } { \partial x } \frac { \partial ( \mathrm d x ) } { \partial x } $.  But $ \mathrm d x $ is independent of $ x $, so $ \frac { \partial ( \mathrm d x ) } { \partial x } = 0 $; that's why the second term disappears in the next line.  As you continue through the calculation, you also come to $ \frac { \partial ( \mathrm d y ) } { \partial x } $, $ \frac { \partial ( \mathrm d x ) } { \partial y } $, and $ \frac { \partial ( \mathrm d y ) } { \partial y } $, which are all also zero.  But this time, whoever wrote your book decided to just write $ 0 $ instead of writing these out.  So that's where the three $ 0 $s come from; of course, they also disappear in the next line.  (I don't know why the author chose to write it this way.  You could include all four partial derivatives of differentials explicitly, or write them all as $ 0 $, or leave them out entirely; or do all of these in successive lines.  But to write one of them out explicitly and the rest as $ 0 $ is just asking for readers to be confused, in my opinion.)
Finally, the ‘$ \frac \partial { \partial x } ( d x ) $’ in the last line is different from the one on the second line, which I discussed above.  The one on the last line is really $ \mathrm d x \frac \partial { \partial x } $, a differential operator which differentiates with respect to $ x $ and then multiplies by $ \mathrm d x $.  The sum of that and $ \mathrm d y \frac \partial { \partial y } $ is the total differential operator $ \mathrm d $, at least when applied to a function of only $ x $ and $ y $.  So this is the operator that you must apply twice to find $ \mathrm d ^ 2 f $.
