| 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)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.