# Calculation of $\frac{\partial^2 g(f) }{\partial x_1 \partial x_2}$

Let $f : \mathbb R^2 \to \mathbb R$. $g : \mathbb R \to \mathbb R$. Assume that all partial derivatives exist. Then is this statement right? $$\frac{\partial^2 g\circ f }{\partial x_1 \partial x_2} = \frac{\partial}{\partial x_1} \left( \frac{\partial g}{\partial f} \frac{\partial f}{\partial x_2} \right) = \frac{\partial g}{\partial f} \frac{\partial^2 f}{\partial x_1 \partial x_2} + \frac{\partial^2 g}{\partial f^2} \frac{\partial f}{\partial x_1} \frac{\partial f}{\partial x_2}$$

-
Be careful: what is $\partial g / \partial f$? – Siminore Jul 1 '12 at 12:02
@Siminore: its just the derivative of $g$. – Michael Jul 1 '12 at 12:08
@Miau: yes that is right – Michael Jul 1 '12 at 12:09

While the equation is in principle correct the notation you are using is kind of unusual (I did see it before, though), which may cause irritations, as you may infer from Siminore's comment. I'd prefer (abbreviating $x=(x_1, x_2))$ one (any) of the following:
$$\frac{\partial^2 (g(f(x)))}{\partial x_1 \partial x_1} = \frac{\partial^2 (g\circ f)}{\partial x_1 \partial x_1} (x)$$
for the left hand side of your identity and assuming $g=g(u)$ $$\frac{dg}{du}(f(x))\frac{\partial^2 f(x)}{\partial x_1 \partial x_1} + \frac{d^2g}{du^2}(f(x)) \frac{\partial f(x)}{\partial x_1} \frac{\partial f(x)}{\partial x_2}$$ or $$g^{\prime}(f(x))\frac{\partial f^2}{\partial x_1 \partial x_1} (x)+ g^{\prime \prime}(f(x)) \frac{\partial f}{\partial x_1}(x) \frac{\partial f}{\partial x_2} (x)$$ for the right hand side. However only if $g$ depends only on one variable. In that case $\frac{\partial g}{\partial u}$ is not wrong but not common. There are other notation conventions in use.