Douglas B. Staple
Douglas B. Staple

Reputation: 10946

How can I programatically truncate order "O" terms in Maple?

In Maple, taylor(exp(x),x,2); returns 1+x+O(x2). How can I automatically convert this result to the same expression with the O(x2) terms removed? I.e. something like removeBigO(taylor(exp(x),x,2)); to return 1+x?"

Upvotes: 5

Views: 1941

Answers (1)

acer
acer

Reputation: 7271

P := taylor(exp(x),x,2);

convert(P, polynom);

That conversion has its own help-page.

Note also that the help page for taylor,details has such a conversion as its last example. And the help page for taylor mentions that conversion of a Taylor series result to a polynomial is described on that details page.

Upvotes: 5

Related Questions