ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 15 Apr 2013 14:02:58 +0200Polynomial commandhttps://ask.sagemath.org/question/9982/polynomial-command/Hello
How can I write a polynomial such as f(x^2-4,x^2-2*x) in sage?Thu, 04 Apr 2013 08:12:47 +0200https://ask.sagemath.org/question/9982/polynomial-command/Comment by Neda for <p>Hello
How can I write a polynomial such as f(x^2-4,x^2-2*x) in sage?</p>
https://ask.sagemath.org/question/9982/polynomial-command/?comment=17945#post-id-17945I have a polynomial f= x^*y^2+x^3*y^2-y+1 and I want to compute the remainder on division of the given polynomial f by the order set F using grlex order ,but F is F=(x*y^2-x,x-y^3) that has two part, I don't know how to introduce F in sage for division algorithm.Thu, 04 Apr 2013 09:03:46 +0200https://ask.sagemath.org/question/9982/polynomial-command/?comment=17945#post-id-17945Comment by vdelecroix for <p>Hello
How can I write a polynomial such as f(x^2-4,x^2-2*x) in sage?</p>
https://ask.sagemath.org/question/9982/polynomial-command/?comment=17947#post-id-17947What do you mean ? You have a polynomial of two variables and you want to substitute a polynomial in x for each variable ?Thu, 04 Apr 2013 08:18:12 +0200https://ask.sagemath.org/question/9982/polynomial-command/?comment=17947#post-id-17947Answer by slelievre for <p>Hello
How can I write a polynomial such as f(x^2-4,x^2-2*x) in sage?</p>
https://ask.sagemath.org/question/9982/polynomial-command/?answer=14786#post-id-14786Not sure what `x^y^2` was supposed to be in your polynomial `f`.
Anyway, try something like this.
sage: R.<x,y> = PolynomialRing(ZZ, order='deglex')
sage: f = x^5 * y^2 + x^3 * y^2 - y + 1
sage: F = (x * y^2 - x, x - y^3)
sage: f.reduce(F)
x^5 + x^3 - y + 1
Mon, 15 Apr 2013 08:30:32 +0200https://ask.sagemath.org/question/9982/polynomial-command/?answer=14786#post-id-14786Comment by Neda for <p>Not sure what <code>x^y^2</code> was supposed to be in your polynomial <code>f</code>.
Anyway, try something like this.</p>
<pre><code>sage: R.<x,y> = PolynomialRing(ZZ, order='deglex')
sage: f = x^5 * y^2 + x^3 * y^2 - y + 1
sage: F = (x * y^2 - x, x - y^3)
sage: f.reduce(F)
x^5 + x^3 - y + 1
</code></pre>
https://ask.sagemath.org/question/9982/polynomial-command/?comment=17892#post-id-17892sorry,it was my mistake, it was supposed to be x*y^2.. thank you for helping Mon, 15 Apr 2013 14:02:58 +0200https://ask.sagemath.org/question/9982/polynomial-command/?comment=17892#post-id-17892