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.
restart
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);
2⁢a
ⅆ2ⅆx2a⋅x2+b⋅x+c
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.
a⁢D⁡D⁡h⁡t+b⁢D⁡h⁡t=−w,D⁡h⁡0=0,h⁡0=1000
a⁢D2⁡h⁡t+b⁢D⁡h⁡t=−w,h⁡0=1000,D⁡h⁡0=0
a⁢ⅆ2ⅆt2⁢h⁡t+b⁢ⅆⅆt⁢h⁡t=−w,D⁡h⁡0=0,h⁡0=1000
a⁢ⅆ2ⅆt2⁢h⁡t+b⁢ⅆⅆt⁢h⁡t=−w,h⁡0=1000,D⁡h⁡0=0
Diff is the inert diff operator, which is displayed as ⅆⅆt. To enter this, type Diff and then use command completion. Select ⅆⅆx and replace the placeholder x with t.
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};
Sequence Command
The Sequence command, seq, generates sequences in a map-like manner.
1⁢1+52n−1−52n5
15⁢12+12⁢5n−12−12⁢5n⁢5
seq⁡round⁡evalf⁡,n=1..10
1,1,2,3,5,8,13,21,34,55
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)
`@@`cos,3x
cos3⁡x
`@@`D,2yx
D2⁡y⁡x
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.
RootOf_Z2−a_Z−b:
To solve for the roots explicitly:
1. Select the expression below.
2. From the context-sensitive menu, select All Values. You could also use the allvalues function.
RootOf⁡_Z2−a_Z−b
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.
DESol⁡D⁡y−y,y
DESol⁡ⅆⅆx⁢y⁡x−y⁡x,y⁡x
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.
RESol⁡a⁡n+2−n2+a⁡n+1+a⁡n=sin⁡n,a⁡n,a⁡0=0,a⁡1=a⁡1
RESol⁡a⁡n+2+a⁡n+1+a⁡n=n2+sin⁡n,a⁡n,a⁡0=0,a⁡1=a⁡1,INFO
See Also
@@, allvalues, Applications and Examples, D, DESol, Diff, Initially Known Mathematical Functions, LREtools, RESol, RootOf, seq
Return to Example Worksheet Index
Download Help Document