1 | initial version |
For some reason (which i do not know), FunctionField
only works in one variable (see the doc with FunctionField?
). So you have to create it as a fraction field of a polynomial ring:
sage: aInv_poly = PolynomialRing(QQ,'a2,a4,a6')
sage: aInv_poly
Multivariate Polynomial Ring in a2, a4, a6 over Rational Field
sage: aInv = aInv_poly.fraction_field()
sage: aInv.inject_variables()
Defining a2, a4, a6
sage: R.<X> = PolynomialRing(aInv); R
Univariate Polynomial Ring in X over Fraction Field of Multivariate Polynomial Ring in a2, a4, a6 over Rational Field
sage: f = X^3 + a2*X^2 + a4*X + a6 ; f
X^3 + a2*X^2 + a4*X + a6
sage: fprim = f.derivative()
sage: fprim
3*X^2 + 2*a2*X + a4