MathGroup Archive 2006

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

Search the Archive

Re: Eliminate Complex Roots

  • To: mathgroup at
  • Subject: [mg64366] Re: [mg64348] Eliminate Complex Roots
  • From: Pratik Desai <pdesai1 at>
  • Date: Tue, 14 Feb 2006 01:31:42 -0500 (EST)
  • References: <>
  • Sender: owner-wri-mathgroup at

bghiggins at 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
>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
>{{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,
>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
Perhaps using FindInstance? Here is my attempt anyway

ListPlot[Flatten[a/.Table[FindInstance[a^3 + 10*a^2 - 15*a + b == 

  • 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