Plotting Discontinuous Functions
The discont Option
The discont and fdiscont Commands
If a function with a discontinuity is being plotted, problems can occur. First, evaluation at or very near the point of discontinuity may lead to undefined values or extremely large or small values, thus creating a distorted view of the plot. Also, there may be an inappropriate connecting of neighboring points over the discontinuity.
In most straight-forward cases, Maple will detect many discontinuities in 2-D plots automatically with the default value for the adaptive option. (See plot/adaptive.) However, for large expressions, or for manually assembled animations for which the adaptive = geometric option is not recommended, Maple can no longer detect discontinuities automatically. In these cases, or if Maple fails to detect some discontinuities automatically, you can use the more expensive discont option.
In the 2-D case, the discont option can be used with the plot command when you suspect a discontinuity. The plot command uses the discont and fdiscont commands to detect discontinuities and divides the plotting range into subranges over which the plot is continuous.
The discont option takes values true and false, with false being the default. It can also accept a list of suboptions as the value. When discont is true or a list, then the procedure described above for detecting discontinuities is followed. One suboption is the showremovable option, described in the section below. Other suboptions are symbol and symbolsize to control the look of the points that are drawn to mark the points of discontinuity. Note that points are not drawn when fdiscont is used, as described below.
The discont option can be used together with the adaptive = geometric or adaptive = default options; however, this is not recommended except in rare circumstances.
The discont option is not available in the 3-D case. In this situation, it is recommended that you divide the plotting ranges into subranges to avoid the discontinuities, generate the individual plots and then combine them using the plots[display] command. The view option can be used to control the ranges in the final display.
A number of suboptions are available for the discont option.
Show removable discontinuities; t can be true, false or a list. Details are given in the Removable Discontinuities section below.
Change the symbol used to mark points of discontinuity. The symbol values t are described on the plot/options help page.
Change the symbolsize used to mark points of discontinuity; t is a positive integer.
Immediately use the fdiscont command to find discontinuities without using discont first; t can be true, false or a list. Details are given in the section below.
The discont and fdiscont commands are used by the plot command to detect the discontinuities. Normally, the discont command is applied if possible. If this command fails or is not applicable (e.g. when the input is an operator or procedure), then the fdiscont command is used.
The usefdiscont=t can be used to control how fdiscont is used. If t is true or a list, then no attempt with the discont command is made. Instead, fdiscont will be used immediately, and if t is a list, then the contents of t are passed as options to the fdiscont command. See the fdiscont help page for a description of options that the command accepts.
Note that points, indicating either function values or removable discontinuities, are never drawn when the fdiscont command is used, as this command does not return the points of discontinuity. Rather, it returns ranges in which there appear to be discontinuities.
Usually, removable discontinuities are ignored. However, if the showremovable suboption is provided, then a circle is drawn on the plot to mark the point of discontinuity.
The showremovable suboption takes the values true or false. Suboptions to showremovable may also be provided in a list. These suboptions, which include color, symbol and symbolsize, affect the symbol used to mark the discontinuity.
The showremovable suboption has no effect when an operator or procedure is being plotted. In this case, the plotting command must rely on the fdiscont command, which does not return exact points of discontinuity, as described above.
With this option, singular points of the expression that are not necessarily removable discontinuities may be plotted. Examples of these cases include the Dirac function with zero argument, or signum(1,x) for x=0.
The plot command handles the discontinuities in the tangent graph without the need of the discont option.
The following example needs the discont option.
Show the location of the removable discontinuity. (This is also the command used to create the plot from the Plotting Guide.)
Change the color and size of symbol used to mark the discontinuity.
Plot a piecewise function with a removable discontinuity.
Pass options to the fdiscont command.
Download Help Document
What kind of issue would you like to report? (Optional)