Re: Eliminate Complex Roots
- To: mathgroup at smc.vnet.net
- Subject: [mg64407] Re: Eliminate Complex Roots
- From: bghiggins at ucdavis.edu
- Date: Thu, 16 Feb 2006 03:05:14 -0500 (EST)
- References: <200602130815.DAA12562@smc.vnet.net><dsru2d$5bv$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Pratik and Bob Thanks much for the suggestion of using FindInstance and Reduce. Pratik, your code only finds 1 root but a simple modification allows one to plot(usingListPlot) all three real roots: data = ListPlot[Partition[Flatten[N[Table[Flatten[{ b, a /. FindInstance[a^3 + 10*a^2 - 15*a + b == 0, a, Reals,3]}], {b, -20, 30, .5}]] /. {x_, y1_, y2_, y3_} -> {{x, y1}, {x, y2}, {x, y3}}], 2]] Downside with the above approach is that you cannot use PlotJoined->True. Of course, a work around is to separate out the individual roots and use MultipleListPlot or Show with multiple ListPlot Still would like to be able to do this using Plot, and thereby make use of Plots automatic gridding capabilities... Looking at Bob's suggestion, it seems I am still stuck with knowing which root to extract out for Plotting. I can in a pinch manipulate the solution from Reduce and use ListPlot as done above. Another approach that seems to work well is to use ImplicitPlot making use of its built in ContourPlot routine. For systems of equations, I also need to use Eliminate to get a single implicit equation with two unknowns and it seems to work well, but may not be general enough for the kinds of problems I am interested in, viz, plotting multiple steady states of dynamical systems as a function of a parameter. 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]
- Follow-Ups:
- Re: Re: Eliminate Complex Roots
- From: Pratik Desai <pdesai1@umbc.edu>
- Re: Re: Eliminate Complex Roots
- References:
- Eliminate Complex Roots
- From: bghiggins@ucdavis.edu
- Eliminate Complex Roots