Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: 3rd order, multi variable taylor polynomial

  1. Nov 22, 2006 #1
    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. jcsd
  3. Nov 24, 2006 #2

    benorin

    User Avatar
    Homework Helper

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

    [tex]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!}[/tex]​

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

    We have need of some calculations...

    [tex]f(x,y)=\frac{e^{x-2y}}{(1+x^2-y)^2}[/tex]
    [tex]\Rightarrow f(0,0)=1[/tex]

    [tex]f_{x}(x,y)=e^{x-2y}\frac{1-2x+x^2-y}{(1+x^2-y)^2}[/tex]
    [tex]\Rightarrow f_{x}(0,0)=1[/tex]

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

    [tex]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}[/tex]
    [tex] \Rightarrow f_{xxx}(0,0)=-5[/tex]

    [tex]f_{y}(x,y)=-e^{x-2y}\frac{1+2x^2-2y}{(1+x^2-y)^2}[/tex]
    [tex]\Rightarrow f_{y}(0,0)=-1[/tex]

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

    [tex]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}[/tex]
    [tex]\Rightarrow f_{yyy}(0,0)=-2[/tex]

    Our Taylor polynomial of order three is then

    [tex]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!}[/tex]
    [tex]=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[/tex]​
    [tex]+\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[/tex]
    [tex]\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}[/tex]​
     
    Last edited: Nov 24, 2006
  4. Nov 26, 2006 #3

    benorin

    User Avatar
    Homework Helper

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

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

    [tex]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!}[/tex]​

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

    We have need of some calculations...

    [tex]f(x,y)=\frac{e^{x-2y}}{(1+x^2-y)^2}[/tex]
    [tex]\Rightarrow f(0,0)=1[/tex]

    [tex]f_{x}(x,y)=e^{x-2y}\frac{1-2x+x^2-y}{(1+x^2-y)^2}[/tex]
    [tex]\Rightarrow f_{x}(0,0)=1[/tex]

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

    [tex]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}[/tex]
    [tex] \Rightarrow f_{xxx}(0,0)=-5[/tex]

    [tex]f_{y}(x,y)=-e^{x-2y}\frac{1+2x^2-2y}{(1+x^2-y)^2}[/tex]
    [tex]\Rightarrow f_{y}(0,0)=-1[/tex]

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

    [tex]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}[/tex]
    [tex]\Rightarrow f_{yyy}(0,0)=-2[/tex]

    [tex]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}[/tex]
    [tex]\Rightarrow f_{xy}(0,0)=-1[/tex]

    [tex]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}[/tex]
    [tex]\Rightarrow f_{xyy}(0,0)=2[/tex]

    [tex]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}[/tex]
    [tex]\Rightarrow f_{xxy}(0,0)=-1[/tex]

    Our Taylor polynomial of order three is then

    [tex]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!}[/tex]
    [tex]=f(0,0)
    +\left( f_{x}(0,0)x+f_{y}(0,0)y\right) [/tex]
    [tex]+\left(\frac1{2}f_{xx}(0,0)x^2+f_{xy}(0,0)xy +\frac1{2}f_{yy}(0,0)y^2\right)[/tex]​
    [tex]+\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)[/tex]

    [tex]\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)}[/tex]​
     
  5. Jun 24, 2009 #4
    for the numerator:

    [tex]\exp^{x}=1+x+\frac{x^{2}}{2!}+\frac{x^{3}}{3!}+...[/tex]

    so we can get:
    Expression N:

    [tex]\exp^{x-2y}=1+(x-2y)+\frac{(x-2y)^{2}}{2!}+\frac{(x-2y)^{3}}{3!}+...[/tex]

    for the denominator:

    [tex]\frac{1}{1-x} = 1+x+x^{2}+x^{3}+...[/tex]

    so we can get:
    Expression D:

    [tex]\frac{1}{1-(y-x^{2})} = 1+(y-x^{2})+(y-x^{2})^{2}+(y-x^{2})^{3}+...[/tex]

    Get the product of N*D we can get:

    [tex]\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)+...[/tex]
     
  6. Jul 6, 2009 #5
    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 ??
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook