MathGroup Archive 2001

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

Search the Archive

RE: Plot[f[x], {x,a,b}] Not Reaching End Points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29050] RE: [mg29028] Plot[f[x], {x,a,b}] Not Reaching End Points
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sat, 26 May 2001 21:53:41 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I think it is a minor bug in the Mathematica plotting algorithm that it does
not automatically include valid endpoints in the plot.

I tried the following, but it did not work either.

f[n_][x_] := (1 - x)^n

ParametricPlot[{x, f[0.1][x]}, {x, 0, 1},
   PlotRange -> {0, 1}, PlotPoints -> 100];

However, the following trick does work, by putting the endpoint beyond x =
1. It doesn't even generate an error message!

Plot[ f[0.1][x](1 - UnitStep[x - 1]), {x, 0, 1.1}];

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/


> From: aes [mailto:siegman at stanford.edu]
To: mathgroup at smc.vnet.net
>
> When I execute
>
>       n=0.1;   Plot[ (1-x)^n, {x,0,1} ]
>
> the plot stops well short of dropping all the way to the baseline on the
> steeply falling edge as x approaches 1 --- even if I use PlotRange->All
> or expand to something unreasonable like PlotPoints->10000.
>
> I understand that a Plot routine can have difficulties dealing with
> singularities or rapidly varying functions within the range to be
> plotted -- but it seems surprising to me that it should totally pass
> over or omit an explicitly stated, nonsingular end point.
>



  • Prev by Date: Re: Re: OOP in Mathematica
  • Next by Date: Re: OOP
  • Previous by thread: Re: Plot[f[x], {x,a,b}] Not Reaching End Points
  • Next by thread: RE: Plot[f[x], {x,a,b}] Not Reaching End Points