Examples of Functional Operators
A functional operator in Maple is a special form of a procedure. Functional operators are written using arrow notation:
vars → result
For basic information, see Functional Operators. The following examples demonstrate the different types of functional operators that you can use in Maple.
Examples
First, define a basic operator on a single variable x and apply it using function notation.
F:=x→sin⁡x
F⁡t
sin⁡t
In this example, empty parentheses denote that the operator returns 1, no matter what the input.
A:=→1
Ax
1
Note that in 1-D Math input, an operator can always be applied by using function notation. However, in 2-D Math input, when the operator is also of type atomic, you must use the apply command. This is because 1x is interpreted as multiplication in 2-D math rather than function application. For more information, including how to change this default behavior, see 2DMathDetails.
1(x);
1x
x
apply1, x
Similarly, this multivariate operator returns 3.14, no matter what the input.
B:=→3.14
Bx,y
3.14
3.14(x,y);
apply3.14, x,y
Operators can be applied without assigning them a name.
x→x⁡t
t
x→x24
16
Operators are distributive.
a+b⁡t
a⁡t+b⁡t
a+1⁡t
a⁡t+1
Use the composition operator @ to perform operator composition. That is, f@g means f∘g.
f≔x→x+2;g≔y→y
f:=x→x+2
g:=y→y
f@gt;g@ft
t+2
x→sinx@x→arcsinxt
Repeated composition is entered with the @@ operator. Here, a function is composed with itself.
x→ln⁡x+1@@2t
ln⁡ln⁡t+1+1
See Also
@, @@, 2-D Math Details, apply, D, Functional Operators, unapply
Return to Index for Example Worksheets
Download Help Document