Re: How to Eliminate
- To: mathgroup at smc.vnet.net
- Subject: [mg75076] Re: How to Eliminate
- From: "dimitris" <dimmechan at yahoo.com>
- Date: Mon, 16 Apr 2007 20:10:27 -0400 (EDT)
- References: <evsr25$14h$1@smc.vnet.net>
Note that returning the results as a list of rules is a very useful setting of Solve for further actions. I don't see many reasons why someone would not want it. E g In[20]:= Solve[x^4 + a^4 == 0, x] x^4 + a^4 /. % Out[20]= {{x -> (-(-1)^(1/4))*a}, {x -> (-1)^(1/4)*a}, {x -> (-(-1)^(3/4))*a}, {x -> (-1)^(3/4)*a}} Out[21]= {0, 0, 0, 0} Anyway...you can define your function that will use Solve in order to get the solutions and in turn returning the results as you want. In[21]:= norulSolve[eq_Equal, x_] := Solve[eq, {x}] /. {a_ -> b_} :> b An example follows now In[24]:= norulSolve[(x^4 + x^2 + x)*(x^3 + a^3) == 0, x] Out[24]= {0, -(2/(3*(-9 + Sqrt[93])))^(1/3) + ((1/2)*(-9 + Sqrt[93]))^(1/3)/ 3^(2/3), -(((1 + I*Sqrt[3])*((1/2)*(-9 + Sqrt[93]))^(1/3))/(2*3^(2/3))) + (1 - I*Sqrt[3])/(2^(2/3)*(3*(-9 + Sqrt[93]))^(1/3)), -(((1 - I*Sqrt[3])*((1/2)*(-9 + Sqrt[93]))^(1/3))/(2*3^(2/3))) + (1 + I*Sqrt[3])/(2^(2/3)*(3*(-9 + Sqrt[93]))^(1/3)), -a, (-1)^(1/3)*a, (-(-1)^(2/3))*a} And here is a nice example of application In[32]:= norulSolve[x^4 + 16 == 0, x] Factor[1/(x^4 + 16), Extension -> %] Apart[%] Out[32]= {-2*(-1)^(1/4), 2*(-1)^(1/4), -2*(-1)^(3/4), 2*(-1)^(3/4)} Out[33]= 1/((2*(-1)^(1/4) - x)*(2*(-1)^(3/4) - x)*(2*(-1)^(1/4) + x)*(2*(-1)^(3/4) + x)) Out[34]= (-1)^(1/4)/(32*(2*(-1)^(1/4) - x)) + (-1)^(3/4)/(32*(2*(-1)^(3/4) - x)) + (-1)^(1/4)/(32*(2*(-1)^(1/4) + x)) + (-1)^(3/4)/(32*(2*(-1)^(3/4) + x)) Regards Dimitris =CF/=C7 JikaiRF at aol.com =DD=E3=F1=E1=F8=E5: > Dear Members: > When I use "Solve" in order to solve polynomials with high orders, its > solutions are usually reterned in terms of a pair of nested braces, > like {{x -> 0.1}, {x -> 0.5}}. In this situation, I would like to > obtain a pair of braces such as {0.1, 0.5}. In other words, I would > like to know how to eliminate x ->. > How can I obtain my result? > > Sincerely > F. Takata.