Ask Your Question
0

Restrict taylor() to only find genuine Taylor series

asked 2012-10-28 17:22:29 +0100

Doubtless Lee gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-10-28 20:17:52 +0100

robert.marik gravatar image

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)
edit flag offensive delete link more

Comments

I guess that's a functional solution. Thanks.

Doubtless Lee gravatar imageDoubtless Lee ( 2012-10-28 21:25:27 +0100 )edit

Oh, how about a multivariate series?

Doubtless Lee gravatar imageDoubtless Lee ( 2012-10-28 21:28:22 +0100 )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.

robert.marik gravatar imagerobert.marik ( 2012-10-29 18:46:44 +0100 )edit

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

Doubtless Lee gravatar imageDoubtless Lee ( 2012-10-30 10:01:15 +0100 )edit

Your Answer

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

Add Answer

Question Tools

Stats

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

Seen: 405 times

Last updated: Oct 28 '12