2020-01-16 10:11:29 -0500 | received badge | ● Popular Question (source) |

2017-03-15 09:17:06 -0500 | asked a question | Multivariate polynomial coefficients including zeros Dears, I would like to get the coefficients of a multivariate polynomial Then using the following code: The result is as expected: [3, ,0 , 0, 1, 0, 0, 0, 0, 3]
How can I do that? Any help will be much appreciated. Regards, Natassa |

2016-12-11 02:26:07 -0500 | received badge | ● Nice Question (source) |

2016-12-11 02:25:39 -0500 | received badge | ● Self-Learner (source) |

2016-12-11 02:25:39 -0500 | received badge | ● Teacher (source) |

2016-12-08 04:40:08 -0500 | commented answer | Problem with the minus sign in symbolic expression Indeed, now I see what the problem was. Thank you! |

2016-12-08 04:18:28 -0500 | received badge | ● Editor (source) |

2016-12-08 03:15:46 -0500 | asked a question | Problem with the minus sign in symbolic expression Hi all! My sage version is: 'SageMath Version 6.9, Release Date: 2015-10-10' In my code, I have a multivariate polynomial with a sign symbol which doesn't return the correct result. I.e. The code snippet is as follows: a1 and b1 are returned from another function.
a1 is a vector with values (76, 83), b1 is scalar with value 62, x is a vector with values (x1,x2). Thus, f1 should return Please note that if I use The result is correct,i.e. 76 type(f1) is sage.symbolic.expression.Expression What could the problem be? I tried to convert the symbolic expression to multivariate polynomial, but this didn't work either? I also though there might be a problem with the minus symbol in my PC but couldn't solve it this way either. Thank you for your responses! Regards, Natassa |

2016-12-03 05:24:19 -0500 | received badge | ● Scholar (source) |

2016-12-03 05:23:41 -0500 | answered a question | Reduce multivariate polynomial coefficients to 1 Thank you all, Indeed, considering sum of all monomials does the trick! As a reference, a slightly tweaked solution below that worked for me: |

2016-12-02 09:42:00 -0500 | received badge | ● Student (source) |

2016-12-02 07:57:35 -0500 | asked a question | Reduce multivariate polynomial coefficients to 1 Hi all, I'm new to Python and SAGE and would like to ask a question: I have a multivariate polynomial, of a degree 3, i.e: g.<x1,x2,x3>=x1^2 + 2 The question is how can I reduce all its leading coefficients to 1, i.e. transform ig to: g.<x1,x2,x3>=x1^2 + I tried to get the coefficients of the polynomial (which is a list), iterate through its items, and set the values of the items to 1, i.e. for s in g.coefficients(): if s==2: s=1 I think that the problem is that list items can't be cast to integer (TypeError). How could I solve this? Is there a more efficient way to do this? Thank you for your responses! Regards, Natassa |

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.