function bounds - Maple Help

Home : Support : Online Help : Programming : Logic : Boolean : verify : function bounds

verify/function_bounds

verify approximate equality between two function plots

 Calling Sequence verify(P, Q, function_bounds)

Parameters

 P, Q - anything

Description

 • The verify(P, Q, function_bounds) calling sequence verifies the approximate equality between two function plots.
 • The parameters, P and Q, are assumed to be either PLOT data structures, sets or lists of CURVES data structures, or a CURVES data structure.
 • The verify(P, Q, function_bounds) function returns true for CURVES data-structures P and Q by checking that neither curve has extreme points or constant regions which do not appear in the other curve or in the union of the two curves.
 • If you are comparing two curves, false is returned by a list with false in the first operand and a plot data-structure showing the points where the curves differ.

Examples

 > $a≔\mathrm{plot}\left(\mathrm{piecewise}\left(x<1,x,2-x\right),x=0..2\right):$
 > $b≔\mathrm{plot}\left(\mathrm{piecewise}\left(x<1,x,2-x\right),x=0..2,\mathrm{numpoints}=10,\mathrm{adaptive}=\mathrm{false}\right):$
 > $c≔\mathrm{plot}\left(1.001\left(\mathrm{piecewise}\left(x<1,x,2-x\right)\right),x=0..2,\mathrm{numpoints}=100\right):$
 > $\mathrm{verify}\left(a,b,\mathrm{function_bounds}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{verify}\left(a,c,\mathrm{function_bounds}\right)$
 $\left[{\mathrm{false}}{,}{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]$ (2)

Note that the plot 'b' does not have the last maxima.

 > $a≔\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..40\right):$
 > $b≔\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..40,\mathrm{numpoints}=20,\mathrm{adaptive}=\mathrm{false}\right):$
 > $c≔\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=0..40,\mathrm{numpoints}=30,\mathrm{adaptive}=\mathrm{false}\right):$
 > $\mathrm{verify}\left(a,b,\mathrm{function_bounds}\right)$
 $\left[{\mathrm{false}}{,}{\mathrm{PLOT}}{}\left({\mathrm{...}}\right)\right]$ (3)
 > $\mathrm{verify}\left(a,c,\mathrm{function_bounds}\right)$
 ${\mathrm{true}}$ (4)