MathGroup Archive 2002

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

Search the Archive

RE: Re: Mathematica 4.2 & Strange Plot results

  • To: mathgroup at
  • Subject: [mg36386] RE: [mg36328] Re: Mathematica 4.2 & Strange Plot results
  • From: "DrBob" <drbob at>
  • Date: Wed, 4 Sep 2002 02:56:43 -0400 (EDT)
  • Reply-to: <drbob at>
  • Sender: owner-wri-mathgroup at

Plot[Evaluate[Sin[x]/Sin[x]], {x, -2.5, -1.5}]

Gives the "expected" graph.

Bobby Treat

-----Original Message-----
From: Ian McInnes [mailto:ian at] 
To: mathgroup at
Subject: [mg36386] [mg36328] Re: Mathematica 4.2 & Strange Plot results

This results from:
a) the fact that Mathematica implements division as multiplication and
b) the use of machine precision for plotting the graph
c) the default scaling of the y axis revealing the resultant

Although Sin[x]/Sin[x] gives 1 when evaluated symbolically (x
substituting a floating-point value for x results in composite division
being performed numerically, with consequent inaccuracy. This can be
verified by the following:
In[1]:= FullForm[HoldForm[Sin[x]/Sin[x]]
Out[1]//FullForm= HoldForm[Times[Sin[x], Power[Sin[x], -1]]]

By default, Mathematica scales the y axis such that the small
are visible. The PlotRange option may be given to explicitly specify the
range for the y axis (for example PlotRange->{0, 2}).

Ian McInnes.

"Ken Thomson" <someone at> wrote in message
news:akn016$ljr$1 at
> I would expect that
> Plot[Sin[x]/Sin[x], {x, -2.5, -1.5}]
> would produce a horizontal line at y=1.
> However, on my Windows XP computer it produces a graph where the y
> less than 1 at several points.  Most notibly between x=-1.6 and x=-1.8
> Is this just an isolated case? Or does it happen to others?  If so -
> Regards,
> Ken.

  • Prev by Date: RE: Mathematica 4.2 Benchmarks?
  • Next by Date: RE: RE: Generating Two Unit Orthogonal Vectors to a 3D Vector
  • Previous by thread: Re: Mathematica 4.2 & Strange Plot results
  • Next by thread: RE: How to ...? Piecewise Function Definition