Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to find all the solutions to the following system of 8 polynomial equations for the variables w1, w2, w3, w4, w5, w6, w7, w8

eqs = {1/162 (-1 + 2^(1/3))^3 (-27 w1^3 - 27 w1^2 w3 + 54 w1 w2 w3 + 
    18 w1 w3^2 + w3^3 - 216 w1^2 w4 + 216 w1 w2 w4 - 
    72 w1 w3 w4 - 108 w1^2 w5 + 54 w1 w2 w5 - 72 w1 w3 w5 + 
    36 w2 w3 w5 - 3 w3^2 w5 - 144 w1 w4 w5 + 72 w2 w4 w5 - 
    24 w3 w4 w5 - 27 w1 w5^2 - 9 w3 w5^2 - 24 w4 w5^2 - 2 w5^3) - 1/2 w1 Log[2] == 0,

   -(1/54) (-1 + 2^(1/3))^3 (27 w1^2 w2 - 18 w2^3 + 18 w1^2 w3 + 
    18 w1 w2 w3 - 36 w2^2 w3 + 12 w1 w3^2 - 9 w2 w3^2 + 2 w3^3 + 
    72 w1 w2 w4 - 72 w2^2 w4 + 24 w2 w3 w4 - 18 w1^2 w5 + 
    54 w1 w2 w5 - 18 w2^2 w5 + 18 w2 w3 w5 + 2 w3^2 w5 + 
    24 w2 w4 w5 - 12 w1 w5^2 + 15 w2 w5^2 - 2 w3 w5^2 - 2 w5^3) - 1/2 w2 Log[2] == 0,

    1/54 (-1 + 2^(1/3))^3 (27 w1^2 w2 - 9 w1^2 w3 + 18 w1 w2 w3 + 
    18 w2^2 w3 - 9 w1 w3^2 + 33 w2 w3^2 + 5 w3^3 - 72 w1^2 w4 + 
    72 w1 w2 w4 - 144 w1 w3 w4 + 120 w2 w3 w4 - 40 w3^2 w4 - 
    63 w1^2 w5 + 36 w1 w2 w5 + 18 w2^2 w5 - 96 w1 w3 w5 + 
    48 w2 w3 w5 - 26 w3^2 w5 - 24 w2 w4 w5 - 32 w3 w4 w5 - 
    6 w1 w5^2 - 9 w2 w5^2 - 15 w3 w5^2 + 8 w4 w5^2 + w5^3 - 
    27 w1^2 w6 - 54 w1 w2 w6 + 54 w2^2 w6 - 54 w1 w3 w6 + 
    18 w2 w3 w6 - 15 w3^2 w6 + 72 w1 w4 w6 - 72 w2 w4 w6 + 
    24 w3 w4 w6 + 54 w1 w5 w6 - 54 w2 w5 w6 + 6 w3 w5 w6 + 
    24 w4 w5 w6 + 9 w5^2 w6 + 72 w1^2 w7 - 144 w1 w2 w7 + 
    72 w2^2 w7 + 48 w1 w3 w7 - 48 w2 w3 w7 + 8 w3^2 w7 + 
    48 w1 w5 w7 - 48 w2 w5 w7 + 16 w3 w5 w7 + 8 w5^2 w7) - 1/2 w3 Log[2] == 0,

    1/108 (-1 + 2^(1/3))^3 (9 w1^2 w3 + 3 w1 w3^2 + w3^3 - 
    18 w1^2 w4 + 18 w2^2 w4 + 12 w1 w3 w4 + 24 w2 w3 w4 + 
    18 w3^2 w4 - 144 w1 w4^2 + 120 w2 w4^2 - 56 w3 w4^2 + 
    27 w1^2 w5 + 18 w1 w3 w5 + 6 w2 w3 w5 + 6 w3^2 w5 - 
    60 w1 w4 w5 + 36 w2 w4 w5 - 28 w3 w4 w5 - 32 w4^2 w5 - 
    6 w1 w5^2 + 6 w2 w5^2 - 3 w3 w5^2 - 14 w4 w5^2 - w5^3 + 
    6 w3^2 w6 - 24 w3 w4 w6 + 24 w4^2 w6 - 18 w1^2 w7 - 
    36 w1 w2 w7 + 36 w2^2 w7 - 60 w1 w3 w7 + 36 w2 w3 w7 - 
    18 w3^2 w7 + 96 w1 w4 w7 - 96 w2 w4 w7 + 32 w3 w4 w7 + 
    36 w1 w5 w7 - 36 w2 w5 w7 - 4 w3 w5 w7 + 32 w4 w5 w7 + 
    6 w5^2 w7 + 216 w1^2 w8 - 432 w1 w2 w8 + 216 w2^2 w8 + 
    144 w1 w3 w8 - 144 w2 w3 w8 + 24 w3^2 w8 + 144 w1 w5 w8 - 
    144 w2 w5 w8 + 48 w3 w5 w8 + 24 w5^2 w8) - 1/2 w4 Log[2] == 0,

    1/54 (-1 + 2^(1/3))^3 (9 w1^2 w3 + 12 w1 w3^2 + 3 w2 w3^2 + 
    3 w3^3 + 72 w1^2 w4 + 72 w1 w3 w4 + 16 w3^2 w4 + 9 w1^2 w5 + 
    9 w1 w2 w5 + 33 w1 w3 w5 + 12 w2 w3 w5 + 16 w3^2 w5 - 
    84 w1 w4 w5 + 48 w2 w4 w5 - 32 w3 w4 w5 - 36 w1 w5^2 + 
    15 w2 w5^2 - 16 w3 w5^2 - 12 w4 w5^2 - 5 w5^3 - 27 w1^2 w6 + 
    54 w1 w2 w6 + 18 w1 w3 w6 + 18 w2 w3 w6 + 9 w3^2 w6 - 
    72 w1 w4 w6 - 24 w3 w4 w6 - 81 w1 w5 w6 + 27 w2 w5 w6 - 
    33 w3 w5 w6 + 12 w4 w5 w6 - 54 w1 w6^2 + 27 w2 w6^2 - 
    18 w3 w6^2 - 144 w1^2 w7 + 108 w1 w2 w7 - 120 w1 w3 w7 + 
    48 w2 w3 w7 - 24 w3^2 w7 + 12 w1 w5 w7 - 24 w2 w5 w7 + 
    4 w3 w5 w7 + 4 w5^2 w7 + 72 w1 w6 w7 - 36 w2 w6 w7 + 
    24 w3 w6 w7) - 1/2 w5 Log[2] == 0,

   -(1/162) (-1 + 2^(1/3))^3 (-9 w1 w3^2 - 9 w2 w3^2 - 8 w3^3 - 
    72 w1 w3 w4 - 48 w3^2 w4 - 27 w1 w2 w5 - 9 w1 w3 w5 - 
    18 w2 w3 w5 - 18 w3^2 w5 + 36 w1 w4 w5 + 48 w3 w4 w5 + 
    54 w1 w5^2 - 27 w2 w5^2 + 39 w3 w5^2 - 12 w4 w5^2 - 2 w5^3 + 
    108 w1 w3 w6 - 108 w2 w3 w6 + 18 w3^2 w6 + 432 w1 w4 w6 - 
    216 w2 w4 w6 + 288 w3 w4 w6 + 243 w1 w5 w6 - 81 w2 w5 w6 + 
    207 w3 w5 w6 - 36 w4 w5 w6 - 27 w5^2 w6 + 81 w2 w6^2 + 
    54 w3 w6^2 - 216 w4 w6^2 - 162 w5 w6^2 - 54 w6^3 + 
    216 w1^2 w7 - 108 w1 w2 w7 + 360 w1 w3 w7 - 144 w2 w3 w7 + 
    120 w3^2 w7 - 108 w1 w5 w7 + 72 w2 w5 w7 - 36 w3 w5 w7 - 
    12 w5^2 w7 - 648 w1 w6 w7 + 324 w2 w6 w7 - 360 w3 w6 w7 + 
    216 w6^2 w7) - 1/2 w6 Log[2] == 0, 

    1/108 (-1 + 2^(1/3))^3 (w3^3 + 12 w1 w3 w4 + 12 w2 w3 w4 + 
    8 w3^2 w4 + 96 w1 w4^2 + 64 w3 w4^2 + 15 w1 w3 w5 + 
    9 w3^2 w5 + 84 w1 w4 w5 + 12 w2 w4 w5 + 68 w3 w4 w5 - 
    32 w4^2 w5 + 30 w1 w5^2 + 6 w2 w5^2 + 29 w3 w5^2 - 
    40 w4 w5^2 - 14 w5^3 + 27 w1^2 w6 + 54 w1 w3 w6 + 
    15 w3^2 w6 + 36 w1 w4 w6 + 36 w2 w4 w6 + 36 w3 w4 w6 - 
    96 w4^2 w6 + 63 w1 w5 w6 + 18 w2 w5 w6 + 63 w3 w5 w6 - 
    144 w4 w5 w6 - 60 w5^2 w6 + 27 w1 w6^2 + 45 w3 w6^2 - 
    72 w4 w6^2 - 81 w5 w6^2 - 54 w6^3 + 90 w1^2 w7 + 
    36 w1 w2 w7 + 144 w1 w3 w7 + 36 w2 w3 w7 + 58 w3^2 w7 - 
    480 w1 w4 w7 + 192 w2 w4 w7 - 256 w3 w4 w7 - 336 w1 w5 w7 + 
    120 w2 w5 w7 - 196 w3 w5 w7 + 32 w4 w5 w7 + 14 w5^2 w7 - 
    396 w1 w6 w7 + 72 w2 w6 w7 - 252 w3 w6 w7 + 288 w4 w6 w7 + 
    204 w5 w6 w7 + 180 w6^2 w7 + 336 w1 w7^2 - 168 w2 w7^2 + 
    168 w3 w7^2 - 168 w6 w7^2 - 648 w1^2 w8 + 432 w1 w2 w8 - 
    720 w1 w3 w8 + 288 w2 w3 w8 - 192 w3^2 w8 + 144 w1 w5 w8 - 
    144 w2 w5 w8 + 48 w3 w5 w8 + 24 w5^2 w8 + 864 w1 w6 w8 - 
    432 w2 w6 w8 + 432 w3 w6 w8 - 216 w6^2 w8) - 1/2 w7 Log[2] == 0,

    1/324 (-1 + 2^(1/3))^3 (3 w3^2 w4 + 9 w2 w4^2 + 3 w3 w4^2 + 
    52 w4^3 + 12 w3 w4 w5 + 48 w4^2 w5 + 6 w3 w5^2 + 30 w4 w5^2 + 
    8 w5^3 + 54 w1 w4 w6 + 18 w3 w4 w6 - 9 w4^2 w6 + 
    27 w1 w5 w6 + 9 w3 w5 w6 + 18 w4 w5 w6 + 27 w5^2 w6 + 
    27 w4 w6^2 + 54 w5 w6^2 + 27 w6^3 + 36 w1 w3 w7 + 
    12 w3^2 w7 + 180 w1 w4 w7 + 36 w2 w4 w7 + 132 w3 w4 w7 - 
    204 w4^2 w7 + 144 w1 w5 w7 + 18 w2 w5 w7 + 108 w3 w5 w7 - 
    228 w4 w5 w7 - 108 w5^2 w7 + 108 w1 w6 w7 + 108 w3 w6 w7 - 
    216 w4 w6 w7 - 252 w5 w6 w7 - 216 w6^2 w7 - 468 w1 w7^2 + 
    108 w2 w7^2 - 276 w3 w7^2 + 264 w4 w7^2 + 180 w5 w7^2 + 
    360 w6 w7^2 - 112 w7^3 + 324 w1^2 w8 + 432 w1 w3 w8 + 
    144 w3^2 w8 - 1296 w1 w4 w8 + 648 w2 w4 w8 - 648 w3 w4 w8 - 
    648 w1 w5 w8 + 216 w2 w5 w8 - 360 w3 w5 w8 + 36 w5^2 w8 - 
    648 w1 w6 w8 - 432 w3 w6 w8 + 648 w4 w6 w8 + 432 w5 w6 w8 + 
    324 w6^2 w8 + 1728 w1 w7 w8 - 864 w2 w7 w8 + 864 w3 w7 w8 - 
    864 w6 w7 w8) - 1/2 w8 Log[2] == 0}

I tried

NSolve[ eqs, {w1, w2, w3, w4, w5, w6, w7, w8}, Reals]

because I am interested only in real solutions for w1, ..., w8 but it takes a very long time without producing an output. Do you have any suggestions to overcome this problem?

share|improve this question
    
How about use FindRoot?It can give some solutions,but maybe miss some solutions. –  Chenminqi Jul 7 at 8:44
    
The thing is that I need to find all the solutions –  Michele Jul 7 at 11:35

1 Answer 1

NSolve will most probably not lead to a solution. Here are some hints to nevertheless find numerical solutions:

Use vars = list of left hand sides of the equations eqs.

You easily notice that vars2 = vars.vars == 0 for w1 == 0, w2 ==0, ..., w8 == 0 (the trivial solution).

Play around with Random[] to find non-trivial numerical solutions thus

a = 5; 
r := a*(-1 + 2*Random[])
FindRoot[vars, {w1, r}, {w2, r}, {w3, r}, {w4, r}, {w5, r}, {w6, r}, {w7, r}, {w8, r}]

(* {w1 -> 1.0866647931342157, w2 -> -6.495637628594321, 
    w3 -> 0.4002754924331578, w4 -> 0.33218420848258684, 
    w5 -> -6.433160564214913, w6 -> 7.158518588749012, 
    w7 -> -0.8792094540870672, w8 -> 0.32592467680231985} *)

For small a you will find the trivial solution, for a at about 4 to 5 non-trivial solutions appear.

Regards, Wolfgang

share|improve this answer
    
Why not RandomReal[{-5,5}]? –  Chenminqi Jul 7 at 10:42
    
@RunnyKine Thanks you for bringing my text into the correct format. How can I avoid bothering you and do it correctky myself? –  Dr. Wolfgang Hintze Jul 7 at 11:13
    
You're welcome. To learn to do it yourself see here and specifically on the part that talks about editing posts. –  RunnyKine Jul 7 at 14:59
    
With FindRoot I will miss some solutions, and I need all the solutions. I can find all the solution by making the hypothesis that 4 ws are zero: repl = {w5 -> 0, w6 -> 0, w7 -> 0, w8 -> 0}; NSolve[eqs /. repl, {w1, w2, w3, w4}] . Is there a way to improve on this and setting to zero 3,2,1 equations iteratively? –  Michele Jul 10 at 20:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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