Talyor polynomial example

Calculate the second-degree Taylor polynomial of

f (x, y) = e-(x2+y2)    

at the point (0, 0) and at the point (1, 2)

Solution: The second-degree Taylor polynomial at the point (a, b) is

p2(x, y) = f (a, b) + Df (a, b) . ((x, y) - (a, b)) + $\displaystyle {\frac{{1}}{{2}}}$$\displaystyle \left[\vphantom{ \begin{array}{cc} x-a &y-b \end{array} }\right.$$\displaystyle \begin{array}{cc} x-a &y-b \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{cc} x-a &y-b \end{array} }\right]$Hf (a, b)$\displaystyle \left[\vphantom{ \begin{array}{c} x-a  y-b \end{array} }\right.$$\displaystyle \begin{array}{c} x-a  y-b \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{c} x-a  y-b \end{array} }\right]$    

First compute all the derivatives:

$\displaystyle {\frac{{\partial f}}{{\partial x}}}$(x, y) = - 2xe-(x2+y2)    
$\displaystyle {\frac{{\partial f}}{{\partial y}}}$(x, y) = - 2ye-(x2+y2),    
$\displaystyle {\frac{{\partial^{2} f}}{{\partial x^{2}}}}$(x, y) = (- 2 + 4x2)e-(x2+y2)    
$\displaystyle {\frac{{\partial^{2} f}}{{\partial y^{2}}}}$(x, y) = (- 2 + 4y2)e-(x2+y2)    
$\displaystyle {\frac{{\partial^2 f}}{{\partial x \partial y}}}$(x, y) = $\displaystyle {\frac{{\partial^2 f}}{{\partial y \partial x}}}$(x, y) = 4xye-(x2+y2)    

At the point (a, b) = (0, 0)

f (0, 0) = e0 = 1    
$\displaystyle {\frac{{\partial^{2} f}}{{\partial x^{2}}}}$(0, 0) = - 2,    
$\displaystyle {\frac{{\partial^{2} f}}{{\partial y^{2}}}}$(0, 0) = - 2    
$\displaystyle {\frac{{\partial^2 f}}{{\partial x \partial y}}}$(0, 0) = 0    

The second-degree Taylor polynomial at the point (0,0) is

p2(x, y) = f (0, 0) + Df (0, 0) . ((x, y) - (0, 0))    
           + $\displaystyle {\frac{{1}}{{2}}}$$\displaystyle \left[\vphantom{ \begin{array}{cc} x-0 &y-0 \end{array} }\right.$$\displaystyle \begin{array}{cc} x-0 &y-0 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{cc} x-0 &y-0 \end{array} }\right]$Hf (0, 0)$\displaystyle \left[\vphantom{ \begin{array}{c} x-0  y-0 \end{array} }\right.$$\displaystyle \begin{array}{c} x-0  y-0 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{c} x-0  y-0 \end{array} }\right]$    
  = 1 + (0, 0) . (x, y) + $\displaystyle {\frac{{1}}{{2}}}$$\displaystyle \left[\vphantom{ \begin{array}{cc} x &y \end{array} }\right.$$\displaystyle \begin{array}{cc} x &y \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{cc} x &y \end{array} }\right]$$\displaystyle \left[\vphantom{ \begin{array}{rr} -2 & 0 0 & -2 \end{array} }\right.$$\displaystyle \begin{array}{rr} -2 & 0 0 & -2 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{rr} -2 & 0 0 & -2 \end{array} }\right]$$\displaystyle \left[\vphantom{ \begin{array}{c} x y \end{array} }\right.$$\displaystyle \begin{array}{c} x y \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{c} x y \end{array} }\right]$    
  = 1 - x2 - y2    

At the point (a, b) = (1, 2), things get uglier. But it is good practice.

f (1, 2) = e-5    
$\displaystyle {\frac{{\partial f}}{{\partial x}}}$(1, 2) = - 2e-5    
$\displaystyle {\frac{{\partial f}}{{\partial y}}}$(1, 2) = - 4e-5,    
$\displaystyle {\frac{{\partial^{2} f}}{{\partial x^{2}}}}$(1, 2) = 2e-5    
$\displaystyle {\frac{{\partial^{2} f}}{{\partial y^{2}}}}$(1, 2) = 14e-5    
$\displaystyle {\frac{{\partial^2 f}}{{\partial x \partial y}}}$(1, 2) = $\displaystyle {\frac{{\partial^2 f}}{{\partial y \partial x}}}$(1, 2) = 16e-5    

The second-degree Taylor polynomial at the point (1,2) is

  p2(x, y) = f (1, 2) + Df (1, 2) . ((x, y) - (1, 2)) + $\displaystyle {\frac{{1}}{{2}}}$$\displaystyle \left[\vphantom{ \begin{array}{cc} x-1 &y-2 \end{array} }\right.$$\displaystyle \begin{array}{cc} x-1 &y-2 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{cc} x-1 &y-2 \end{array} }\right]$Hf (1, 2)$\displaystyle \left[\vphantom{ \begin{array}{c} x-1  y-2 \end{array} }\right.$$\displaystyle \begin{array}{c} x-1  y-2 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{c} x-1  y-2 \end{array} }\right]$    
       = e-5 + e-5(- 2, -4) . (x - 1, y - 2) + $\displaystyle {\frac{{1}}{{2}}}$$\displaystyle \left[\vphantom{ \begin{array}{cc} x-1 &y-2 \end{array} }\right.$$\displaystyle \begin{array}{cc} x-1 &y-2 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{cc} x-1 &y-2 \end{array} }\right]$$\displaystyle \left[\vphantom{ \begin{array}{rr} 2 e^{-5} & 16 e^{-5} 16 e^{-5} & 14 e^{-5} \end{array} }\right.$$\displaystyle \begin{array}{rr} 2 e^{-5} & 16 e^{-5} 16 e^{-5} & 14 e^{-5} \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{rr} 2 e^{-5} & 16 e^{-5} 16 e^{-5} & 14 e^{-5} \end{array} }\right]$$\displaystyle \left[\vphantom{ \begin{array}{c} x-1  y-2 \end{array} }\right.$$\displaystyle \begin{array}{c} x-1  y-2 \end{array}$$\displaystyle \left.\vphantom{ \begin{array}{c} x-1  y-2 \end{array} }\right]$    
       = e-5 - e-5(2(x - 1) + 4(y - 2)) + e-5(x - 1)2 + e-516(x - 1)(y - 2) + e-57(y - 2)2    
       = e-5(1 - 2(x - 1) - 4(y - 2) + (x - 1)2 +16(x - 1)(y - 2) + 7(y - 2)2)    



Duane Nykamp
nykamp@math.umn.edu
2005-11-29