Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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