Ask Your Question

Laurian's profile - activity

2024-04-07 18:12:19 +0200 received badge  Famous Question (source)
2024-04-07 18:12:19 +0200 received badge  Notable Question (source)
2021-11-19 06:21:52 +0200 received badge  Popular Question (source)
2020-07-24 11:13:00 +0200 received badge  Student (source)
2020-07-23 10:08:59 +0200 asked a question Coefficients of a polynomial including zero coefficients

I want to obtain the list of coefficients of a polynomials, including the zero coefficients.

I tried this

R.<x> = QQ[]
f = x^4 - x^2 + 1
A = f.coefficients()
A

This gave the answer [1, -1, 1]. But I want to get [1, 0, -1, 0, 1].