1 | initial version |
I can't find a specific function to get the terms out of a polynomial, but here is some code that should do the job for a function just of x.
var('x,y')
y = 2*x^2 + x^3 + 10*x^4
info=y.coeffs()
terms=[a[0]*x^a[1] for a in info]
gcd(terms)