Next: Question 6: I Up: Some Maple Questions and Previous: Question 4: I

Question 5: Now I've converted my series to a polynomial. I've decided to drop the last few terms, those of degree higher than 5. I tried to assign zero to but that gave me a syntax error. Then I tried to substitute zero for but that only zeroed the term.

Answer: Maple only allows assignment to names. subs does not work in this case since it is strictly syntactic. The easiest thing to do is to use rem as follows:


> p;
                  2       3       4        5        6         7
     1 + 3 x + 9 x  + 27 x  + 81 x  + 243 x  + 729 x  + 2178 x

                8          9
        + 6561 x  + 19683 x

> rem(p,x^6,x);
                                2       3       4        5
                   1 + 3 x + 9 x  + 27 x  + 81 x  + 243 x
Related help pages include: rem.


gagin@thsun1.jinr.ru