# How to define a polynomial with abstract coefficients in Sage

Let $f=ax^2+b$ be a polynomial in $Q[x]$, how to define $f$ in sage?

-

sage: var('a b')
(a, b)
sage: R.<X> = QQ[]
sage: f = a * X * X + b
sage: f
X^2*a + b
sage: R
Univariate Polynomial Ring in X over Rational Field