Revision history [back]

One possibility is to use multivariate Laurent polynomials and let one variable be your parameter

sage: R.<a,t> = LaurentPolynomialRing(QQ)
sage: R
Multivariate Laurent Polynomial Ring in a, t over Rational Field


another one is to use coefficient being themselves polynomials

sage: P.<t> = PolynomialRing(QQ)
sage: R.<a> = LaurentPolynomialRing(P)
sage: R
Univariate Laurent Polynomial Ring in a over Univariate Polynomial Ring in t over Rational Field


There are also several other ways but everything depend on what you want to do with them... try to make your question more precise.

One possibility is to use multivariate Laurent polynomials and let one variable be your parameter

sage: R.<a,t> = LaurentPolynomialRing(QQ)
LaurentSeriesRing(QQ)
sage: R
Multivariate Laurent Polynomial Ring in a, t over Rational Field


another one is to use coefficient being themselves polynomials

sage: P.<t> = PolynomialRing(QQ)
sage: R.<a> = LaurentPolynomialRing(P)
LaurentSeriesRing(P)
sage: R
Univariate Laurent Polynomial Ring in a over Univariate Polynomial Ring in t over Rational Field


There are also several other ways but everything depend on what you want to do with them... try to make your question more precise.

EDIT: to expend a quotient (of polynomials) with parameters, the second method is more appropriate

sage: P.<t> = PolynomialRing(QQ)
sage: R.<a> = LaurentSeriesRing(P)
sage: num = (t^2 + 1) * a^2 + (-t + 2) * a + (t^2 - 1)
sage: den = (t^3 + t + 1) * a^2 + (2*t + 5) * a - 1
sage: num / den
(-t^2 + 1) + (-2*t^3 - 5*t^2 + 3*t + 3)*a + ... + O(a^20)


One possibility is to use multivariate Laurent polynomials and let one variable be your parameter

sage: R.<a,t> = LaurentSeriesRing(QQ)
sage: R
Multivariate Laurent Polynomial Ring in a, t over Rational Field


another one is to use coefficient coefficients being themselves polynomials

sage: P.<t> = PolynomialRing(QQ)
sage: R.<a> = LaurentSeriesRing(P)
sage: R
Univariate Laurent Polynomial Ring in a over Univariate Polynomial Ring in t over Rational Field


There are also several other ways but everything depend depends on what you want to do with them... try to make your question more precise.

EDIT: to expend expand a quotient (of polynomials) with parameters, the second method is more appropriate

sage: P.<t> = PolynomialRing(QQ)
sage: R.<a> = LaurentSeriesRing(P)
sage: num = (t^2 + 1) * a^2 + (-t + 2) * a + (t^2 - 1)
sage: den = (t^3 + t + 1) * a^2 + (2*t + 5) * a - 1
sage: num / den
(-t^2 + 1) + (-2*t^3 - 5*t^2 + 3*t + 3)*a + ... + O(a^20)