[Math] Taylor expansion of $f(x,y)=xy-x+2x^3-yx^3$ about (0,1)…

taylor expansion

I am asked to expand $f(x,y)=xy-x+2x^3-yx^3$ about (0,1) up to second order:

First I found the required derivatives, and their values at (0,1),

$ f_x=y-1+6x^2-3yx^2=0$

$f_y=x-x^3=0$

$f_{xx}=12x-6yx=0$

$f_{xy}=1-3x^2=1$

$f_{yy}= 0$

Then I substituted them into the Taylor expansion formula for two variables up to second order:

$f(x,y)= f+(xf_x+yf_y)+\frac{1}{2!}(x^2f_{xx}+ 2xy f_{xy}+y^2f_{yy}$)

$=\frac{1}{2}(2xy)$

$=xy$

This is my first time applying the Taylor expansion formula for two variables, having done the Taylor expansion before for one variable, the answer I got here doesn't look right to me. Is it correct? If not, where have I gone wrong?

Best Answer

Since you have a polynomial, it might be easier to work with the expression to write it as a polynomial in $x$ and $y-1$: $$ \begin{aligned} xy-x+2x^3-yx^3&=x(y-1+1)-x+2x^3-(y-1+1)x^3\\ &=x(y-1)+x^3-(y-1)x^3. \end{aligned} $$ We throw away the terms that have degree higher than two, and the result is $$ x(y-1). $$

Edit To answer your question, you differentiate correctly, but the formula for the Taylor polynomial is $$ f(0,1)+xf'_x(0,1)+(y-1)f'_y(0,1)+\frac{1}{2!}\bigl(x^2 f''_{xx}(0,1)+2x(y-1)f''_{xy}(0,1)+(y-1)^2f''_{yy}(0,1)\bigr) $$