Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - factoring lists
Author Message
  Post subject:  polynomial solving  Reply with quote
I guess you mean the intersection of the solution of v22l=0 and v21l=0 which is infinite (it is a 1-dimensional algebraic variety).

In general such a set is not easy to analyze, understanding such sets is the buisiness of algebraic geometry. For example, algebraic varieties can in general not be parametrized by polynomials in some a free variable, as in the case of linear equtions (only if it is a so called 'rational variety', it can be parametrized by rational functions, at least in theory).

The best we can hope for is to decompose the variety into smaller subsets which can be better understood. A useful SINGULAR command for this is minAssGTZ.

For example:

LIB"all.lib";
ring r=0,(b,s,v),lp;
ideal i = v22l, v21l;
list pr = minAssGTZ(i);

The union of the solution sets of the ideals pr[1],...,pr[size(pr)] is the solution set of i. The ideals pr[i] are usually easier than i and if they are sufficiently simple we can read off the solutions.

In your example minAssGTZ(i) is too hard to compute. Then you can (as you did) compute the resultant with respect to any of the variables (or eliminate a variable, but this may be harder) and factorize it. Add each of the non-constant factors (without multiplicities) to i and compute minAssGTZ, e.g.

list pr4 = minAssGTZ(i+(2+2bs2-4bs+1));

pr4 returns a list of 5 ideal with the first being the 1-dim component
_[1]=2bs2+b2-4bs+1
_[2]=v-1
of the solution of i and four 0-dim components (which are the intersection of 2bs2+b2-4bs+1=0 with the other components of the solutions of i). In this way you get (in principle) all irreducible components of i.

Unfortunately, in your example the fifth factor is (probably) too hard.

Note that the factors of the resultant w.r.t. v (except for the common divisors of the leading coefficients of v22l and v21l) describe the projection of the solution set to the b-s plane, which is a curve.

You can visualize this curve, i.e. the real solutions, via:
ring r1 = 0,(b,s),lp;
plot(9b2s3-11b2s2+6bs3+5b2s-10bs2+s3-b2+4bs-3s2+3s-1);

If you compute the resultant w.r.t. other variables you find projections to other planes.

This may be the best you can get because, as said above, you cannot hope to parametrize the solutions.
Post Posted: Mon Jun 09, 2008 2:54 am
  Post subject:  is resultant the best approach? How handle complicated subs  Reply with quote
I have sought further advice on this on sci.math.symbolic.

The advice given there has led me to modify the code from my first posting as follows:

LIB "primdec.lib";
ring r=0,(b,v),lp;
poly v11h = b^3 + v^3 - 2*b*v;
poly v21h = v^3 - 3*b*v^2 + (2+b)*b*v - b^3;
factorize(resultant(v11h,v21h,v));

This returns:

[1]:
_[1]=-2
_[2]=b
_[3]=b-1
_[4]=9b-8
[2]:
1,7,1,1

Having eliminated v, I now extend with:

gcd(subst(v11h,b,0),subst(v21h,b,0));
gcd(subst(v11h,b,1),subst(v21h,b,1));
gcd(subst(v11h,b,8/9),subst(v21h,b,8/9));

This yields the correct answers in this simple case.

Most of my problems are too complicated to allow substitutions based on explicit expressions for b, as above. Consider, instead the appended polynomials, v22l and v21l. Factoring the resultant as before yields:

_[1]=243
_[2]=b-1
_[3]=b
_[4]=b2+2bs2-4bs+1
_[5]=9b2s3-11b2s2+5b2s-b2+6bs3-10bs2+4bs+s3-3s2+3s-1
_[6]=2s-1
_[7]=bs-1
_[8]=s-1
_[9]=s

The most interesting of these are _[4] and _[5]. While I should be able to write these in terms of b(s), I cannot do so with more complicated examples where even higher orders are involved.

Is there another way that I can proceed with this approach, or should I be taking another approach? Does, for example, eliminate() do this more directly?

Finally, the resultants approach (so far) seems much faster than my previous facstd() approach. If I am interested in the intersection of two polynomials (expected to be infinite), are these equivalent?

Thank you,

Colin Rowat


APPENDED POLYNOMIALS

poly v22l = (2*s-1)^2 * ((5*s^2-2*s-1)*b^2 - (8*s^2-5*s-1)*b - 1)*v^5
+ (2*s-1) * ((4*s-1)*(s-1)^2 * b^3 - 2*(7*s^3-6*s^2+1)*b^2 + (32*s^3 - 36*s^2 + 9*s + 2)*b + 2*(s-1))*v^4 + ((1-2*s)*(s-1)*(11*s^2-10*s
+2)*b^3 + (9*s^4 - 12*s^3 - s^2 + 4*s - 1)*b^2 + (5*s - 48*s^4 -
41*s^2 + 81*s^3 + 1)*b - (1-s)^2)*v^3 + ((1 + 21*s^4 - 10*s + 34*s^2 - 45*s^3)*b^3 + 2*s*(s-1)*(s^2-s+1)*b^2 + s*(s-1)*(16*s^2-13*s+1)*b)*v^2 + (2*s*(1-s)*(2*s-1)^2 * b^3 - s^2 * (1-s)^2 * b^2 - 2*s^2 * (1-s)^2 * b)*v + b^3 * s^2 * (1-s)^2;
poly v21l = 3*(s-1)*(2*s-1)^3 * b * v^6 - (2*s-1)^2 * ((s^2 - 4*s +
1)*b^2 + (23*s^2 - 29*s + 8)*b + 1)*v^5 + (2*s-1)*((s-1)*(7*s^2 - 5*s
+ 1)*b^3 + 2*(5*s^3 - 12*s^2 + 6*s - 1)*b^2 + (59*s^3 - 96*s^2 + 51*s - 7)*b + 2*(s-1))*v^4 + ((1-s)*(31*s^3 - 34*s^2 + 14*s - 2)*b^3 +
(-37*s^2 + 48*s^3 + 10*s - 21*s^4 - 1)*b^2 + (29*s + 141*s^3 - 2 -
69*s^4 - 101*s^2)*b - (1-s)^2)*v^3 + ((6*s^2 - 6*s +1)*(2*s-1)^2 * b^2 + 2*s*(s-1)*(2*s-1)^2 * b + s*(s-1)*(19*s^2 - 19*s + 4))*b*v^2 + (1-s)*(2*s*(2*s-1)^2 * b^2 - s^2 * (1-s)*b - 2*s^2 * (1-s))*b*v + s^2 *
b^3 * (1-s)^2;
Post Posted: Thu May 15, 2008 3:35 pm
  Post subject:  factoring lists  Reply with quote
Specifying

option(redSB)

before the facstd() call performs the desired simplifications in this example. I am now experimenting with more complicated examples.
Post Posted: Thu May 08, 2008 12:07 pm
  Post subject:  factoring lists  Reply with quote
Dear list members,

I am using Singular to calculate the intersections of polynomials that Maple 11 has had problems with. (My solution sets are infinite, and Maple's polynomial arithmetic apparently is particular poor in such cases.) After defining the ring, polynomials
and ideal, I use facstd. I would like to factorise my results further than at present.

For example, the appended code produces the following output:

[1]:
_[1]=v
_[2]=b3-b2v+3bv2-2bv-v3
[2]:
_[1]=9v-4
_[2]=b-2v
[3]:
_[1]=v-1
_[2]=b-v

Thus, [1,2] simplifies to "=b" and [3,2] to "=b-1". How can I ask Singular to perform these simplifications?

Thank you,

Colin Rowat, Department of Economics, University of Birmingham

APPENDED CODE

LIB "primdec.lib";
ring r=0,(b,s,v),lp;
poly v11h= b^3 + v^3 - 2*b*v;
poly v21h= v^3 - 3*b*v^2 + b^2*v + 2*b*v -b^3;
ideal i1121h = v11h,v21h;
list fi1121h = facstd(i1121h);
fi1121h;
Post Posted: Wed May 07, 2008 9:52 pm


It is currently Fri May 13, 2022 11:04 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group