### 5.25.21 Truncate of order n : truncate

truncate takes as argument, a polynomial and an integer n.
truncate truncates this polynomial at order n (removing all terms of order greater or equal to n+1).
truncate may be used to transform a series expansion into a polynomial or to compute a series expansion step by step.
Input :

truncate((1+x+x`^`2/2)`^`3,4)

Output :

(9*x`^`4+16*x`^`3+18*x`^`2+12*x+4)/4

Input :

truncate(series(sin(x)),4)

Output :

(-x`^`3-(-6)*x)/6

Note that the returned polynomial is normalized.