RE: algebraic solutions
- To: mathgroup@smc.vnet.net
- Subject: [mg11305] RE: [mg11193] algebraic solutions
- From: Ersek_Ted%PAX1A@mr.nawcad.navy.mil
- Date: Wed, 4 Mar 1998 01:40:09 -0500
Daniel wrote: ---------- | |I'm a fairly novice Mathematica user, and I'm having a problem. I asked |a more experienced user and he could solve it, either. I hope there is |a solution and that you all can help. | |I want to find the roots of the following equation: | | z^5 + 2z^3 - p + 1 = 0 | |I want to solve for z in terms of p. Now, if I pick some random number |for p, I can get mathematica to solve for z, but I cant get a solution |in terms of p. Alternatively, I would like to be able to plot this |function with p included as part of the vertical axis. | What you are trying to get is a closed form solution for a fifth order polynomial. This can only be done if you are satisfied with horribly complicated expressions in terms of Elliptic functions. Mathematica will not do it for you. I think the designers figured such a solution is of no practical use. For degrees higher than five it gets even worse. This is a famous fact in mathematics. Now for plotting the roots. I only had one real root for any value of (p) that I looked at. I suppose you want to plot the roots in the complex plane. This can be done, but the programming involved is a little deep. I will give some explanation. Using Version 3.0.1 under Windows 95 I selected: Cell - Default Output Format Type - OutputForm This ensures the format is easy to read after I past into this e-mail. The line below is a function that finds all roots for a given value of (p). As an example I find all roots for (p=3). In[1]:= sln[p_]:=NRoots[ z^5 + 2z^3 - p + 1 == 0,z]; sln[3] Out[1]= z == -0.629144 - 0.766896 I || z == -0.629144 + 0.766896 I || z == 0.18215 - 1.49682 I || z == 0.18215 + 1.49682 I || z == 0.893987 The next line makes a list of the roots for (p=3). In[2]:= Apply[#2&,List@@sln[3],{1}] Out[2]= {-0.629144 - 0.766896 I, -0.629144 + 0.766896 I, 0.18215 - 1.49682 I, 0.18215 + 1.49682 I, 0.893987} Now I define a function "RootsFound[p_]". This function presents each root as {Re[root], Im[root]}. In[3]:= RootsFound[p_]:=Apply[{Re[#2],Im[#2]}&, List@@NRoots[z^5+2 z^3-p+1==0,z],{1}] In[4]:= RootsFound[3] Out[4]= {{-0.629144, -0.766896}, {-0.629144, 0.766896}, {0.18215, -1.49682}, {0.18215, 1.49682}, {0.893987, 0}} Now I make a table of data that contains the roots for RootsFound[-100], RootsFound[-98], RootsFound[-96], .... , RootsFound[100] In[5]:= data=Table[RootsFound[p],{p,-100,100,2}]; The line below makes a plot of the roots in the complex plane. In[6]:= PlotedRoots=MapThread[ListPlot[#,PlotJoined->True, DisplayFunction->Identity]&,data]; Show[PlotedRoots,DisplayFunction->$DisplayFunction] Out[6] - Graaphics Not Shown - Ted Ersek