Advanced Maple Functions
This help page presents examples of some advanced Maple functions that are useful. An index of Maple's functions is found in index/functions.
>
|
|
|
Derivatives and the Differential Operator
|
|
Express derivatives using the function diff. Here we show two ways to enter the command, using the 1-D and 2-D calling sequences.
>
|
diff(a*x^2+b*x+c, x, x);
|
| (1.1) |
>
|
|
| (1.2) |
Use the Differential Operator, D, to specify the initial conditions for a differential equation. You can enter the equation itself using either the Diff or D notation.
>
|
|
| (1.3) |
>
|
|
| (1.4) |
Diff is the inert diff operator, which is displayed as . To enter this, type Diff and then use command completion. Select and replace the placeholder with .
Here is the same statement in 1-D math.
>
|
{a*Diff(h(t),t,t) + b*Diff(h(t),t) =-w, D(h)(0)=0, h(0)=1000};
|
| (1.5) |
|
|
Sequence Command
|
|
The Sequence command, seq, generates sequences in a map-like manner.
>
|
|
| (2.1) |
>
|
|
| (2.2) |
|
|
Composition Function
|
|
The Composition function, @@, takes two arguments. The first argument must be a function, such as sin or cos, or a variable name that can be treated as a function. The second argument specifies the number of times the function should be composed. Because the @ symbol is special to Maple, you must enclose the name @ inside single open quotes (`) when using it as a function.
`@@`(cos, 3)(x) means cos(cos(cos(x))) and `@@`(D,2)(y)(x) means D(D(y))(x)
>
|
|
| (3.1) |
>
|
|
| (3.2) |
|
|
RootOf
|
|
Maple uses the function RootOf to represent the roots of a polynomial in one variable. It is a compact representation because all roots can be expressed at once. In addition, it enables Maple to manipulate the roots of a polynomial even when it is unable to find explicit representations for them. The polynomial is always expressed in terms of the variable _Z.
>
|
|
To solve for the roots explicitly:
|
1. Select the expression below.
|
|
|
DESol
|
|
Maple uses the function DESol to represent the solutions to an ordinary differential equation. It is a compact and convenient representation, because all solutions can be expressed at once. In addition, it enables Maple to manipulate the solutions to an ordinary differential equation even when it is unable to find an explicit representation for them.
Express the differentials within the DESol command by using either the Differential Operator, D, or the Derivative Function, Diff. When DESol functions no longer contain differentials, Maple expresses them in terms of RootOf.
>
|
|
| (5.1) |
>
|
|
| (5.2) |
|
|
RESol
|
|
Maple uses the function RESol to represent the solutions of a recurrence equation. It is a compact and convenient representation, because all solutions can be expressed at once. In addition, it enables Maple to manipulate the solutions to a recurrence equation even when it is unable to find an explicit representation for them.
The elements of an RESol structure are
•
|
a set of normalized equations,
|
•
|
a set of function names,
|
•
|
a set of initial conditions, and
|
•
|
an information table, INFO.
|
>
|
|
| (6.1) |
|
|
See Also
|
|
@@, allvalues, Applications and Examples, D, DESol, Diff, Initially Known Mathematical Functions, LREtools, RESol, RootOf, seq
|
Return to Example Worksheet Index
|