Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just add big-O - like

f = 1+q+2*q^2+3*q^3+4*q^4+5*q^5
f += O(q^3)

will truncate f at 3rd degree.

Just add a suitable big-O - like

f = 1+q+2*q^2+3*q^3+4*q^4+5*q^5
f += O(q^3)
O(q^3)   # truncating as a power series
f = f.polynomial()   # converting back to polynomial

will truncate truncates f at 3rd degree.