# Taylor expansion, powers of x-a

Hi all,

I noticed that `taylor(...)`

has a somehow inconsistent behaviour. When used with a function of one variable, it returns an expression that is a sum of powers of $x-a$. For instance `taylor(sin(x), x,1,2)`

gives the result $-\frac{1}{2} \, {\left(x - 1\right)}^{2} \sin\left(1\right) + {\left(x - 1\right)} \cos\left(1\right) + \sin\left(1\right)$ as expected. Same for `taylor(sin(x*y), (x,1), (y,2),2)`

that gives the expected answer.

In contrast `taylor(sqrt(1+4*x^2 + y^2),(x,1), (y,2),2)`

gives a result ending with $\frac{4}{3} x + \frac{2}{3} y + \frac{1}{3}$ , where I was expecting something containing a term on $x-1$ and a term in $y-2$.

Any ideas?

JC

I cannot reproduce your result in Sagecell. Please try to update your Sage version.

I am using sage 10.0 on ubuntu. Perhaps adding `var('x,y')' at the very beggining helps? I tried that in sage cell server ant the restult is the one in my original post.

The linear part can be rewritten as follows