
so that

For a function
, we have by the chain rule,

and


Let
and
. This substitution is made just to make the application of the chain rule clearer.

Differentiating again wrt
gives

By the chain rule,

and our substitution shows that, for instance,

and so

Similarly, we find

Putting everything together, we have

and we can similarly find that

Adding together these derivatives, we see the mixed partials cancel, and recalling that
, we end up with

as required.