Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6302

Plotting discontinuities using Exclusions

From John Accardi <johnaccardi@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Plotting discontinuities using Exclusions
Date 2011-11-09 11:40 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j9dos3$b75$1@smc.vnet.net> (permalink)

Show all headers | View raw


Goal: Display the definition of a rational function in factored form
to better see points of discontinuities, like holes and then plot
the function showing the hole.

Example 1:

The following does the graph correctly, showing a gap at x = 2 but
requires an undesirable function definition (I want to specify
the numerator factored).

f = (x^2 - 2 x)/(x - 2)

(-2 x + x^2)/(-2 + x)

Plot[f, {x, 0, 4}, Exclusions -> Reduce[Denominator[f] == 0, x]]


Example 2:

More desirable is to show the function with numerator factored so
students can see the zero of the bottom being the same as the zero
in the top for the hole.  For example, the following shows the function 
definition
as desired but the graph then does not show the gap for the hole:

f = x (x - 2)/(x - 2)

x

Plot[f, {x, 0, 4}, Exclusions -> Reduce[Denominator[f] == 0, x]]

I suspect that Mathematica does the cancellation (outputting x) and 
therefore
loses sight of the discontinuity for the plot.

Question:

How can I use the function definition of Example 2 and the plot output
of Example 1 in one sequence?  (I want to prevent the simplification
Mathematica does when processing the function definition.)

Thanks for any insights.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Plotting discontinuities using Exclusions John Accardi <johnaccardi@comcast.net> - 2011-11-09 11:40 +0000

csiph-web