ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 19 Jan 2015 11:57:47 +0100Convert expression to univariate polynomial over symbolic ring properlyhttps://ask.sagemath.org/question/25556/convert-expression-to-univariate-polynomial-over-symbolic-ring-properly/If I create polynomial like this
R.<x> = SR[]
var('a')
f = a*x^3+1
I get such list of variables
sage: f.variables()
(x,)
But how to convert existing expression to univariate polynomial over symbolic ring?
When I do like this
var('a')
f = a*x^3+1
P.<x> = SR[]
I get following output
sage: P(f).variables()
()
sage: SR['x'](f).variables()
()
How to convert `f` to polynomial in a right way with `x` as variable.
petRUShkaMon, 19 Jan 2015 11:57:47 +0100https://ask.sagemath.org/question/25556/