subsop - substitute for specified operands in an expression
|
Calling Sequence
|
|
subsop(eq1, eq2, ..., eqn, expr)
|
|
Parameters
|
|
eq[i]
|
-
|
(optional) equation of the form , where each is an integer or list of integers, and each is an expression
|
expr
|
-
|
expression
|
|
|
|
|
Description
|
|
•
|
Each can be either an integer, or a list of integers. If a list of integers is specified, the integers refer to sub-operands of expr at increasing nesting levels. See op for further details.
|
•
|
If an integer n in a is negative, it is considered equivalent to .
|
•
|
If no eqi are specified, subsop returns its argument with no substitutions.
|
•
|
See also the applyop command which can be used to apply a function to specified operands of an expression.
|
•
|
The action of substitution is not followed by evaluation. In cases where full evaluation is desired, the eval command should be used.
|
|
|
Thread Safety
|
|
•
|
The subsop command is thread-safe as of Maple 15.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
|
|
An example involving integrals
|
|
|
You can use subsop and applyop to perform a change of variables in an integral step-by-step.
|
>
|
Int(sin(sqrt(x)),x=0..t);
|
| (13) |
|
Apply the change of variable u = x^(1/2)
|
>
|
subsop( [1,1]=u, (13) );
|
| (14) |
>
|
subsop( 1=2*u*op(1,(14)), [2,1]=u, (14) );
|
| (15) |
>
|
applyop( sqrt, [2,2,2], (15) );
|
| (16) |
|
|