MathGroup Archive 2007

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

Search the Archive

Re: Plotting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72995] Re: [mg72987] Plotting
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 28 Jan 2007 00:47:50 -0500 (EST)
  • Reply-to: hanlonr at cox.net

f[x_]:=x^3-16 x^2+3 x+1;

rts=Simplify[x/.Solve[f[x]==0,x]]

{16/3 + (13*19^(2/3))/(3*((1/2)*(407 + 21*I*Sqrt[3]))^(1/3)) + 
   (1/3)*((19/2)*(407 + 21*I*Sqrt[3]))^(1/3), 
  16/3 - (13*(19/2)^(2/3)*(1 + I*Sqrt[3]))/
    (3*(407 + 21*I*Sqrt[3])^(1/3)) + 
   (1/6)*I*((19/2)*(407 + 21*I*Sqrt[3]))^(1/3)*(I + Sqrt[3]), 
  16/3 - (13*(19/2)^(2/3)*(1 - I*Sqrt[3]))/
    (3*(407 + 21*I*Sqrt[3])^(1/3)) - (1/6)*(1 + I*Sqrt[3])*
    ((19/2)*(407 + 21*I*Sqrt[3]))^(1/3)}

rts//N//Chop

{15.8062,-0.172647,0.366449}

Simplify[f/@rts]

{0,0,0}

Plot[f[x],{x,-1,20},
    Epilog->{Red,AbsolutePointSize[5],
        Point/@({#,0}&/@rts)},ImageSize->500];


Bob Hanlon

---- Rayne <ghcgwgwg at singnet.com.sg> wrote: 
> Hi all,
> I want to plot the cubic equation f(x) == x^3 - 16x^2 + 3x + 1 == 0. I had:
> 
> f==x^3-16 x^2+3 x+1 ==== 0
> Plot[f,{x,-1,20}]
> 
> but I was unable to get the plot. The error message says
> 
> Plot::plnr: f is not a machine-size real number at x == -0.999999.
> Plot::plnr: f is not a machine-size real number at x == -0.148093.
> Plot::plnr: f is not a machine-size real number at x == 0.780985.
> General::stop: Further output of Plot::plnr
>      will be suppressed during this calculation.
> 
> How do I get around this problem?
> 
> Thank you.
> 
> Regards,
> Rayne
> 


  • Prev by Date: Re: eps exports with dashes in them (important - to me, anyway)
  • Next by Date: RE: Schlegel diagram
  • Previous by thread: Plotting
  • Next by thread: Re: Plotting