p_{2}(x) = f(a) + Df(a)(x − a) + \frac{1}{2}(x − a)^{T} Hf(a)(x − a)

If f : R^{2} → R,

p_{2}(x, y) = f(a_{1}, a_{2}) + ( \frac{∂f}{∂x}(a_{1}, a_{2}) \frac{∂f}{∂y} (a_{1}, a_{2}) ) ( \begin{matrix}x − a_{1} \\ y − a_{2} \end{matrix} )

+\frac{1}{2}(x − a_{1}, y − a_{2}) ( \begin{matrix}\frac{∂^{2}f}{∂^{2}x}(a_{1}, a_{2}) & \frac{∂^{2}f}{∂y∂x}(a_{1}, a_{2}) \\ \frac{∂^{2}f}{∂y∂x}(a_{1}, a_{2}) & \frac{∂^{2}f}{∂^{2}y} (a_{1}, a_{2}) \end{matrix} ) ( \begin{matrix}x − a_{1} \\ y − a_{2} \end{matrix} )

f(a_{1}, a_{2}) + ( f_{x}(a_{1}, a_{2}) f_{y}(a_{1}, a_{2}) ) ( \begin{matrix}x − a_{1} \\ y − a_{2} \end{matrix} )

+\frac{1}{2}(x − a_{1}, y − a_{2}) ( \begin{matrix}f_{xx}(a_{1}, a_{2}) & f_{xy}(a_{1}, a_{2}) \\ f_{yx}(a_{1}, a_{2}) & f_{yy}(a_{1}, a_{2}) \end{matrix} ) ( \begin{matrix}x − a_{1} \\ y − a_{2} \end{matrix} )

= f(a_{1}, a_{2}) + ( f_{x} f_{y}) ( \begin{matrix}x − a_{1} \\ y − a_{2} \end{matrix} ) +\frac{1}{2}(x − a_{1}, y − a_{2}) ( \begin{matrix}f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{matrix} ) ( \begin{matrix}x − a_{1} \\ y − a_{2} \end{matrix} )

= f(a_{1}, a_{2}) + f_{x}[x − a_{1}] + f_{y}[y − a_{2}] +\frac{1}{2}(x − a_{1}, y − a_{2}) ( \begin{matrix}f_{xx}[x − a_{1}] + f_{xy}[y − a_{2}] \\ f_{yx}[x − a_{1}] + f_{yy}[y − a_{2}] \end{matrix} )

= f(a_{1}, a_{2}) + f_{x}[x − a_{1}] + f_{y}[y − a_{2}]

+\frac{1}{2}(f_{xx}[x − a_{1}]^{2} + f_{xy}[x − a_{1}][y − a_{2}] + f_{yx}[x − a_{1}][y − a_{2}] + f_{yy}[y − a_{2}]^{2})

= f(a_{1}, a_{2})+f_{x}[x−a_{1}]+f_{y}[y−a_{2}] +\frac{1}{2}(f_{xx}[x−a_{1}]^{2}+(f_{xy} +f_{yx})[x−a_{1}][y−a_{2}]+f_{yy}[y−a_{2}]^{2})

p_{2}(x, y) = f(a_{1}, a_{2}) + f_{x}(a_{1}, a_{2})[x − a_{1}] + f_{y}(a_{1}, a_{2})[y − a_{2}]

+\frac{1}{2}(f_{xx}(a_{1}, a_{2})[x − a_{1}]^{2} + (f_{xy} + f_{yx})(a_{1}, a_{2})[x − a_{1}][y − a_{2}] + f_{yy}(a_{1}, a_{2})[y − a_{2}]^{2})