Ask Your Question

# Restrict taylor() to only find genuine Taylor series

In Maple, the Taylor series command produces an error if the expression does not have a Taylor series, such as 1/x around x = 0. Is it possible to achieve the same effect in Sage? I have some rather long expressions, and it's not always immediately obvious whether there are some singular terms hidden in the result of .taylor().

edit retag close merge delete

## 1 Answer

Sort by ยป oldest newest most voted

You may test if the minimum of the powers is nonnegative

f(x)=1/x^6*cos(x)
point, order = 0, 4
g=f.taylor(x,point,order)
powers=[i[1] for i in g.coefficients()]
min(powers)

more

## Comments

I guess that's a functional solution. Thanks.

( 2012-10-28 21:25:27 +0200 )edit

Oh, how about a multivariate series?

( 2012-10-28 21:28:22 +0200 )edit

Maybe another suggestion: test, if the function is well defined at the point which is the center of the Taylor polynomial. This should work also for multivariable series. Or expand along each variable separately and test the smallest power.

( 2012-10-29 18:46:44 +0200 )edit

Oh, you mean just evaluate at zero? Yeah, that would probably have been much simpler from the start. D'oh :-)

( 2012-10-30 10:01:15 +0200 )edit

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2012-10-28 17:22:29 +0200

Seen: 217 times

Last updated: Oct 28 '12