2 File SHARE;QUAL > contains MACSYMA functions for qualitative analysis
3 of an expression, file QUAL DEMO contains a demonstration, and file
4 QUAL OUT contains the output from executing the demo. Written by
5 David R. Stoutemyer, login name STOUTE. Suggestions, together with
6 successful or unsuccessful examples of its use will be gratefully
9 To use the functions do
13 Top-level usage is of the form
14 QUAL(<expression>, <variables>);
16 <expression> is any given expression.
18 <variables> is a given indeterminate or list of indeterminates. If
19 omitted, this argument defaults to all of the indeterminates in the
22 QUAL returns a list of E-labels of displayed equations, each of the
23 form <property name> = <property value>, where <property name> is
24 one of the second-level function names below, and <property value>
25 is the value returned by that function. These second-level functions
26 may also be used directly. Usage is of the form
28 REVELATION(<expression>, <minimum>, <maximum>);
30 SLOPES(<expression>, <variables>);
31 CURVATURE(<expression>, <variables>);
32 SYMMETRY(<expression>, <variables>);
33 PERIODS(<expression>, <variables>);
34 ZEROSANDPOLES(<expression>, <variables>);
35 STATIONARYPOINTS(<expression>, <variables>);
36 LIMITS(<expression>, <variables>);
38 <expression>, <variables>, and their defaults are as for QUAL.
40 REVELATION automatically prints successive levels of the
41 structure of its first argument. No printout occurs if
42 <minimum> exceeds the number of print characters of <expression>, and
43 printout ceases when the output of a level exceeds <maximum> print
44 characters. Omitted trailing arguments have defaults: 200 for
45 <minimum> and 300 for <maximum>.
47 BOUNDS returns a list of two expressions which are respectively a
48 lower bound and upper bound for the expression, computed by symbolic
49 interval analysis with indeterminates treated as real variables.
50 BOUNDS makes use of global bounds previously established for
51 indeterminates by statements of the form
53 ASSUME(<variable> <relational operator> <value>);
55 where <variable> is an indeterminate; <relational operator> is one
56 of <, <=, >=, or >; and <value> is any expression, including MINF
57 or INF for minus and plus infinity respectively. As a convenience,
58 previously unestablished indeterminate bounds are globally set to MINF
59 and INF respectively, when first needed, with a warning message. In
60 practice, bounds other than numbers, MINF, and INF usually lead to
61 messy results, especially for indeterminates that occur in products,
62 quotients, or exponentiations. Note also that although interval
63 analysis is relatively fast, it often does not give tight bounds when
64 any indeterminate occurs more than once in an expression.
66 SLOPES returns a list of items of the form <type>(<variable>), one
67 for each <variable> in <variables>. <type> is DECREASING,
68 NONINCREASING, CONSTANT, NONDECREASING, INCREASING, or UNKNOWN,
69 according to how<expression> is determined to vary with <variable>.
70 The method is symbolic interval analysis on the first derivatives;
71 so as with BOUNDS, the result depends upon global bounds established
72 by ASSUME, and the result may be weaker than necessary.
74 CURVATURE returns STRICTLYCONCAVE, CONCAVE, CONCAVEANDCONVEX, CONVEX,
75 STRICTLYCONVEX, NEITHERCONCAVENORCONVEX, or UNKNOWN, according to how
76 expression> is determined to behave in the domain implied by
77 previously ASSUMEd global bounds on the
78 indeterminates. Interval analysis is used to test for definiteness or
79 semidefiniteness of the Hessian matrix of second derivatives; so the
80 result may be weaker than necessary.
82 SYMMETRY returns a list of items of the form <type>(<variable>),
83 one for each <variable> in <variables>. <type> is ODD, NONEVEN,
84 NONODD, EVEN, NEITHER, or UNKNOWN, according to the determined symmetry of
85 <expression> with respect to <variable>, with other variables
88 PERIODS return a list of equations of the form PERIOD(<variable>) =
89 <expression>, according to the determined periodicity with respect to
90 <variable>, while other variables are arbitrary.
91 A risghthand side 0 means the first argument of
92 PERIODS is independent of the corresponding variable; a righthand side
93 INF means nonperiodic; and a righthand side UNKNOWN means periodicity
94 could not be determined.
96 ZEROSANDPOLES returns a list of the E-labels of two equations, of respective
98 ZEROS = <list of equations>,
99 POLES = <list of equations>,
101 where the solutions of each equation in a list are where zeros or
102 poles occur respectively.
104 STATIONARYPOINTS returns a list of the E-labels of three equations,
107 STATIONARYPOINTS = <list of lists of equations>,
108 CORRESPONDING EXPRESSION VALUES = <list of expressions>,
109 CORRESPONDING TYPES = <list of types>,
111 Each list of equations gives the values of the variables
112 for one stationary point, the corresponding expression gives the value of the first argument to STATIONARYPOINTS evaluated
113 at the stationary point, and the corresponding type is one of
114 MAXIMUM, NONMINIMUM, UNKNOWN, NONMAXIMUM,
115 MINIMUM, SADDLE, or UNKNOWN.
117 LIMITS returns a list of E-labels of equations of the form
118 LIMITAS(<variable>,<bound>) = <value>,
120 where <bound> is an upper or lower bound established by ASSUME.