How can we extract the coefficient of any polynomial as a fixed degree polynomial? For example, if we have $a=2+3*x$, then a.polynomial().coefficient() will extract (3,2), but I need the polynomial of degree 3, and the output will be (0,0,3,2).

1 | initial version |

How can we extract the coefficient of any polynomial as a fixed degree polynomial? For example, if we have $a=2+3*x$, then a.polynomial().coefficient() will extract (3,2), but I need the polynomial of degree 3, and the output will be (0,0,3,2).

How can we extract the coefficient of any polynomial as a fixed degree polynomial? For example, if we have $a=2+3*x$, then a.polynomial().coefficient() will extract (3,2), but I need the polynomial of degree 3, and the output will be ~~(0,0,3,2).~~(3,2,0,0).

How can we extract the coefficient of any polynomial as a fixed degree polynomial? For example, if we have $a=2+3*x$, then a.polynomial().coefficient() will extract ~~(3,2), ~~(2,3), but I need the polynomial of degree 3, and the output will be ~~(3,2,0,0).~~(2,3,0,0).

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.