Plotting Piecewise Functions with Discontinuites

• To: mathgroup at christensen.cybernetics.net
• Subject: [mg1941] Plotting Piecewise Functions with Discontinuites
• From: "Paul J. Simonich" <simonichpj%dfms%usafa at dfmail.usafa.af.mil>
• Date: Wed, 23 Aug 1995 22:33:28 -0400
• Organization: U. S. Air Force Academy

```I'm trying to plot a piecewise function with a discontinuity at x=3:

f[x_]:=Which[x<=-3,3,
x>=-3 && x<=3, Abs[x],
x>3,-3]
Plot[f[x],{x,-7,7},AxesLabel->{x,y},PlotRange->All];

Mathematica draws a veritcal line connecting the points of discontinuity.
Is there a "simple way" to get Mathematica to not evaluate the function
exactly at the point of discontinuity besides using Show[ ] with two
separate plots?

Thanks in Advance.
Capt Paul Simonich
Dept of Mathematical Sciences
US Air Force Academy

```

• Prev by Date: Re: question about nest
• Next by Date: Re: ListPlot3D and Its Axes
• Previous by thread: molecular structures
• Next by thread: Re: Plotting Piecewise Functions with Discontinuites