fdiscont - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


fdiscont

numerically find the discontinuities of a function over the Reals

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

fdiscont(f, domain, res, ivar, eqns)

Parameters

f

-

algebraic expression or a procedure

domain

-

the domain of interest

res

-

the desired resolution

ivar

-

the independent variable name

eqns

-

optional equations

Description

• 

fdiscont attempts to return a list of ranges, each of width res, in which there appears to be a discontinuity in the function or its first derivative.  fdiscont works via the application of divided differences.  This method will not locate point discontinuities, nor can it differentiate between cusps and singularities or jump discontinuities. Note that absolute success is not guaranteed.  In addition, ranges may be larger than res due to overlapping results, which are coalesced.

• 

fdiscont can be fooled by dense oscillatory functions (such as sin500x on 0..π); if features are found that are not expected, the resolution, res, should be made smaller.  If too few singularities are found, res should be made smaller, or in the evalhf case, the amount of internal storage (see number below) should be increased.

• 

fdiscont uses evalhf when possible.  However, in this instance, the number of ranges returned is limited by the size of the internal work array.  Use the number option to change this limit.

• 

f may be an algebraic expression in ivar or a procedure.  If f is algebraic, then ivar must be specified in ivar or domain (see below).  If f is a procedure, it may only take one argument, and must return a single value of type realcons.

• 

domain is used to define the domain of interest of f.  It may be specified as either of:

left..right

ivar= left..right

  

left and right must be of type realcons. When f is algebraic, the second form above may be used to specify ivar.  Note that the initial evaluation mesh extends at most from left-res/10 to right+res/10 under evalhf, whereas the range is strictly adhered to under evalf.

• 

res indicates the desired width for returned ranges. The minimum allowable resolution is given by 10^(-evalhf(Digits)+5) under evalhf, and 10^(-Digits+2) under evalf.  The maximum resolution for computation is (right-left)/bins, where bins is the number of bins used when generating the mesh.  If res falls outside of these bounds, it will be internally set to the closer of the two.  The default is 0.001.

• 

The available option equations eqns are:

• 

bins = integer

  

bins indicates the number of bins to be used in the evaluation mesh. Better results are generally obtained for higher mesh values, but at the expense of efficiency.  It is recommended that bins be an odd number. The default is 21.

• 

newton = true, false

  

If newton is true, then fdiscont attempts to apply an inverse modified Newton method (secant method) on each of the returned ranges. This method will not work if f is a procedure.  The inverse of f is evaluated under a secant method, to a maximum of twenty iterations.  If successful, the final point is returned, otherwise the original range of interest is returned.  This method generally works best if res is not overly restrictive (i.e. for res of magnitude 110 or 1100).  The default is false.

• 

number = integer

  

number indicates the maximum number of features (ranges) to be stored while working under evalhf mode.  This value will have no effect in evalf mode.  Note that fewer than number features may be returned (even if more exist) due to coalescing by fdiscont of overlapping features.  The default is 20.  The global variable _FullFeatures indicates if the internal work array has reached its maximum capacity.

• 

order = integer

  

order specifies the order of divided differences to use.  The default is 3, as this produces good results without excessive computation.  The minimum order is 2, while the maximum is 7.

• 

pts = true, false

  

pts indicates if evaluation points should be returned along with features.  If set to true, then coordinates from the evaluation mesh will be stored and returned, up to three levels of recursion.  If true, then output will take the form of a list of two lists, the first being the features, the second the evaluation coordinates.  The default is false.

Examples

Digits10:

fdiscontround3x12,x=0..1,107

−5.97247787204555×10−9..2.65525067174041×10−8,0.333333310326452..0.333333363941237,0.666666639409403..0.666666693024186,0.999999977055700..1.00000000958068

(1)

fdiscontΓx2,x=10..0,0.0001

−10.0000064078543..−9.99993927514037,−8.00003106980371..−7.99994084830369,−6.00005707576568..−5.99993426192709,−4.00002710954038..−3.99993920185425,−2.00005817730074..−1.99993053673628,−0.0000627494543392766..0.0000184808550829652

(2)

fdiscontarctan12tan2xx21,x=π..2π

−2.35652137480250..−2.35596067534308,−1.00025742285816..−0.999227423613648,−0.785714651862252..−0.785150744271861,0.785004677126996..0.785782328840973,0.999744978088726..1.00071996650187,2.35596549899697..2.35651830946881,3.92664555302272..3.92723287040263,5.49735231158500..5.49831164678780

(3)

fdiscont1x1+1x9851000+1x3,x=0..4,102,newton=true

0.984999999999999987,1.,3.

(4)

fdiscontabsx10000,x=1..1,0.001

−0.000248087903234934..0.0000797181063895528

(5)

fdisconttan10x,x=0..π,0.01,newton=true

0.157079632679489656,0.471238898038468967,0.785398163397448279,1.09955742875642759,1.41371669411540690,1.72787595947438644,2.04203522483336553,2.35619449019234484,2.67035375555132415,2.98451302091030346

(6)

sin(75*x) gives features when the resolution is as large as 0.1.

fdiscontsin75x,x=0..π,0.1

−0.00716853617115685..0.0678131265464373,0.136567579788193..0.257290685764021,0.348829416601809..0.394619464769929,0.513757401830869..0.681567685378298,0.831869568667211..0.983296560340123,1.06027990775354..1.14928056268042,1.27081664687715..1.31676353406636,1.43825414301612..1.77784313487576,1.94076348628333..2.02916586323560,2.07278488816223..2.48438428422120,2.60967538816638..2.70000715344082,2.77870415685020..2.87079535747023,3.02916146460515..3.11958880620431

(7)

Narrowing the resolution to 0.001 shows there are no features.

fdiscontsin75x,x=0..π,0.001

(8)

See Also

discont

iscont

limit

plot[options]