functional operators examples - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Operations : Operators : functional operators examples

Examples of Functional Operators

A functional operator in Maple is a special form of a procedure. Functional operators are written using arrow notation:

  

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  and apply it using function notation.

(1.1)

(1.2)

In this example, empty parentheses denote that the operator returns , no matter what the input.

(1.3)

(1.4)

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  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);

(1.5)

(1.6)

(1.7)

Similarly, this multivariate operator returns , no matter what the input.

(1.8)

(1.9)

3.14(x,y);

(1.10)

(1.11)

Operators can be applied without assigning them a name.

(1.12)

(1.13)

Operators are distributive.

(1.14)

(1.15)

Use the composition operator @ to perform operator composition.  That is,  means .

(1.16)

(1.17)

(1.18)

Repeated composition is entered with the @@ operator.  Here, a function is composed with itself.

(1.19)

See Also

@, @@, 2-D Math Details, apply, D, Functional Operators, unapply  

 

Return to Index for Example Worksheets


Download Help Document