assuming - compute the value of an expression under assumptions
|
Calling Sequence
|
|
expression assuming property
expression assuming x1::property1, x2::property2, ...
expression assuming additionally, x1::property1, x2::property2, ...
|
|
Parameters
|
|
expression
|
-
|
valid expression or Maple input to be evaluated
|
property
|
-
|
name: property
|
x1, x2, ...
|
-
|
names; names in or referenced by expression
|
property1, property2, ...
|
-
|
names; property1 is the property assumed on x1, property2 is the property assumed on x2, ...
|
additionally
|
-
|
(optional); computes placing the received assumptions on x1, x2, ... without discarding previous assumptions on these variables
|
|
|
|
|
Basic Information
|
|
•
|
This help page contains complete information about the assuming command. For basic information on the assuming command, see the assuming help page.
|
|
|
Description
|
|
•
|
The expression assuming property calling sequence evaluates the expression under the assumption property on all names in expression. This is similar to the assume=property option of the simplify command.
|
•
|
The expression assuming x1::property1, x2::property2, ... calling sequence evaluates the expression under the assumption(s) property1, property2, ... on the name(s) x1, x2, ..., respectively. By default, previously existing assumptions on x1, x2, and so forth, if any, are ignored when computing the result. To override this behavior use the optional argument 'additionally', which can be placed anywhere to the right of assuming - see the Examples section of this help page.
|
•
|
The output is the same as that received by successively doing the following.
|
|
1. Calling assume (to enter assumptions on names).
|
|
2. Entering (and so evaluating under the assumptions) the expression depending on these names.
|
|
3. Removing the assumptions.
|
|
The use of the assuming routine simplifies the process to one step. Thus, it facilitates experiments concerning the value of the expression under different assumptions.
|
•
|
To perform computations under assumptions, the assuming routine identifies the names that are assumed to have special properties, then replaces them with equivalent names that have these properties. The evaluation uses these new names in the computation, then restores the original names before returning the output. This process ensures that no assumptions are made to the original names in the expression. Therefore, the computations performed using assuming do not affect computations performed before or after calling assuming.
|
•
|
assuming is a left-associative operator with precedence between `, ` and `:=`.
|
|
Notes: The assuming command does not place assumptions on integration or summation variables in definite integrals and sums, because these dummy variables already have their domain restricted by the integration or summation range. To obtain the simplification of the integrand or summand, without performing the integral/sum, but taking into account the restriction on the values of the dummy variable implicit in the integration/summation range, use the simplify command -- see the Examples section of this help page.
|
|
The assuming command does not scan Maple programs regarding the potential presence of assumed variables. To compute taking into account assumptions on variables found in the bodies of programs, use assume -- see the Examples section.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
| (13) |
The simplify command can be called with assumptions.
>
|
|
| (14) |
>
|
|
| (15) |
>
|
|
| (16) |
>
|
|
| (17) |
The following is an example of the optional argument 'additionally'.
>
|
|
>
|
|
Originally x, renamed x~:
is assumed to be: RealRange(-infinity,Open(1))
| |
As default behavior, the existing assumption is disregarded when computing using `assuming` with assumptions on .
>
|
|
| (18) |
Using 'additionally', is taken into account in addition to the already existing assumption , leading to:
>
|
|
| (19) |
With or without the optional argument 'additionally', any assumptions previously existing on the variables are preserved.
>
|
|
Originally x, renamed x~:
is assumed to be: RealRange(-infinity,Open(1))
| |
>
|
|
| (20) |
Without assumptions, the ODE above is solved in terms of a piecewise function. Assuming is positive:
>
|
|
| (21) |
Assuming is positive, the ODE has the following solution.
>
|
|
| (22) |
This solution can be tested (see odetest) under assumptions.
>
|
|
| (23) |
>
|
|
| (24) |
>
|
|
| (25) |
Computing with quoted objects under assuming occurs normally. If quotation marks are placed around , the information that is ignored.
>
|
|
| (26) |
The assuming command does not place assumptions on integration or summation variables in definite integrals and sums. So, in
>
|
|
| (27) |
no assumptions are placed on the dummy variable .
>
|
|
| (28) |
To obtain the simplification of the integrand taking into account that use simplify.
>
|
|
| (29) |
You can call assuming with assuming as argument (nested computation under different assumptions). In doing so, note assuming is left-associative, so for instance in
>
|
|
| (30) |
first simplify(sqrt(r^2*s^2*t^2)) assuming real is computed then the result evaluated assuming .
The assuming command does not scan programs regarding the presence of assumed variables; for that purpose use assume. Consider
>
|
f := proc(x) sqrt(a^2)+x end proc; # a Maple procedure (program)
|
| (31) |
The variable a is inside the body of f; the assumption that is not effectively used when computing .
>
|
|
| (32) |
For these purposes, use assume.
>
|
|
>
|
|
| (33) |
|
|
See Also
|
|
about, abs, assume, assuming, diff, dsolve, Int, irem, limit, ln, Maple initialization file, odetest, operators/precedence, proc, simplify, sin, sqrt, type, value
|
|