# Finding coefficients of complex polynomials [closed]

Hello,

I've found that the function coefficients() behaves differently when the coefficients of a polynomial are complex instead of real. For example:

sage: R.<x, y> = PolynomialRing(ZZ[I], 2)
sage: F = 2*I*x*y + 3*x^2*y^3
sage: F.coefficients()
[[2*I*y, 1], [3*y^3, 2]]
sage: G = 2*x*y + 3*x^2*y^3
sage: G.coefficients()
[3, 2]


Also a similar thing happens with univariate polynomials over CC.

sage: S.<z> = PolynomialRing(CC)
sage: f = z^2 + z + I
sage: f.coefficients()
[[1.00000000000000*I, 0], [1.00000000000000, 1], [1.00000000000000, 2]]
sage: g = z^2 + z + 1
sage: g.coefficients()
[1.00000000000000, 1.00000000000000, 1.00000000000000]


Why is there this difference? How can I find a list of the coefficients like when the polynomials are purely real? This is in SageMath version 8.1, is it maybe the issue that this version is outdated?

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by FKalker close date 2022-03-26 00:22:22.737520

Sort by » oldest newest most voted

It is indeed the case that my sagemath version is outdated

more