Processing math: 100%
Ask Your Question
1

how to display the list of all monomials occurring in a polynomial

asked 0 years ago

hamouda gravatar image

updated 0 years ago

Max Alekseyev gravatar image

let f=x+y+z+xy, how to display the list of all monomials occuring in f2, by hand computing, the list should be [x2y2;x2y;xy2;xyz;x2;xy;y2;xz;yz;z2]

R.<x,y,z>=ZZ[]
f=x+y+z+x*y;f^2
Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 0 years ago

(f^2).monomials() works. If you do g=f^2 and then type g.<TAB>, you will get a list of methods attached to g, one of which is monomials. Others may also be of interest.

Preview: (hide)
link

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: 0 years ago

Seen: 555 times

Last updated: Jul 01 '24