# Write an expression in powers of $(x+1)$ and $(y-1)$ for $x^2+xy+y^2$

Write an expression in powers of $(x+1)$ and $(y-1)$ for $x^2+xy+y^2$

I calculated

$f_x=2x+y$

$f_{xx}=2$

$f_y=x+2y$

$f_{yy}=2$

And then what I need to do?

What is the formula to solve the question ?

Let $u=x+1$, $v=y-1$, then $$x^2+xy+y^2=(u-1)^2+(u-1)(v+1)+(v+1)^2=u^2+v^2+uv-u+v+1=\;\cdots$$

• This is simpler than my suggestion! Commented Jul 14, 2013 at 23:52
• So easy? Thank you :)
– 1190
Commented Jul 15, 2013 at 10:50

Since $x^2+xy+y^2$ is a polynomial of degree $2$, the answer is the Taylor expansion of $x^2+xy+y^2$ about the point $(-1,1)$. Let $f(x,y)=x^2+xy+y^2$.

Note that $f_x(x,y)=2x+y$, $f_y(x,y)=2y+x$, $f_{xx}(x,y)=f_{yy}(x,y)=2$ and $f_{xy}(x,y)=1$. All higher order partial derivatives are identically $0$. So the Taylor expansion is $$f(-1,1)+f_x(-1,1)(x+1)+f_y(-1,1)(y-1)+\frac{1}{2!}\left(f_{xx}(-1,1)(x+1)^2 +2f_{xy}(-1,1)(x+1)(y-1)+f_{yy}(-1,1)(y-1)^2\right).$$

It looks messy, isn't too bad. We have $f(-1,1)=1$, $f_x(-1,1)=-1$, and $f_y(-1,1)=1$. The second-order partial derivatives are constant so are already evaluated at $(-1,1)$.

Remark: Note that the approach by Norbert is quite a bit quicker. It has the further great advantage of being less likely to produce an error.

The only advantage of the procedure above is that it lets you practice a bit with the second-order Taylor polynomial.

• You explained in detail. So good:)
– 1190
Commented Jul 15, 2013 at 10:51