# 3rd order, multi variable taylor polynomial

1. Nov 22, 2006

### chy1013m1

any insight to this question? .. i mean.. usually people just do up to order 2..

find the taylor polynomial of order 3 based at (x, y) = (0, 0) for the function f(x, y) = (e^(x-2y)) / (1 + x^2 - y)

how large do you have to take k so that the kth order taylor polynomial f about (0, 0) approximates f within 0.45 for
|x| < sqrt(x^2 + y^2) <= 1/10

my guess is...3rd order.. otherwise they won't be explicitly asking us to for the 3rd order?

Last edited: Nov 22, 2006
2. Nov 24, 2006

### benorin

The taylor series expansion of a function $$f(x,y)$$ about the point $$(x_0,y_0)$$ is given by

$$f(x,y)=\sum_{n=0}^{\infty}\sum_{k=0}^{\infty}\frac{\partial ^{n}f (x_0,y_0)}{\partial x^{n}}\cdot\frac{\partial ^{k}f (x_0,y_0)}{\partial y^{k}}\cdot\frac{(x-x_0)^{n}}{n!}\cdot\frac{(y-y_0)^{k}}{k!}$$​

notice that to obtain the third order Taylor polynomial, we need only sum over $$n+k\leq 3$$

We have need of some calculations...

$$f(x,y)=\frac{e^{x-2y}}{(1+x^2-y)^2}$$
$$\Rightarrow f(0,0)=1$$

$$f_{x}(x,y)=e^{x-2y}\frac{1-2x+x^2-y}{(1+x^2-y)^2}$$
$$\Rightarrow f_{x}(0,0)=1$$

$$f_{xx}=e^{x-2y}\frac{-1-4x+8x^2-4x^3+x^4+4xy-2x^2y+y^2}{(1+x^2-y)^3}$$
$$\Rightarrow f_{xx}(0,0)=-1$$

$$f_{xxx}(x,y)=e^{x-2y}\frac{-5+18x+15x^2-36x^3+21x^4-6x^5+x^6+9y-12xy-18x^2y+12x^3y-3x^4y-3y^2-6xy^2+3x^2y^2-y^3}{(1+x^2-y)^4}$$
$$\Rightarrow f_{xxx}(0,0)=-5$$

$$f_{y}(x,y)=-e^{x-2y}\frac{1+2x^2-2y}{(1+x^2-y)^2}$$
$$\Rightarrow f_{y}(0,0)=-1$$

$$f_{yy}(x,y)=2e^{x-2y}\frac{1+2x^2+2x^4-2y-4x^2y+2y^2}{(1+x^2-y)^3}$$
$$\Rightarrow f_{yy}(0,0)=2$$

$$f_{yyy}(x,y)=-2e^{x-2y}\frac{1+6x^2+6x^4+4x^6-6y-12x^2y-12x^4y+6y^2+12x^2y^2-4y^3}{(1+x^2-y)^4}$$
$$\Rightarrow f_{yyy}(0,0)=-2$$

Our Taylor polynomial of order three is then

$$f(x,y)\sim\sum_{0\leq n+k\leq 3}\frac{\partial ^{n}f (0,0)}{\partial x^{n}}\cdot\frac{\partial ^{k}f (0,0)}{\partial y^{k}}\cdot\frac{x^{n}}{n!}\cdot\frac{y^{k}}{k!}$$
$$=f(0,0)+f_{x}(0,0)x+f_{y}(0,0)y +\frac1{2}f_{xx}(0,0)x^2+f_{x}(0,0)f_{y}(0,0)xy+\frac1{2}f_{yy}(0,0)y^2$$​
$$+\qquad\qquad\frac1{6}f_{xxx}(0,0)x^3+\frac1{2}f_{xx}(0,0)f_{y}(0,0)x^2y+\frac1{2}f_{x}(0,0)f_{yy}(0,0)xy^2+\frac1{6}f_{yyy}(0,0)y^3$$
$$\boxed{=1+x-y-\frac1{2}x^2-xy+y^2-\frac5{6}x^3+\frac1{2}x^2y+xy^2-\frac1{3}y^3}$$​

Last edited: Nov 24, 2006
3. Nov 26, 2006

### benorin

IGNORE LAST POST: I had the wrong formula for a multivariate Taylor series. Here's the fix:

The taylor series expansion of a function $$f(x,y)$$ about the point $$(x_0,y_0)$$ is given by

$$f(x,y)=\sum_{n=0}^{\infty}\sum_{k=0}^{\infty} \frac{\partial ^{n+k}f (x_0,y_0)}{\partial x^{n}\partial y^{k}} \cdot\frac{(x-x_0)^{n}}{n!} \cdot\frac{(y-y_0)^{k}}{k!}$$​

notice that to obtain the third order Taylor polynomial, we need only sum over $$n+k\leq 3$$

We have need of some calculations...

$$f(x,y)=\frac{e^{x-2y}}{(1+x^2-y)^2}$$
$$\Rightarrow f(0,0)=1$$

$$f_{x}(x,y)=e^{x-2y}\frac{1-2x+x^2-y}{(1+x^2-y)^2}$$
$$\Rightarrow f_{x}(0,0)=1$$

$$f_{xx}=e^{x-2y}\frac{-1-4x+8x^2-4x^3+x^4+4xy-2x^2y+y^2}{(1+x^2-y)^3}$$
$$\Rightarrow f_{xx}(0,0)=-1$$

$$f_{xxx}(x,y)=e^{x-2y}\frac{-5+18x+15x^2-36x^3+21x^4-6x^5+x^6+9y-12xy-18x^2y+12x^3y-3x^4y-3y^2-6xy^2+3x^2y^2-y^3}{(1+x^2-y)^4}$$
$$\Rightarrow f_{xxx}(0,0)=-5$$

$$f_{y}(x,y)=-e^{x-2y}\frac{1+2x^2-2y}{(1+x^2-y)^2}$$
$$\Rightarrow f_{y}(0,0)=-1$$

$$f_{yy}(x,y)=2e^{x-2y}\frac{1+2x^2+2x^4-2y-4x^2y+2y^2}{(1+x^2-y)^3}$$
$$\Rightarrow f_{yy}(0,0)=2$$

$$f_{yyy}(x,y)=-2e^{x-2y}\frac{1+6x^2+6x^4+4x^6-6y-12x^2y-12x^4y+6y^2+12x^2y^2-4y^3}{(1+x^2-y)^4}$$
$$\Rightarrow f_{yyy}(0,0)=-2$$

$$f_{xy}(x,y)=-e^{x-2y}\frac{1+3x^2-4x^3+2x^4-3y+4xy-4x^2y+2y^2}{(1+x^2-y)^3}$$
$$\Rightarrow f_{xy}(0,0)=-1$$

$$f_{xyy}(x,y)=2e^{x-2y}\frac{1-2x+3x^2+4x^4-4x^5+2x^6-3y-8x^2y+8x^3y-6x^4y+4y^2-4xy^2+6x^2y^2-2y^3}{(1+x^2-y)^4}$$
$$\Rightarrow f_{xyy}(0,0)=2$$

$$f_{xxy}(x,y)=-e^{x-2y}\frac{1-8x^2-8x^3+17x^4-8x^5+2x^6+8xy-18x^2y+16x^3y-6x^4y+y^2-8xy^2+6x^2y^2-2y^3}{(1+x^2-y)^4}$$
$$\Rightarrow f_{xxy}(0,0)=-1$$

Our Taylor polynomial of order three is then

$$f(x,y)\sim\sum_{0\leq n+k\leq 3}\frac{\partial ^{n+k}f (0,0)}{\partial x^{n}\partial y^{k}}\cdot\frac{x^{n}}{n!}\cdot\frac{y^{k}}{k!}$$
$$=f(0,0) +\left( f_{x}(0,0)x+f_{y}(0,0)y\right)$$
$$+\left(\frac1{2}f_{xx}(0,0)x^2+f_{xy}(0,0)xy +\frac1{2}f_{yy}(0,0)y^2\right)$$​
$$+\left(\frac1{6}f_{xxx}(0,0)x^3+\frac1{2}f_{xxy}(0,0)x^2y +\frac1{2}f_{xyy}(0,0)xy^2+\frac1{6}f_{yyy}(0,0)y^3\right)$$

$$\boxed{=1+(x-y)+\left( -\frac1{2}x^2-xy+y^2\right) +\left( -\frac5{6}x^3-\frac1{2}x^2y+xy^2-\frac1{3}y^3\right)}$$​

4. Jun 24, 2009

### simongjh

for the numerator:

$$\exp^{x}=1+x+\frac{x^{2}}{2!}+\frac{x^{3}}{3!}+...$$

so we can get:
Expression N:

$$\exp^{x-2y}=1+(x-2y)+\frac{(x-2y)^{2}}{2!}+\frac{(x-2y)^{3}}{3!}+...$$

for the denominator:

$$\frac{1}{1-x} = 1+x+x^{2}+x^{3}+...$$

so we can get:
Expression D:

$$\frac{1}{1-(y-x^{2})} = 1+(y-x^{2})+(y-x^{2})^{2}+(y-x^{2})^{3}+...$$

Get the product of N*D we can get:

$$\frac{\exp^{x-2y}}{1+x^{2}-y)} =1+(x-y)+\left( -\frac1{2}x^2-xy+y^2\right) +\left( -\frac5{6}x^3-\frac1{2}x^2y+xy^2-\frac1{3}y^3\right)+...$$

5. Jul 6, 2009

### steve89

I don't understand how you multyplied in that formula , you have 10 terms , shouldn'd you have 16? 4 by 4 since there are 0-3 for x and 0-3 for y ??