Singular https://www.singular.uni-kl.de/forum/ |
|
How to calculate Univariate Polynomial in singular? https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=1974 |
Page 1 of 1 |
Author: | MapleIs2Slow [ Thu Sep 15, 2011 9:18 pm ] |
Post subject: | How to calculate Univariate Polynomial in singular? |
Could someone please give me a screen shot and/or a copy-and-paste of the codes that would do the following simple task done in maple: Let me explain a bit: The input is F, which is a set of 2 polynomials. The command Groebner:-UnivariatePolynomial takes F as the input, and outputs a polynomial only in x, you might ask: "but a and b are also in the output, why?" this is because a and b are considered to be parameters, only x and y are variables as defined by {x,y} in the command. I tried to look for a "Univariate Polynomial"-like command in the singular tutorial but with no luck, as you probably have guessed, for a long time Maple user like me, Singular is kind of hard to get the hang of, many thanks to anyone who would kindly help me out!!! |
Author: | gorzel [ Fri Sep 16, 2011 11:58 am ] |
Post subject: | Re: How to calculate Univariate Polynomial in singular? |
The task behind is to eliminate the variable y from the two equations. There exist two methods: A) do a Groebner basis calculation w.r.t. to a elimination ordering e.g. a lexicographical ordering. Here you may also use simply Singular's command eliminate which uses some (hidden) strategies for the choice of the ordering B) make a resultant computation In both cases the result is (upto to the sign) the same, however the the speed may variy in some cases and it can not be said which is the faster. In your example the result is obtained instantly with both methods. Code: > ring r =(0,a,b),(x,y),dp; // a and b are parameters, x,y are variables > poly f = ax3-3xy+b; > poly g = x2y-2y2+x; > ideal I = f,g; // Groebnerbasis method: eliminate takes as input an ideal an returns an ideal > eliminate(I,y); _[1]=(2a2-3a)*x6+(4ab-3b-9)*x3+(2b2) > poly h = _[1]; // access to the last result with _ (in Maple it is %) > h; (2a2-3a)*x6+(4ab-3b-9)*x3+(2b2) > // resultant method > resultant(f,g,y); (-2a2+3a)*x6+(-4ab+3b+9)*x3+(-2b2) > short =0; > _; (-2*a^2+3*a)*x^6+(-4*a*b+3*b+9)*x^3+(-2*b^2) As you see, the result is displayed as polynomial in x with polynomial coefficient in the the parameters a and b. |
Author: | MapleIs2Slow [ Fri Sep 16, 2011 7:42 pm ] |
Post subject: | Re: How to calculate Univariate Polynomial in singular? |
Quote: gorzel thank you very much!!! |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |