2022-10-31 13:37:14 +0100 | received badge | ● Popular Question (source) |

2020-01-16 17:11:29 +0100 | received badge | ● Popular Question (source) |

2017-03-15 15:17:06 +0100 | 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 09:26:07 +0100 | received badge | ● Nice Question (source) |

2016-12-11 09:25:39 +0100 | received badge | ● Teacher (source) |

2016-12-11 09:25:39 +0100 | received badge | ● Self-Learner (source) |

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

2016-12-08 11:18:28 +0100 | received badge | ● Editor (source) |

2016-12-08 10:15:46 +0100 | 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 12:24:19 +0100 | received badge | ● Scholar (source) |

2016-12-03 12:23:41 +0100 | 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 16:42:00 +0100 | received badge | ● Student (source) |

2016-12-02 14:57:35 +0100 | 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.