MathGroup Archive 2006

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

Search the Archive

Re: Eliminate Complex Roots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64366] Re: [mg64348] Eliminate Complex Roots
  • From: Pratik Desai <pdesai1 at umbc.edu>
  • Date: Tue, 14 Feb 2006 01:31:42 -0500 (EST)
  • References: <200602130815.DAA12562@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

bghiggins at ucdavis.edu wrote:

>Hi All,
>
>Suppose I have the following equation and I want to plot the real roots
>using Plot as a function of the parameter b
>
>a^3 + 10*a^2 - 15*a + b == 0
>
>For the problem I am interested I have a set of algebraic equations of
>at least order 3, but this is simpler enough to explain what the issue
>is.
>
>Now if I want just the Real root I can do the following:
>
>
>Sol2[b_] := DeleteCases[Solve[a^3 + 10.*a^2 - 15*a + b ==
>     0, a], {___, x_ -> Complex[y_, z_], ___}]
>
>and evaluating
>
>Sol2[20]
>
>{{a -> -11.46104034060055}}
>
>Gives the desired result. So far so good. Now suppose I want to plot
>the solutions asa function of b. My immediate thought was to try
>
>Plot[Evaluate[a /. Sol2[b]], {b, -10, 30}, PlotStyle -> {Red, Blue,
>Magenta}]
>
>This does give the desired result, but gives error messages when it
>tries to plot a complex quantity. That is the DeleteCases does not seem
>to work within Plot, even though I wrapped everything with evaluate.
>
>Any suggestions?
>
>Thanks much
>
>Brian
>
>  
>
Perhaps using FindInstance? Here is my attempt anyway

Clear[a,b]
ListPlot[Flatten[a/.Table[FindInstance[a^3 + 10*a^2 - 15*a + b == 
0,a,Reals],{b,-10,30}]//N],PlotJoined->True,PlotRange->All]


  • Prev by Date: Using a text editor like interface for Mathematica?
  • Next by Date: Joining List of Lists
  • Previous by thread: Eliminate Complex Roots
  • Next by thread: Re: Eliminate Complex Roots