Ask Your Question

Revision history [back]

solving simultaneous equations trouble using solve()

Hi, I am having a lot of difficulty solving the following set of equations using solve. I am gonna insert my code below:

  sage:var('x1,x2,x3,w1,w2,w3')
  sage:f=w1+w2+w3==2;g=(w1*x1)+(w2*x2)+(w3*x3)==0;h=(w1*(x1)^2)+(w2*(x2)^2)+(w3*(x3)^2)==(2/3);j=(w1*(x1)^3)+(w2*(x2)^3)+(w3*(x3)^3)==0;k=(w1*(x1)^4)+(w2*(x2)^4)+(w3*(x3)^4)==(2/5);l=(w1*(x1)^5)+(w2*(x2)^5)+(w3*(x3)^5)==0
  sage: solve([f,g,h,j,k,l],w1,w2,w3,x1,x2,x3,solution_dict=True)

The output is:

 [{w1 + w2 + w3: 2},
 {w1*x1 + w2*x2 + w3*x3: 0},
 {w1*x1^2 + w2*x2^2 + w3*x3^2: 2/3},
 {w1*x1^3 + w2*x2^3 + w3*x3^3: 0},
 {w1*x1^4 + w2*x2^4 + w3*x3^4: 2/5},
 {w1*x1^5 + w2*x2^5 + w3*x3^5: 0}]

obviously this output doesn't help me as I need the solution for all six variables. Any help is appreciated please.