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))
+ 1-
2[              ]
  x - a  y - bHf(a,b)[       ]
  x - a
  y - b

First compute all the derivatives:

∂f
---
∂x(x,y) = -2xe-(x2+y2)
∂f-
 ∂y(x,y) = -2ye-(x2+y2),
∂2f
---2
∂x(x,y) = (-2 + 4x2)e-(x2+y2)
  2
∂--f
 ∂y2(x,y) = (-2 + 4y2)e-(x2+y2)
 ∂2f
------
∂x ∂y(x,y) =  ∂2f
------
∂y ∂x(x,y) = 4xye-(x2+y2)

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

f(0, 0) = e0 = 1
∂2f-
∂x2(0, 0) = -2,
∂2f
----
∂y2(0, 0) = -2
 ∂2f
∂x∂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))
+ 1-
2[              ]
  x - 0  y - 0Hf(0, 0)[       ]
  x - 0
  y - 0
= 1 + (0, 0) (x,y) + 1
--
2[      ]
  x  y[ - 2    0 ]

    0  - 2[ x ]

  y
= 1 - x2 - y2

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

f(1, 2) = e-5
∂f
---
∂x(1, 2) = -2e-5
∂f-
∂y(1, 2) = -4e-5,
 2
∂-f-
∂x2(1, 2) = 2e-5
∂2f-
∂y2(1, 2) = 14e-5
  2
-∂-f--
∂x∂y(1, 2) =   2
-∂-f--
∂y ∂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)) + 1-
2[              ]
  x - 1  y - 2Hf(1, 2)[       ]
  x - 1
  y - 2
= e-5 + e-5(-2,-4) (x - 1,y - 2) + 1-
2[              ]
 x -  1  y - 2 [    -5     -5 ]
    2e    16e
  16e -5  14e-5[       ]
  x - 1
  y - 2
= 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)