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.Fri, 25 Oct 2019 03:07:32 +0200How can I map functions into polynomial coefficientshttps://ask.sagemath.org/question/48492/how-can-i-map-functions-into-polynomial-coefficients/Let's say I have the following expression (from a wide range of possibilities) :
pol = 3*a*x^(-b)*log(x)*b^2 - 6*a*b*c*sin(x*b) + 3*a*c^2 + 5
And I want to extract the coefficients of the polynomial over the polynomial ring over a & c, so that these result in:
a^0*c^0 : 5
a^1*c^0 : 3*x^(-b)*log(x)*b^2
a^0*c^1 : 0
a^1*c^1 : -6*b*sin(x*b)
etc.
How can I define the polynomial ring?
How can I map an existing expression that defines "pol" (which is the result of other manipulations) into such ring?Edgar BrownFri, 25 Oct 2019 03:07:32 +0200https://ask.sagemath.org/question/48492/