Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*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 2002

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

Search the Archive

Re: Plotting problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35341] Re: Plotting problem
  • From: BobHanlon at aol.com
  • Date: Tue, 9 Jul 2002 06:47:50 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 7/8/02 4:39:12 AM, shodgen at mindspring.com writes:

>I'm a total Mathematica newbie, and I'm trying to get it to plot a simple
>rational eq. in such a way that it indicates where missing points are.
>Since I'm not sure how you'd prefer the eq. expressed, I've typed in in
>the
>parents so there can be no question of where the denominator is, as well
>as
>a cell expression.
>
>(3 x^2 - 5 x + 2)/(x - 1)
>
>Cell[BoxData[
>    FractionBox[
>      RowBox[{
>        RowBox[{"3",
>          SuperscriptBox["x", "2"]}], "-",
>        RowBox[{"5", "x"}], "+", "2"}],
>      RowBox[{"x", "-", "1"}]]], "Input"]
>
>When I Plot[], this is just draws a straight line.  There is no indication
>where the hole is. How can I get this "fully correct" graph?
>

f1[x_] := (3*x^2 - 5*x + 2)/(x - 1);

f2[x_] := Evaluate[Simplify[f1[x]]];

Plot[f2[x], {x, 0, 5},
    {PlotStyle -> RGBColor[0, 0, 1],
 
      Epilog->{
          RGBColor[1, 0, 0],
 
          AbsolutePointSize[4],
 
          ((Point[{x, f2[x]}]/.#)&/@
              
  Solve[Denominator[f1[x]]==0, x])}}];

f1[x_] := (3*x^3-14*x^2+17*x-6)/
      ((x - 1)*(x-3));

f2[x_] := Evaluate[Simplify[f1[x]]];

Plot[f2[x], {x, 0, 5},
    {PlotStyle -> RGBColor[0, 0, 1],
 
      Epilog->{
          RGBColor[1, 0, 0],
 
          AbsolutePointSize[4],
 
          ((Point[{x, f2[x]}]/.#)&/@
              
  Solve[Denominator[f1[x]]==0, x])}}];


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: RE: Plotting problem
  • Next by Date: Re: Yet another Version 4.2 Integration howler
  • Previous by thread: RE: Plotting problem
  • Next by thread: RE: Plotting problem