Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
1

taylor(1/x^2,x,2,2) give unexpected results

asked 11 years ago

AndyH gravatar image

When I calculated this by hand, the constant term is 1/4 but sage gives 3/4.

Sage: 316(x2)214x+34

My calculation:

1414(x2)+316(x2)2

I'm learning taylor series and sage at the same time, so its quite possible I'm misusing sage. I checked the same thing on wolframalpha, and it agrees with me.

Any ideas? I running sage Sage Version 6.0,Release Date: 2013-12-17 under Ubuntu 12.10. Thanks.

Preview: (hide)

Comments

The answer is the same in both cases. If you add 1/4 with 2/4 from the linear term you get 3/4.

Shashank gravatar imageShashank ( 11 years ago )

Maybe what @Ariyama wants is for Sage to not "simplify" the linear terms.

kcrisman gravatar imagekcrisman ( 11 years ago )
1

Yes, if one asks for the Taylor series centered at 2, one should expect the answer to appear with (x-2)'s , not "simplified" into a series with some terms (or just leading term) centered at 2 and the rest centered at 0.

dart2163 gravatar imagedart2163 ( 11 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 11 years ago

kcrisman gravatar image

updated 11 years ago

There's a way to at least get this to print.

sage: f = 1/x^2
sage: f._maxima_().taylor((x,2,2))
1/4-(x-2)/4+3*(x-2)^2/16

However, it doesn't stick around when you send it back to Sage.

sage: SR(_)
3/16*(x - 2)^2 - 1/4*x + 3/4

Indeed,

sage: (x-2)/4
1/4*x - 1/2

It's possible to get this to not simplify

sage: (x-2).mul(1/4,hold=True)
1/4*(x - 2)

but I'm not sure if we can easily massage the output of Maxima to automatically not simplify with that.

Preview: (hide)
link

Comments

Ah, thanks. I didn't notice before that sage was simplifying the (x-2)/4 term. I'm glad my sanity is intact, at least for now. Andy

AndyH gravatar imageAndyH ( 11 years ago )

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: 11 years ago

Seen: 405 times

Last updated: Jan 24 '14