MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: algebraic solutions



Daniel Teitelbaum wrote:
> 
> Hi all,
> 
> 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.
> 
> Thanks in advance for your help,
> 
> Daniel


You have five functions of p, not one. Here is one way to plot one of
them. It relies on the fact that the first root of an odd-degree
algebraic function in Mathematica is always real-valued.

In[3]:= algfuns = Solve[z^5  + 2z^3 - p + 1 == 0, z];

In[4]:= zp = z /. %[[1]]
                          3     5
Out[4]= Root[-1 + p - 2 #1  - #1  & , 1]

(* I assume you want p to be the independent variable, that is, along
the horizontal axis. *)

In[5]:= Plot[%, {p,0,3}]
Out[5]= -Graphics-

Will only work for other root functions in ranges where they are
real-valued.

Alternative methods using FindRoot or NSolve could also be coded without
too much trouble.


Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: Plotting
  • Next by Date: Re: Previous variable affects "/."
  • Prev by thread: algebraic solutions
  • Next by thread: Re: algebraic solutions