2
$\begingroup$

I need to solve a system of two polynomials with integer coefficients in two variables, $\{Q_1(w,z)=0,\,Q_2(w,z)=0\}$, and want to compute all real solutions. I'm able to run Solve in Mathematica and find that there are 69 solutions, 13 of which are real.

My questions are:

  1. Can I fully trust that Mathematica correctly finds the number of real solutions to this system, and that these solutions are correct?

  2. If so, what theoretical results ensure that the Solve algorithm finds all the solutions to the system?

I read the documentation about solving polynomial systems here and here. Unfortunately I don't have the necessary background in algebra (e.g., Grobner basis) to understand the algorithm.

Here is the code I used, thank you very much for your help.

First we define the polynomials


Q1[w_, z_] := -168 w^11 - 1386 w^10 z + w^9 (730 - 420 z^2) - 
  9 w^8 z (-489 + 370 z^2) + 14 w^6 z (-135 + 256 z^2 + 6 z^4) + 
  6 w^2 z^5 (747 - 282 z^2 + 29 z^4) - 
  8 w^3 z^4 (513 + 209 z^2 + 39 z^4) - 16 w^7 (45 - 26 z^2 + 72 z^4) +
   z^7 (270 + 79 z^2 + 78 z^4) + 
  30 w^4 z^3 (-249 - 38 z^2 + 138 z^4) - 
  2 w z^6 (-1134 + 67 z^2 + 186 z^4) - 
  12 w^5 z^2 (171 - 363 z^2 + 298 z^4)

Q2[w_, z_] := -126 w^11 - 84 w^10 z + w^9 (489 - 1110 z^2) - 
  8 w^8 z (-13 + 72 z^2) + 12 z^7 (216 - 65 z^2 + 4 z^4) + 
  6 w^7 (-45 + 256 z^2 + 10 z^4) - 
  12 w^4 z^3 (342 + 209 z^2 + 52 z^4) + 
  6 w^3 z^4 (1245 - 658 z^2 + 87 z^4) + 
  3 w z^6 (630 + 237 z^2 + 286 z^4) - 
  12 w^6 z (57 - 242 z^2 + 298 z^4) - 
  4 w^2 z^5 (-1701 + 134 z^2 + 465 z^4) + 
  6 w^5 z^2 (-747 - 190 z^2 + 966 z^4)

Then, use Solve to obtain the number of solutions, and then restrict to real solutions

allsols = Solve[{Q1[w, z] == 0, Q2[w, z] == 0}, {z, w}]
Length[allsols]
(* 69 *)

realsols = Solve[{Q1[w, z] == 0, Q2[w, z] == 0}, {z, w}, Reals]
Length[realsols]
(* 13 *)

Finally, I want to check if any solutions satisfies $0<w<1$ and $z>0$. I find that none of the solutions satisfy these conditions.

restrsols = Solve[{Q1[w, z] == 0, Q2[w, z] == 0, 0 < w < 1, z > 0}, {z, w}, Reals]
Length[restrsols]
(* 0 *)
$\endgroup$
  • 5
    $\begingroup$ The algorithms used are well-studied and proven in the literature. There is no proof that the underlying software implementation is free of bugs. That stated, problems in this particular area tend to be rare and I cannot recall the last time I saw any such. $\endgroup$ – Daniel Lichtblau Jun 26 at 19:29
2
$\begingroup$

I believe you missed a lot of solutions, namely, infinitely many of them.

As Daniel points out in the comment below, there is a multiple root at (0,0). Apart from that no roots are missed. Have a look

realsols = Solve[{Q1[w, z] == 0, Q2[w, z] == 0}, {z, w}, Reals]
intersections={w, z} /. realsols//N
ContourPlot[{Q1[w,z]==0,Q2[w,z]==0},{w,-2,2},{z,-2,2},
                                    PlotPoints->100,
                                    Epilog -> {Red, PointSize[Large], Point@intersections}]

enter image description here

And now we zoom in

ContourPlot[{Q1[w,z]==0,Q2[w,z]==0},
             {w,0.015,0.02},{z,-0.02,-0.015},
             PlotPoints->100,ContourStyle->{Thickness[0.02],Red}]

enter image description here

The interpretation is likewise can be found in the Daniel comment, namely, "the zero sets intersect tangentially and very slowly separate". But they are not the roots.

| improve this answer | |
$\endgroup$
  • 4
    $\begingroup$ Not an infinite set. That can only happen in the 2 equation, 2 unknown case if the polynomials share a nontrivial factor. PolynomialGCD indicates they do not. And GroebnerBasis[{Q1[w, z], Q2[w, z]}, {w, z}] shows there is a zero of high multiplicity at the origin, which means the zero sets intersect tangentially and very slowly separate. Hence that zoomed almost-the-same-curve image. $\endgroup$ – Daniel Lichtblau Jun 27 at 16:18
  • 2
    $\begingroup$ @DanielLichtblau Good point, thank you for noting this! I was so convinced by the plot that even did not care to investigate further. I made edits to the post now. $\endgroup$ – yarchik Jun 28 at 19:02
  • $\begingroup$ Thanks both for your help! $\endgroup$ – ilan Jun 29 at 3:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.