Ask Your Question
0

Restrict taylor() to only find genuine Taylor series

asked 2012-10-28 11:22:29 -0500

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 14:17:52 -0500

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 15:25:27 -0500 )edit

Oh, how about a multivariate series?

Doubtless Lee gravatar imageDoubtless Lee ( 2012-10-28 15:28:22 -0500 )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 12:46:44 -0500 )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 04:01:15 -0500 )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 11:22:29 -0500

Seen: 175 times

Last updated: Oct 28 '12