Ask Your Question
1

Monomials' list for Laurent polynomials

asked 2020-01-11 16:27:05 +0100

rue82 gravatar image

Given a Laurent polynomial, is there a method to list its monomials? For example, for the polynomial $f(x,y) = x/y + y +3/x$ in the ring $R[x^\pm,y^\pm]$, it should give a list of the form [x/y,y,3/x]. Something similar exists for polynomials, it is given by monomials().

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2020-01-11 17:41:58 +0100

FrédéricC gravatar image

Like this

sage: x, y = LaurentPolynomialRing(QQ, 'x,y').gens()
sage: f = x+2/y
sage: list(f)
[(1, x), (2, y^-1)]
edit flag offensive delete link more

Comments

Many thanks. If I previously introduced x,y as symbolic variables, is there a way to covert the elements in the list back to symbolic variables?

rue82 gravatar imagerue82 ( 2020-01-11 23:20:20 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-01-11 16:27:05 +0100

Seen: 286 times

Last updated: Jan 11 '20