Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Help !! plot roots of an expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72428] Re: [mg72349] Help !! plot roots of an expression
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 27 Dec 2006 06:11:18 -0500 (EST)
  • Reply-to: hanlonr at cox.net

poly=(w-w1) (w + 2  q +en^2 +  s w^3) + r;

Collect[poly,w]

s*w^4 - s*w1*w^3 + w^2 + (en^2 + 2*q - w1)*w + r - en^2*w1 - 2*q*w1

soln=Transpose[{Re[w],Im[w]}/.
        {Reduce[poly==0/.{s->2,w1->1,en->5,r->3/2},w]//ToRules}];

Plot[#,{q,-22.5,0},
        PlotStyle->{
            {AbsoluteThickness[2],AbsoluteDashing[{3,10}],Red},
            {AbsoluteDashing[{10,10}],Blue},
            {AbsoluteThickness[2],AbsoluteDashing[{3,10}],Green},
            {AbsoluteDashing[{10,10}],Orange}},
        Frame->True,Axes->False,
        PlotRange->{{-22.6,0.1},Automatic},
        ImageSize->400]&/@
    soln;

List@@(First/@Reduce[poly==0/.
            {s->2,w1->1,en->5,r->3/2},w,Reals])//N

{q<-17.778,q==-17.778,q==-11.7695,q>-11.7695}


Bob Hanlon

---- mintoo <varun.tangri at gmail.com> wrote: 
> I have a polynomial. A simple example is like this
> 
> (w-w1) (w + 2  q +en^2 +  s w^3) + r
> The actual example is more complicated.  It is a function of several
> variables e.g. q, en, s, r etc..
> I also need to Collect & FullSimplify this expression.
> Finally, from that result, I want to plot the roots of this polynomial
> (imaginary & real part) vs. q (say) or vs en etc.. other variables can
> be given fixed values.
> 
> I'll the thankful if you give me hints how to do this!!
> 


  • Prev by Date: RE: nestled plotting
  • Next by Date: Re: nestled plotting
  • Previous by thread: RE: Help !! plot roots of an expression
  • Next by thread: mapping a notation