Taylor Theorem for Two Variables

Consider approximating $z = f(x,y)$ by a quadratic polynomial of $x$ and $y$.
Aroximation
Note that the total differential is an approximation of the surface $z = f(x,y)$ at $(x_0, y_0)$ by the tangent plane. If we approximate the surface by the quadratic polynomial, we expect better approximation.
Let $f(x,y) = a_0 + a_1 x + a_2 y + a_3 x^2 + a_4 xy + a_5 y^2 + R_3$, where $R_3$ is an error term. Then find all 2nd order partial derivatives of $z = f(x,y)$. If $R_3$ is so small that we can neglect, then
$\displaystyle f(x,y)$ $\displaystyle =$ $\displaystyle a_0 + a_1 x + a_2 y + a_3 x^2 + a_4 xy + a_5 y^2$  
$\displaystyle f_{x}(x,y)$ $\displaystyle =$ $\displaystyle a_1 + 2a_3x + a_4y, f_{y}(x,y) = a_2 + a_4 x + 2a_5y$  
$\displaystyle f_{xx}(x,y)$ $\displaystyle =$ $\displaystyle a_3, f_{xy}(x,y) = a_4,  f_{yy}(x,y) = a_5.$  

Now put $x = 0, y = 0$. Then
$\displaystyle f(0,0)$ $\displaystyle =$ $\displaystyle a_0, f_x(0,0) = a_1, f_y(0,0) = a_2$  
$\displaystyle f_{xx}(0,0)$ $\displaystyle =$ $\displaystyle a_3, f_{xy}(0,0) = a_4,  f_{yy}(0,0) = a_5$  

Thus we can express all coefficients of $f$ by the 2nd order partial derivatives. Therefore,
$\displaystyle f(x,y)$ $\displaystyle =$ $\displaystyle a_0 + a_1 x + a_2 y + a_3 x^2 + a_4 xy + a_5 y^2$  
  $\displaystyle =$ $\displaystyle f(0,0) + f_{x}(0,0)x + f_{y}(0,0)y$  
  $\displaystyle +$ $\displaystyle f_{xx}(0,0)x^2 + f_{xy}(0,0)xy + f_{yy}(0,0)y^2$  

$\delta$ neighborhood
A $\delta$ neighborhood of $(x_0, y_0)$ is a set of $(x,y)$ such that $\vert(x-x_0,y-y_0)\vert < \delta$.

Partial Differential Operator
Let $h,k$ be constants, We define $h\frac{\partial }{\partial x} + k\frac{\partial }{\partial y}$ by
$(h\frac{\partial}{\partial x} + k\frac{\partial}{\partial y}) f(x_0,y_0) = h\frac{\partial f}{\partial x}(x_0,y_0) + k\frac{\partial f}{\partial y}(x_0,y_0)$.

Theorem 4..7   If $z = f(x,y)$ is the class $C^{n}$ in the $\delta$ neighborhood of $(x_{0},y_{0})$, then for $(x_{0} + h,y_{0}+k)$,
$\displaystyle f(x_{0} + h,y_{0}+k)$ $\displaystyle =$ $\displaystyle f(x_{0},y_{0}) + \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y} \right)f(x_{0},y_{0})$  
  $\displaystyle +$ $\displaystyle \frac{1}{2!} \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y} \right)^2 f(x_{0},y_{0}) + \cdots$  
  $\displaystyle +$ $\displaystyle \frac{1}{(n-1)!} \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y} \right)^{n-1} f(x_{0},y_{0}) + R_{n}$  

where,

$\displaystyle R_{n} = \frac{1}{n!}\left (h \frac{\partial}{\partial x} + k \fra...
...partial y} \right )^{n} f(x_{0} + \theta h,y_{0} + \theta k)  (0 < \theta < 1)$

$\displaystyle \left (h \frac{\partial}{\partial x} + k \frac{\partial}{\partial...
...+ k \frac{\partial}{\partial y} \right )^{m-1} f(x,y),   m = 2,3,\cdot \cdot $

NOTE Let $F(t) = f(x_{0} + h t, y_{0} + k t)  (0 \leq t \leq 1)$. Then $F(t)$ is the class $C^{n}$ in $t$. Thus by Maclausin theorem,

$\displaystyle F(t) = F(0) + \frac{1}{1!}F'(0)t + \frac{1}{2!}F''(0)t^2 + \cdots + \frac{1}{(n-1)!}F^{(n-1)}(0)t^{n-1} + R_{n}, $

$\displaystyle R_{n} = \frac{1}{n!}F^{(n)}(\theta t)t^n  (0 < \theta < 1). $

Thus for $t=1$,
$\displaystyle F1.$ $\displaystyle =$ $\displaystyle f(x_{0} + h, y_{0} + k) = f(x_{0},y_{0}) + \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y} \right)f(x_{0},y_{0})$  
  $\displaystyle +$ $\displaystyle \frac{1}{2!} \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y} \right)^2 f(x_{0},y_{0}) + \cdots$  
  $\displaystyle +$ $\displaystyle \frac{1}{(n-1)!} \left(h \frac{\partial}{\partial x} + k \frac{\partial}{\partial y} \right)^{n-1} f(x_{0},y_{0}) + R_{n}$  

Maclaurin Theorem
$f(x,y) = f(0,0) + xf_{x}(0,0) + yf_{y}(0,0) + \frac{1}{2}(x^2 f_{xx}(0,0) + 2xy...
... x} + y\frac{\partial}{\partial y})^{n-1}f(\theta x,\theta y) (0 < \theta < 1)$

Example 4..17   Given $f(x,y) = e^x \cos{y}$. Find the Taylor polynomial of 2nd degree at $(0,0)$.

By Maclaurin theorem, $f(x,y) = f(0,0) + xf_{x}(0,0) + yf_{y}(0,0) + \frac{1}{2}(x^2 f_{xx}(0,0) + 2xyf_{xy}(0,0) + y^2f_{yy}(0,0)) +R_3$s.

SOLUTION We first find all 2nd partial derivatives of $f(x,y) = e^x \cos y$. $f_{x} = e^x \cos{y}, f_{y} = e^x(-\sin{y}) = -e^x \sin{y}$, $f_{xx} = e^x \cos{y}$, $f_{xy} = -e^{x}\sin{y}$, $f_{yy} = -e^x \cos{y}$. Theorem4.7, let $x_0 = 0, y_0 = 0, x = h, y = k$. Then $f(0,0) = 1, f_{x}(0,0) = 1, f_{y}(0,0) = 0, f_{xx}(0,0) = 1, f_{xy}(0,0) = 0, f_{yy}(0,0) = -1$. Thus

$\displaystyle f(x,y)$ $\displaystyle =$ $\displaystyle f(0,0) + xf_{x}(0,0) + yf_{y}(0,0) + \frac{1}{2!}\left\{x^{2}f_{xx}(0,0)\right.$  
  $\displaystyle +$ $\displaystyle \left.2xyf_{xy}(0,0) + y^{2}f_{yy}(0,0) \right\} + R_{3}$  
  $\displaystyle =$ $\displaystyle 1 + x + \frac{1}{2!}\left\{x^2 - y^2\right\} + R_{3} \ensuremath{ \blacksquare}$  

Exercise4-16
Note that Taylor polynomial of 2nd degree of a function at $(\frac{\pi}{2},1)$ means expressing the function using $(x-\frac{\pi}{2})$ and $(y-1)$.

Exercise 4..17   Find the 2nd degree Taylor polynomial of $f(x,y) = \sin{xy}$ at $(\frac{\pi}{2},1)$.

SOLUTION $f_{x} = y\cos{xy}, f_{y} = x\cos{xy}, f_{xx} = -y^{2}\sin{xy}, f_{xy} = \cos{xy} -xy\sin{xy}, f_{yy} = -x^{2}\sin{xy}$. Thus in Theorem4.7, let $x = x_{0} + h = \frac{\pi}{2} + h$, $y = y_{0} + k = 1 + k$. Then

$\displaystyle f(x,y)$ $\displaystyle =$ $\displaystyle f(\frac{\pi}{2},1) + (x - \frac{\pi}{2})f_{x}(\frac{\pi}{2},1) + ...
...},1) + \frac{1}{2!}\left\{(x - \frac{\pi}{2})^{2}f_{xx}(\frac{\pi}{2},1)\right.$  
  $\displaystyle +$ $\displaystyle \left.2(x - \frac{\pi}{2})(y-1)f_{xy}(\frac{\pi}{2},1) + (y-1)^{2}f_{yy}(\frac{\pi}{2},1) \right\} + R_{3}$  
  $\displaystyle =$ $\displaystyle -\frac{1}{2!}\left\{(x - \frac{\pi}{2})^{2} - (x - \frac{\pi}{2})(y-1) - \frac{\pi^{2}}{4}(y-1)^{2}\right\} + R_{3} \ensuremath{ \blacksquare}$  

Proof By Taylor theorem, for $(x_{0} + h, y_{0} + k) \in D$, we have

$\displaystyle f(x_{0} + h,y_{0}+k)$ $\displaystyle =$ $\displaystyle f(x_{0},y_{0}) + hf_{x}(x_{0},y_{0}) + kf_{y}(x_{0} + y_{0})$  
  $\displaystyle +$ $\displaystyle \frac{1}{2}[h^2 f_{xx}(x_{0}+\theta h,y_{0}+\theta k) + 2hkf_{xy}(x_{0}+\theta h,y_{0}+\theta k)$  
  $\displaystyle +$ $\displaystyle k^2 f_{yy} (x_{0}+\theta h,y_{0}+\theta k)],  (0 < \theta < 1)$  

Now let $Q = f(x_{0} + h, y_{0} + k) - f(x_{0},y_{0})$. Then $f_{x}(x_{0},y_{0}) = f_{y}(x_{0},y_{0}) = 0$ and

$\displaystyle Q = \frac{1}{2}[h^2 f_{xx}(x_{0}+\theta h,y_{0}+\theta k) + 2hkf_...
...x_{0}+\theta h,y_{0}+\theta k) + k^2 f_{yy} (x_{0}+\theta h,y_{0}+\theta k) ]. $

Next let $A = f_{xx}(x_{0}+\theta h,y_{0}+\theta k), B = f_{xy}(x_{0}+\theta h,y_{0}+\theta k), C = f_{yy} (x_{0}+\theta h,y_{0}+\theta k)$. Then

$\displaystyle Q = \frac{1}{2}\left(Ah^2 + 2Bhk + Ck^2\right) = \frac{A}{2}\left[(h + \frac{Bk}{A})^2 + \frac{(AC - B^2)k^2}{A^2}\right]. $

Thus the sign of $Q$ is determinde by the sign of $A$ and the sign of $AC-B^2$.

1. If $\Delta = AC - B^2 > 0, A > 0$, then since $f(x,y)$ is the class $C^2$ function, for any $h,k$ such that $\vert h\vert,\vert k\vert$ is sufficiently small and never 0 simulteneously, we have $Q > 0$. Thus, $f(x_{0},y_{0})$ is a local minimum.

Check
$Q =$   positive$\big[$positive$+\frac{(\mbox{positive})\mbox{positive}}{\mbox{positive}}\big]$. Thus $Q > 0$.

2. If $\Delta = AC - B^2 > 0, A < 0$, then since $f(x,y)$ is the class $C^2$ func, for any $h,k$ such that $\vert h\vert,\vert k\vert$ is sufficiently small and never 0 simulteneously, we have $Q < 0$. Thus $f(x_{0},y_{0})$ is a local maximum.

Check
$Q =$   negative$\big[$positive$+\frac{(\mbox{positive})\mbox{positive}}{\mbox{positive}}\big]$. Thus $Q < 0$.

3. If $\Delta = AC - B^2 < 0$ and $A > 0$, then $C < 0$ which gives a saddle point. Similarly, if $\Delta < 0$ and $A < 0$, then $C > 0$ which give a saddle point. $ \blacksquare$

Example 4..18   Find the local extrema of the following function.

$\displaystyle f(x,y) = x^2 + xy + 3y^2 + x +y $

SOLUTION In Example4.16, we found the critical point. Now we check to see whether the function takes a local extremum at the critical point. Now by the 2nd derivative test,

$\displaystyle f_{xx}(x,y) = 2, f_{xy}(x,y) = 1, f_{yy}(x,y) = 6, \Delta = 11 $

Thus, $f(-\frac{5}{11}, -\frac{1}{11}) = -\frac{3}{11}$ is a local minimum. $ \blacksquare$

Exercise 4..18   Find the local extrema of th following function.

$\displaystyle f(x,y) = x^3 + y^3 - 3xy$

Check
Multiply the equation 4.1 by $y_0$ and multiply the equation 4.2 by $x_0$. Then subtract the latter one from the former one to obtain $3x_0^3 - 3y_0^3 = 0$. From this, we get $x_0 = y_0$ and put this back to the equation 4.1, then $3x_0^2 - 3x_0 = 3x_0(x_0 - 1) = 0$. Thus, $x_0 = 0,1$.

SOLUTION Let $f(x,y) = x^3 + y^3 - 3xy$. Then we have $f_{x} = 3x^2 - 3y, f_{y} = 3y^2 - 3x$. If $f(x,y)$ takes the local maxima at $(x_{0},y_{0})$, then

$\displaystyle f_{x}(x_{0},y_{0})$ $\displaystyle =$ $\displaystyle 3x_{0}^2 - 3y_{0} = 0$ (4.1)
$\displaystyle f_{y}(x_{0},y_{0})$ $\displaystyle =$ $\displaystyle 3y_{0}^2 - 3x_{0} = 0$ (4.2)

Solve this for $x_{0},y_{0}$. Then substitute the equation $y_{0} = x_{0}^2$, which is derived from the equation 4.1, to the equation 4.2. Then

$\displaystyle 3x_{0}^4 - 3x_{0} = 3x_{0}(x_{0}^3 - 1) = 0.$

Thus $x_{0} = 0, 1$. Hence, $(x_{0}=0,y_{0}=0), (x_{0}=1, y_{0} =1)$.

Now we apply the 2nd derivative test. Since $f_{xx}(x,y) = 6x, f_{xy}(x,y) = -3, f_{yy}(x,y) = 6y$, at $(0,0)$ we have

$\displaystyle \Delta = f_{xx}(0,0)f_{yy}(0,0) - (f_{xy}(0,0))^2 = -9 < 0.$

This shows that $f(0,0)$ is not extrema. Now at $(1,1)$, we have
$\displaystyle \Delta$ $\displaystyle =$ $\displaystyle f_{xx}(1,1)f_{yy}(1,1) - (f_{xy}(1,1))^2 = 6\cdot6 - (-3)^2 = 27 > 0$  
$\displaystyle A$ $\displaystyle =$ $\displaystyle f_{xx}(1,1) = 6 > 0.$  

Thus, $f(1,1) = 1 + 1 - 3 = -1$ is the local minimum $ \blacksquare$

Exercise A


1.
Find the 2nd degree Taylor polynomial of $f$ at $(a,b)$.D

(a) $\displaystyle{f(x,y) = x^{2}y, (a,b) = (1,1)}$ (b) $\displaystyle{f(x,y) = \cos{xy}, (a,b) = (1, \frac{\pi}{2}) }$

(c) $\displaystyle{f(x,y) = \log{(1 - x + y)}, (a,b) = (1,1)}$ (d) $\displaystyle{f(x,y) = xe^{2x+y}, (a,b) = (0,0)}$

2.
Find the local extrema of the following functions.

(a) $\displaystyle{f(x,y) = 2x - x^{2} - y^{2}}$ (b) $\displaystyle{f(x,y) = x^{2} - 6y^{2} + y^{3}}$

(c) $\displaystyle{f(x,y) = x^{3} - 3x + y}$ (d) $\displaystyle{f(x,y) = x^{2} + xy + y^{2} - 3x - 3y}$

Exercise B


1.
Find the local extrema of the following functionsD

(a) $\displaystyle{f(x,y) = 2x^2 + y^2 -xy - 7y}$ (b) $\displaystyle{f(x,y) = \frac{x}{y^2} + xy }$

(c) $\displaystyle{f(x,y) = x^3 + y^3 - 3xy}$ (d) $\displaystyle{f(x,y) = (x^2 + y^2)^2 - 2(x^2 - y^2)}$

2.
Find the 2nd degree Taylor polynomial of $f$ at $(a,b)$D

(a) $\displaystyle{f(x,y) = e^x \cos{y},  (a,b) = (0,0)}$

(b) $\displaystyle{f(x,y) = \log{(x + y^2)},  (a,b) = (2,1)}$