Para una función $f$ de $2$ variables $x,y$ su diferencial de primer orden es
$df = \frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy$
Obsérvese que esto puede verse como un operador lineal $d$ aplicada a la función $f$
$d(f) =(\frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy) f$
Aquí el operador $d$ es
$d = \frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy$
$d^2 = (\frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy)^2$
$ d^2 = (\frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy)(\frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy)$
$ d^2 = \frac{\partial^2}{\partial x^2} dx^2 + \frac{\partial^2}{\partial y^2} dy^2 + 2 \frac{\partial^2}{\partial x \partial y} dx dy$
Por lo tanto, la diferencial de segundo orden de $f$ es:
$d^2 f = \frac{\partial^2 f}{\partial x^2} dx^2 + \frac{\partial^2 f}{\partial y^2} dy^2 + 2 \frac{\partial^2 f}{\partial x \partial y} dx dy$
Ahora para $3$ variables $x,y,z$
$df = \frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy + \frac{\partial f}{\partial z} dz$
Obsérvese que esto puede verse como un operador lineal $d$ aplicada a la función $f$
$d(f) =(\frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy + \frac{\partial}{\partial z} dz) f$
Aquí el operador $d$ es
$d = \frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy + \frac{\partial}{\partial z} dz$
$d^2 = (\frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy + \frac{\partial}{\partial z} dz)^2$
$ d^2 = (\frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy + \frac{\partial}{\partial z} dz)^2)(\frac{\partial}{\partial x} dx + \frac{\partial}{\partial y} dy + \frac{\partial}{\partial z} dz)^2)$
$ d^2 = \frac{\partial^2}{\partial x^2} dx^2 + \frac{\partial^2}{\partial y^2} dy^2 + \frac{\partial f^2}{\partial z^2} dz^2 + 2 \frac{\partial^2}{\partial x \partial y} dx dy + 2 \frac{\partial^2}{\partial x \partial z} dx dz + 2 \frac{\partial^2}{\partial y \partial z} dy dz$
Por lo tanto, la diferencial de segundo orden de $f$ es:
$d^2 f = \frac{\partial^2 f}{\partial x^2} dx^2 + \frac{\partial^2 f}{\partial y^2} dy^2 + \frac{\partial f^2}{\partial z^2} dz^2 + 2 \frac{\partial^2 f}{\partial x \partial y} dx dy + 2 \frac{\partial^2 f}{\partial x \partial z} dx dz + 2 \frac{\partial^2 f}{\partial y \partial z} dy dz$
Del mismo modo, para $n$ variables $x_1,\dots,x_n$ es
$d^2 f = \sum_{i = 1}^{n} \frac{\partial^2 f}{\partial {x_i}^2} d{x_i}^2 + 2 \sum_{i = 1}^{n} \sum_{j = 1, j > i}^{n} \frac{\partial^2 f}{\partial x_i \partial x_j} dx_i dx_j$