4
Trigonometry and Complex
Numbers
Trigonometry developed from the study of triangles, particularly right triangles, and the
relations between the lengths of their sides and the sizes of their angles. The trigonometric functions that measure the relationships between the sides of similar triangles
have far-reaching applications that extend far beyond their use in the study of triangles.
Complex numbers were developed, in part, because they complete, in a useful and elegant fashion, the study of the solutions of polynomial equations. Complex numbers are
useful not only in mathematics, but in the other sciences as well.
Trigonometry
Most of the trigonometric computations in this chapter use six basic trigonometric functions The two fundamental trigonometric functions, sine and cosine, can be de¿ned in
terms of the unit circle—the set of points in the Euclidean plane of distance one from
the origin. A point on this circle has coordinates +frv w> vlq w,, where w is a measure (in
radians) of the angle at the origin between the positive {-axis and the ray from the origin through the point measured in the counterclockwise direction. The other four basic
trigonometric functions can be de¿ned in terms of these two—namely,
4
vlq {
vhf { @
wdq { @
frv {
frv {
frv {
4
frw { @
fvf { @
vlq {
vlq {
For 3 ? w ? , these functions can be found as a ratio of certain sides of a right triangle
5
that has one angle of radian measure w.
Trigonometric Functions
The symbols used for the six basic trigonometric functions—vlq, frv, wdq, frw, vhf,
fvf—are abbreviations for the words cosine, sine, tangent, cotangent, secant, and cosecant, respectively.You can enter these trigonometric functions and many other functions
either from the keyboard in mathematics mode or from the dialog box that drops down
or choose Insert + Math Name. When you enter one of these
when you click
functions from the keyboard in mathematics mode, the function name automatrically
turns gray when you type the ¿nal letter of the name.
90
Chapter 4 Trigonometry and Complex Numbers
Note Ordinary functions require parentheses around the function argument, while
trigonometric functions commonly do not. The default behavior of your system allows
trigonometric functions without parentheses. If you want parentheses to be required for
all functions, you can change this behavior in the Maple Settings dialog. Click the Definition Options tab and under Function Argument Selection Method, check Convert
Trigtype to Ordinary. For further information see page 126.
To ¿nd values of the trigonometric functions, use Evaluate or Evaluate Numerically.
L Evaluate
vlq 67 @
4
5
s
5
vlq +4, @ vlq 4
vlq 93 @
4
5
s
6
L Evaluate Numerically
vlq 67 @ = :3:44
vlq 93 @ = ;9936
vlq +4, @ = ;747:
The notation you use determines whether the argument is interpreted as radians or
degrees: vlq 63 @ =<;;36 and vlq 63 @ =8. The degree symbol can be either a
small green or red circle. The small green circle is entered from the Insert + Unit
Name dialog. The small red circle appears on the Common Symbols toolbar and on
the Binary Operations symbol panel, and must be entered as a superscript. With no
symbol, the argument is interpreted as radians, and with either a green or red degree
symbol, the argument is interpreted as degrees.
All operations will convert angle measure to radians. See page 91 for a discussion of
conversion. See page 37 for a discussion of units that can be used for plane angles.
Your choice for Digits Used in Display in the Maple + Settings dialog determines
the number of places displayed in the response to Evaluate Numerically.
Expression
vlq 7
vlq 47 6:3
orj43 vlq {
6 873
Evaluate
s
4
5
5
;::
vlq
43;33
oq +vlq {,
oq 5 . oq 8
46
933
Evaluate Numerically
=:3:44
=58568
=7675< oq +vlq {,
9=;39; 435
Solving Trigonometric Equations
You can use both Exact and Numeric from the Solve submenu to ¿nd solutions to
trigonometric equations. These operations also convert degrees to radians. Use of decimal notation in the equation gives you a numerical solution, even with Exact.
Trigonometry
Equation
{ @ vlq 7
vlq 55 @
Solve +
sExact
{ @ 45 5
47
f@
vlq 44
<3
{ @ 9=:<;; 435
46
{ @ 933
47
f
orj43 vlq { @ 4=49:<
{ @ 6 873
91
Solve + Numeric
{ @ =:3:44
f @ 6:=6:6
{ @ 6=3:69
{ @ 9=;39; 435
Note that the answers are different for the equation orj43 vlq { @ 4=49:<. This difference occurs because there are multiple solutions and the two commands are ¿nding
different solutions. The Numeric command from the Solve submenu offers the advantage that you can specify a range in which you wish the solution to lie. Enter the
equation and the range in different rows of a display or a one-column matrix.
L Solve + Numeric
{ @ 43 vlq {
, Solution is: i{ @ :=39;5j
{ 5 +8> 4,
The interval +8> 4, was speci¿ed for the solution in the preceding example. By
specifying other intervals, you can ¿nd all seven solutions: i{ @ 3j, i{ @ 5=;856j,
i{ @ :=39;5j, i{ @ ;=7565j, as depicted in the following graph. The Exact command for solving equations gives only the solution { @ 3 for this equation.
10
5
-10
-5
0
5
x
10
-5
-10
When any operation is applied to an angle represented in degrees by a mathematics
superscript, such as 7; , degrees are automatically converted to radians. To go in the
other direction, replace 5 radians with 693 and convert other angles proportionately.
You can also solve directly for the number of degrees. Both methods follow.
L To convert radians to degrees (using ratios)
1. Write the equation
{
@
, where { represents radians.
693
5
2. Leave the insertion point in this equation.
3. From the Solve submenu, choose Exact or Numeric.
92
Chapter 4 Trigonometry and Complex Numbers
4. Name as the Variable to Solve for.
5. Choose OK to get @
4;3
{.
L To convert radians to degrees (directly)
1. Write an equation such as 5 @ , or (using Insert + Unit Name) 5 udg @ .
2. Leave the insertion point in this equation.
3. From the Solve submenu, choose Exact or Numeric, to get @
693
or @ 447= 8<
46
radians to degrees as follows.
933
46 1. Write the equation
@ 933 .
693
5
Example 17 Convert { @
2. Leave the insertion point in this equation.
3. From the Solve submenu, choose Exact to get @
to get @ 6=< degrees=
6<
43
degrees, or choose Numeric
- or 1. Write the equation
46
@ 933
2. Leave the insertion point in this equation
3. From the Solve submenu, choose Exact to get @
@ 6=<.
6<
43
, or choose Numeric to get
See page 43 for additional examples of converting units.
L To change 3=< degrees to minutes
Apply Evaluate to
3=< 93
to get
3=< 93 @ 87=3
- or -
Enter degree and minute symbols from the Unit Name dialog. Apply Solve to
3=< @ { 3
to get
{ @ 87=3
Trigonometry
93
To check these results, apply Evaluate to 6 873 or 6 87 3 to get
46
6 873 @
or
6 87 3 @ 9= ;39 ; 435 udg
933
Trigonometric Identities
This section illustrates the effects of some operations on trigonometric functions. First,
simpli¿cations and expansions of various trigonometric expressions illustrate many of
the familiar trigonometric identities.
De¿nitions in Terms of Basic Trigonometric Functions
Apply Simplify to the secant, and cosecant to ¿nd their de¿nition in terms of the sine
and cosine functions.
L Simplify
vhf { @
4
frv {
fvf { @
4
vlq {
Pythagorean Identities
L Simplify
vlq5 { . frv5 { @ 4
wdq5 { vhf5 { @ 4
frw5 { fvf5 { @ 4
Addition Formulas
L Expand
vlq +{ . |, @ vlq { frv | . frv { vlq |
wdq +{ . |, @
frv +{ . |, @ frv { frv | vlq { vlq |
wdq { . wdq |
4 wdq { wdq |
Apply Combine + Trig Functions to the expansions of vlq +{ . |, and frv +{ . |,
to return them to their original form and to change the expansion of wdq +{ . |, to the
vlq+{.| ,
form frv+
{.|, .
94
Chapter 4 Trigonometry and Complex Numbers
Double-Angle Formulas
L Expand
vlq 5 @ 5 vlq frv frv 5 @ 5 frv5 4
frv wdq 5 @ 5 +vlq ,
5 frv5 4
You can uncover other multiple-angle formulas with Expand. Following are some
examples.
L Expand
vlq 9 @ 65 vlq frv8 65 vlq frv6 . 9 vlq frv vlq 57 @ ;6;;93; vlq frv56 7946:677 vlq frv54 . 4434337;3 vlq frv4< 47<7553;3 vlq frv4: . 45:33;:9; vlq frv48 :34;<389 vlq frv46 . 5867937; vlq frv44 8;8:5;3 vlq frv< . ;569;3 vlq frv: 97397 vlq frv8 . 55;; vlq frv6 57 vlq frv vlq+5d . 6e, @ ; vlq d frv d frv6 e 9 vlq d frv d frv e
. ; frv5 d vlq e frv5 e 5 frv5 d vlq e
7 vlq e frv5 e . vlq e
Combining and Simplifying Trigonometric Expressions
Products and powers of trigonometric functions and hyperbolic functions are combined
into a sum of trigonometric functions or hyperbolic functions whose arguments are integral linear combinations of the original arguments.
L Combine + Trig Functions
vlq { vlq | @ 45 frv +{ |, vlq { frv | @ 45 vlq +{ . |, .
vlq8 { frv8 { @
6
6
4
845
vlqk { frvk { @
vlq 43{ .
4
65
4
5
4
5
frv +{ . |,
vlq +{ |,
8
589
6
65
vlqk 9{ vlq 5{ vlqk 5{
8
845
vlq5 { @ 45 45 frv 5{
frv5 { @ 45 frv 5{ . 45
vlq 9{
vlqk { frvk { @
4
5
vlqk 5{
The command Simplify combines and simpli¿es trigonometric expressions, as in the
Trigonometry
95
following examples.
L Simplify
frv5 { .
4
7
vlq5 5{ vlq5 { frv5 { . 5 vlq5 { @ frv5 { . 5
+frv 6w . 6 frv w, vhf w @ 7 frv5 w
vlq 6d . 7 vlq6 d @ 6 vlq d
wdq 5 vlq 5 . frv 5 5 fvf vlq 5 @ 3
You may need to apply repeated operations to get the result you want. The order
in which you apply the operations is not necessarily critical. You achieve the ¿rst of
the following examples by applying Simplify followed by Expand. For the second
example, apply Expand followed by Simplify.
L Simplify, Expand
+vhf w, +4 . frv 5w, @
4
+4 . frv 5w, @ 5 frv w
frv w
L Expand, Simplify
+vhf w, +4 . frv 5w, @ 5 vhf w frv5 w @ 5 frv w
Solution of Triangles
To solve a triangle means to determine the lengths of the three sides and the measures
(in degrees or radians) of the three angles.
Solving a Right Triangle
You can solve a right triangle with sides d> e> f and opposite angles > > , respectively,
if you know the value of one side and one acute angle, or the value of any two sides.
Example 18 To solve the right triangle with one side of length f @ 5 and one angle
@ < ,
1. Choose New De¿nition from the De¿ne menu for each of the given values @
and f @ 5.
2. Apply Evaluate to @
5
to get @
:
4;
<
.
3. Apply Evaluate (or Evaluate Numerically) to d @ f vlq to get d @ 5 vlq 4< +@ =9;737,.
4. Apply Evaluate to e @ f frv to get e @ 5 frv 4< +@ 4=;:<7,.
Example 19 To solve a right triangle given two sides, say d @ 4< and f @ 56,
96
Chapter 4 Trigonometry and Complex Numbers
1. Apply De¿ne to each of the given values, d @ 4< and f @ 56.
2. Place the insertion point in the equation d5 . e5 @ f5 .
s
3. From the Solve submenu, choose Exact to get e @ 5 75.
4. Place the insertion point in each of the equations vlq @
d
d
, frv @ in turn.
f
f
5. From the Solve submenu, choose Exact to get @ dufvlq 4<
, @ duffrv 4<
=
56
56
For a numerical result, evaluate these functions numerically, or choose Numeric
rather than Exact from
in
the Solve submenu
the ¿nal step. You
need to specify intervals
vlq @ d@f
frv @ d@f
for and , such as
and
, before applying Solve +
5 +3> @5,
5 +3> @5,
Numeric or you may get a solution greater than 5 . Specifying these intervals gives the
solution
e @ 45=<9> @ =<:54 > @ =8<;:
Solving General Triangles
The law of sines
e
f
d
@
@
vlq vlq vlq enables you to solve a triangle if you are given one side and two angles, or if you are
given two sides and an angle opposite one of these sides.
γ
b
a
α
β
c
Example 20 To solve a triangle given one side and two angles,
1. Use New De¿nition on the De¿ne submenu to de¿ne @ < , @
2. Evaluate @ to get @
5
6
5
<
.
3. Use New De¿nition on the De¿ne submenu to de¿ne @
5
6
.
f
e
f
d
@
and to
@
to get
vlq vlq vlq vlq 7s
7s
4
5
d@
6 vlq and e @
6 vlq 6
<
6
<
4. Apply Solve + Exact to
, and f @ 5
Trigonometry
97
You can apply Solve + Numeric to get numerical solutions, or you can evaluate the
preceding solutions numerically.
Using both the law of sines and the law of cosines,
d5 . e5 5de frv @ f5
you can solve a triangle given two sides and the included angle, or given three sides.
Example 21 To solve a triangle given two sides and the included angle,
1. De¿ne each of d @ 5=67, e @ 6=8:, and @
5<
549
.
2. Apply Solve + Exact to d5 . e5 5de frv @ f5 to get f @ 4=:588.
3. De¿ne f @ 4=:588.
4. Apply Solve + Exact to both
and @ 4=3437.
d
f
e
f
@
and
@
to get @ =8;;8<
vlq vlq vlq vlq A triangle with three sides given is solved similarly: interchange the actions on and f in the steps just described.
Example 22 To solve a triangle given three sides,
1. De¿ne d @ 5=86, e @ 7=48, and f @ 9=4<.
2. Apply Solve + Exact to d5 . e5 5de frv @ f5 to get @ 5=678;.
3. De¿ne @ 5=678;.
4. Apply Solve + Exact to
get @ =7<<7;.
d
f
e
f
@
to get @ =5<965, and to
@
to
vlq vlq vlq vlq Inverse Trigonometric Functions and Trigonometric
Equations
The following type of question arises frequently when working with the trigonometric
functions: for which angles { is vlq { @ |? There are many correct answers to these
questions, since the trigonometric functions are periodic. The inverse trigonometric
functions provide answers to such questions that lie within a restricted domain. The
inverse sine function, for example, produces the angle { between 5 and 5 that satis¿es
vlq { @ |. This solution is denoted by dufvlq { or vlq4 {.
The inverse trigonometric functions and a number of other functions are available
in the dialog box that comes up when you click the Math Name button on the Math
toolbar. They can also be entered from the keyboard in mathematics mode.
Example 23 To ¿nd the angle { (between 5 and 5 ) for which wdq { @ 433,
98
Chapter 4 Trigonometry and Complex Numbers
Leave the insertion point in the expression dufwdq 433=
Apply Evaluate Numerically
This gives dufwdq 433 @ 4=893:<999
You can also ¿nd an angle satisfying wdq { @ 433 by applying Solve + Numeric to
the equation. This technique does not necessarily ¿nd the solution between 5 and 5 .
In this case, in fact, it gives the solution { @ 435=3<4:9, which is 4=893:<999 . 65.
You can specify the interval for the solution, as follows.
L Solve + Numeric
wdq { @ 433
, Solution is : i{ @ 4=893:<999j
{ 5 5 > 5
Using this technique, you can ¿nd solutions to a variety of trigonometric equations
in speci¿ed intervals. Following are some examples of equations that you can solve with
Solve + Exact and Solve + Numeric.
Equation
vlq w @ vlq 5w
; wdq { 46 . 8 wdq5 { @ 6
wdq5 { frw5 { @ 4
Solve + Exact
iw @ 3j > w@ 46 s 7
{ @ dufwdq 78 9
8 s
s { @ dufvlq 45 5 5 8
Solve + Numeric
w @ 8=569
{ @ 5=5;57
{ @ 5=56:
Note that Solve + Exact gives multiple solutions in these examples, whereas Solve
+ Numeric returns only one solution. In general, applying Evaluate Numerically to
the exact solutions gives numerical solutions different from those produced by Solve
+ Numeric. This is a good place to experiment with a plot to visualize the complete
solution. You can see in the following plot, for example, the pattern of crossings of
the graphs of | @ wdq5 { frw5 { and | @ 4, depicting the solutions of the equation
wdq5 { frw5 { @ 4.
10
5
-8
-6
-4
-2
0
2
4
x
6
8
-5
-10
| @ wdq5 { frw5 {, | @ 4
Solutions can be found in a speci¿ed range with Solve + Numeric, as demonstrated
Complex Numbers
99
in the following example. Enter the equation and the range in different rows of a onecolumn matrix.
L Solve + Numeric
; wdq{ 46. 8 wdq5 { @ 6
, Solution is : i{ @ =;8<49j
{ 5 5 > 5
Complex Numbers
For a review of the arithmetic of complex numbers, see page 32.
DeMoivre’s Theorem
Any pair +d> e, of real numbers
s can be represented in polar coordinates with d @ u frv and e @ u vlq where u @ d5 . e5 is the distance from the point +d> e, to the origin
and is an angle satisfying wdq @ de . Thus any complex number can be written in
polar form
} @ u +frv . l vlq ,
where u @ m }m.
DeMoivre’s Theorem says that if } @ u +frv . l vlq , and q is a positive integer,
then
q
} q @ +u +frv w . l vlq w,, @ uq +frv qw . l vlq qw,
You can obtain this result for small values of q by the sequence of operations Expand
followed by Combine + Trig Functions and then Factor.
L Expand, Combine + Trig Functions, Factor
+u +frv w . l vlq w,,6
@ u6 frv6 w . 6lu6 frv5 w vlq w 6u6 frv w vlq5 w lu6 vlq6 w
@ u6 frv 6w . lu6 vlq 6w
@ u6 +frv 6w . l vlq 6w,
Or, you can use Simplify followed by Combine + Trig Functions and Factor.
L Simplify, Combine + Trig Functions, Factor
6
+u +frv w . l vlq w,,
@ 7u6 frv6 w . 7lu6 frv5 w vlq w 6u6 frv w lu6 vlq w
@ u6 frv 6w . lu6 vlq 6w
@ u6 +frv 6w . l vlq 6w,
You can get the same results in complete generality by working with uhlw , since
lw q
uh
@ uq hlwq
You can get the identity
uhlw @ u +frv w . l vlq w,
100
Chapter 4 Trigonometry and Complex Numbers
with Evaluate. (You will ¿nd that CTRL + E has no effect on the expression uhlw . This
is one circumstance where Evaluate and CTRL + E produce a different result.)
L Evaluate, Factor
uhlw @ u frv w . lu vlq w @ u +frv w . l vlq w,
Another way to convert a complex number to polar form is to observe that
{ . l| @ m{ . l|m +frv +duj +{ . l|,, . l vlq +duj +{ . l|,,,
Example 24 The following sequence of operations will change the complex number
8 . 9l to polar form.
s
1. Take the absolute value m8 . 9lm @ 94 to ¿nd the magnitude u, so that
s
8 . 9l @ 94 s894 . s994 l
s . l vlq dufvlq s994
@ 94 frv duffrv s894
2. Apply Evaluate Numerically to duffrv
to get the angle =;:939.
Thus,
8 . 9l s894
(or dufvlq
s994
or duj +8 . 9l,)
s
94 +frv =;:939 . l vlq =;:939, =
3. Apply Evaluate Numerically to verify this result.
This produces
s
94 +frv =;:939 . l vlq =;:939, @ 8=3 . 9=3l
Exercises
1. De¿ne the functions i +{, @ {6 . { vlq { and j+{, @ vlq {5 . Evaluate i +j+{,,,
j+i +{,,, i+{,j+{,, and i +{, . j+{,.
2. At Metropolis Airport, an airplane is required to be at an altitude of at least ;33 iw
above ground when it has attained a horizontal distance of 4 pl from takeoff. What
must be the (minimum) average angle of ascent?
3. Experiment with expansions of vlq q{ in terms of vlq { and frv { for q @ 4> 5> 6> 7> 8> 9
and make a conjecture about the form of the general expansion of vlq q{.
4. Experiment with parametric plots of +frv w> vlq w, and +w> vlq w,. Attach the point
+frv 4> vlq 4, to the ¿rst plot and +4> vlq 4, to the second. Explain how the two graphs
are related.
Solutions
101
5. Experiment with parametric plots of +frv w> vlq w,, +frv w> w,, and +w> frv w,, together
with the point +frv 4> vlq 4, on the ¿rst plot, +frv 4> 4, on the second, and +4> frv 4,
on the third. Explain how these plots are related.
Solutions
1. De¿ning functions i +{, @ {6 . { vlq { and j+{, @ vlq {5 and evaluating gives
i +j+{,, @ vlq6 {5 . vlq {5 vlq vlq {5
5
j+i+{,, @ vlq {6 . { vlq {
i+{,j+{, @ {6 . { vlq { vlq {5
i +{, . j+{, @
{6 . { vlq { . vlq {5
2. You can ¿nd the minimum average angle of ascent by considering the right triangle
with legs of length ;33 iw and 85;3 iw. The angle in question is the acute angle with
sine equal to s;33;33
5 .85;35 . Find the answer in radians with Evaluate Numerically:
;33
@ =4836:
dufvlq s
5
;33 . 85;35
You can express this angle in degrees by using the following steps:
=4836:
@ ;=948:
693 5
3=948: 93 @ 69=<75 6:
@ ; 6: 3
or by solving the equation
=4836: udg @ , Solution is: i @ ;= 9489j
3. Note that
vlq 5{ @ 5 vlq { frv {
vlq 6{ @ 7 vlq { frv5 { vlq {
vlq 7{ @ ; vlq { frv6 { 7 vlq { frv {
vlq 8{ @ 49 vlq { frv7 { 45 vlq { frv5 { . vlq {
vlq 9{ @ 65 vlq { frv8 { 65 vlq { frv6 { . 9 vlq { frv {
It appears that in general, vlq q{ @ 5q4 vlq { frvq4 { where the remaining
terms are of the form vlq { frvq+5n.4, {.
4. The ¿rst ¿gure shows a circle of radius 4 with center at the origin. The graph is
drawn by starting at the point +4> 3, and is traced in a counter-clockwise direction.
The second ¿gure shows the |-coordinates from the ¿rst ¿gure as the angle varies
from 3 to 5. The point +frv 4> vlq 4, is marked with a small circle in the ¿rst ¿gure.
The corresponding point +4> vlq 4, is marked with a small circle in the second ¿gure.
102
Chapter 4 Trigonometry and Complex Numbers
-1
-0.5
1
1
0.5
0.5
0
0.5
0
1
-0.5
-0.5
-1
-1
1
2
+frv w> vlq w,
3
4
5
6
+w> vlq w,
5. The ¿rst ¿gure shows a circle of radius 4 with center at the origin. The graph is
drawn by starting at the point +4> 3, and is traced in a counter-clockwise direction.
The second ¿gure shows the {-coordinates of the ¿rst ¿gure as the angle varies from
3 to 5. The point +frv 4> vlq 4, is marked with a small circle in the ¿rst ¿gure. The
corresponding point +frv 4> 4, is marked with a small circle in the second ¿gure. The
third ¿gure shows the graph from the second ¿gure with the horizontal and vertical
axes interchanged. The third ¿gure shows the usual view of | @ frv {.
1
6
5
0.5
4
-1
-0.5
0
0.5
3
1
2
-0.5
1
-1
-1
-0.5
+frv w> vlq w,
+frv w> w,
1
0.5
0
0
1
2
3
4
-0.5
-1
+w> frv w,
5
6
0.5
1
5
Function De¿nitions
The De¿ne options provide a powerful tool, enabling you to de¿ne a symbol to be
a mathematical object, and to de¿ne a function using an expression or a collection of
expressions.
Function and Expression Names
A mathematical expression is a collection of valid expression names (see pge 103) combined in a mathematically correct way. The notation for a function consists of a valid
function name (see page 103) followed by a pair of parentheses containing a list of variables, called arguments. (Certain “trigtype” functions do not always require the parentheses around the argument. See page 126.) The argument of a function can also occur
as a subscript (see page 104).
Examples of mathematical expressions: {, d6 e5 f, { vlq | . 6 frv }, d4 d5 6e4 e5
Examples of ordinary function notation: d +{,, J +{> |> },, i8 +d> e,, dq .
Valid Names for Functions and Expressions (Variables)
A variable or function name must be either
1. a single character (other than a standard constant), with or without a subscript
- or 2. a custom Math Name (see page 104), with or without a subscript.
Expression names, but not function names, may include an arbitrary number of
primes. Variables named with primed characters should be used with caution, as they
are open to misinterpretation in certain contexts.
Examples of valid expression names include d, [ , i456 , j , 4 , h5 , u33 , Zdogr
(custom name), Mrkq6 (custom name with subscript).
Examples of valid function names include d, [ , i456 , j , 4 , h5 , vlq, Dolfh (custom name), Odqd5 (custom name with subscript).
Examples of invalid function names include I (two characters), , h (standard
constants), ide (two-character subscript), u3 (reserved for derivative).
104
Chapter 5 Function De¿nitions
In the example of function names, the subscript on i456 is properly regarded as the
number one hundred twenty three, not “one, two, three.”
Note Subscripts on expression or function names must be numbers or single characters.
Subscripts As Function Arguments
A subscript can be interpreted either as part of the name of a function or variable, or as
a function argument. In the examples above, the subscripts that appear are part of the
name.
1. De¿ne dl @ 6l. In the Interpret Subscript dialog that appears, choose A function
argument.
2. De¿ne el @ 6l. In the Interpret Subscript dialog that appears, choose Part of the
name.
Then Evaluate produces
el @ 6l
d5 @ 9
e5 @ e5
dl @ 6l
Choose Show De¿nitions and you will see that these de¿nitions are listed as
dl @ 6l (variable subscript)
el @ 6l
Thus dl denotes a function with argument l, and el is only a subscripted variable.
Note A function cannot have both subscripted and in-line variables. For example, if
you de¿ne id +|, @ 6d|, then d is part of the name and | is the function argument:
i5 +8, @ 8i5
id +8, @ 48d
When you de¿ne id +|, @ 6d|, you will note that the Interpret Subscript dialog does
not appear.
Custom Names
In general, function or expression names must be single characters or subscripted characters. However, the system includes a number of prede¿ned functions with names that
appear to be multicharacter—such as jfg, lqi, and ofp—but that behave like a single
character in the sense that they can be deleted with a single backspace. You can create
custom names with similar behavior that are legitimate function or expression names.
L To create a custom name
1. Click the Math Name icon, or from the Insert menu choose Math Name.
Function and Expression Names
105
2. Type your custom name in the text box under Name.
3. Check Function or Variable for Name Type.
4. Choose OK.
The gray custom name appears on the screen at the insertion point. You can use this
name to de¿ne a function or expression. You can copy and paste, or click and drag, this
grayed name on the screen, or you can recreate it with the Math Name dialog.
You
U choose Name Type to be Operator, in which case the custom name behaves
S can
like or with regard to Operator Limit Placement, or you can choose Name Type
to be Function or Variable, in which case it behaves like an ordinary character with
regard to subscripts and superscripts.
U4
Sq
in-line operators: n@4 , 3 , rshudwrued in-line function or variable: dmn , yduldeohgf
displayed operators, and displayed function or variable:
]4
q
[
e
rshudwru
dmn
yduldeohgf
n@4
3
d
Automatic Substitution
L To make a custom name automatically gray
1. From the Tools menu, choose Automatic Substitution.
2. Enter the keystrokes that you wish to use. (This may be an abbreviated form of the
custom name.)
106
Chapter 5 Function De¿nitions
3. Click the Substitution box to place the cursor there and, leaving Automatic Substitution open, click the Math Name button
.
4. Enter the custom name in the Name text box in the Math Name dialog.
5. Choose OK. (The custom name appears in the Auto Substitution box, in gray.)
6. Choose Save.
7. Choose OK.
De¿ning Variables and Functions
When you choose De¿ne on the Maple menu, the submenu that comes up has seven
items: New De¿nition, Unde¿ne, Show De¿nitions, Clear De¿nitions, Save De¿nitions, Restore De¿nitions, and De¿ne Maple Name. The choice New De¿nition
can be applied both for de¿ning functions and for naming expressions.
Assigning Values to Variables, or Naming Expressions
You can assign a value to a variable with De¿ne + New De¿nition. There are two
options for the behavior of the de¿ned variable. The default behavior is “deferred evaluation,” meaning the de¿nition is stored exactly as you make it. The alternate behavior
is “full evaluation,” meaning the de¿nition that is stored takes into account earlier de¿nitions in force that might affect it. See page 107 for a discussion of this option.
L To assign the value 58 to }
1. Type } @ 58 in mathematics.
De¿ning Variables and Functions
107
2. Leave the insertion point in the equation.
3. Click the New De¿nition button
submenu, choose New De¿nition.
on the Compute toolbar or, from the De¿ne
Thereafter, until you exit the document or unde¿ne the variable, the system recognizes } as 58. For example, evaluating the expression “6 . }” returns “@ 5;.”
Another way to describe this operation is to say that an expression such as {5 . vlq {
can be given a name. Enter | @ {5 . vlq {, leave the insertion point anywhere in the
expression, and then from the De¿ne submenu choose New De¿nition. Now, whenever
you operate on an expression containing |, every occurrence of | is replaced by the
expression {5 . vlq {. For example, Evaluate applied to | 5 . {6 produces
| 5 . {6 @ +{5 . vlq {,5 . {6
Note that these variables or names are single characters. See page 104 for information
on multicharacter names.
The value assigned can be any mathematical expression. For example, you could
de¿ne a variable to be
A number: d @ 578
A polynomial: s @ {6 8{ . 4
{5 4
A quotient of polynomials: e @ 5
{ .4
d e
A matrix: } @
f g
U
An integral: g @ {5 vlq {g{
You will ¿nd this feature useful for a variety of purposes.
Note The symbol s de¿ned previously represents the expression {6 8{ . 4. It is not
a function, so, for example, s+5, is not the polynomial evaluated at 5, but rather is twice
s: s+5, @ 5s @ 5{6 43{ . 5.
Compound De¿nitions
It is legitimate to de¿ne expressions in terms of other expressions. For example, you
can de¿ne u @ 6s ft and then v @ qu . t. Evaluating v will then give you v @
q +6s ft, . t. Rede¿ning u will change the evaluation of v.
Full Evaluation and Assignment
With full evaluation, variables previously de¿ned are evaluated before the de¿nition is
stored. Thus, de¿nitions of expressions can depend on the order in which they are made.
Use an equals sign preceded by a colon to make an assignment for full evaluation.
L To assign the value 58 to }
108
Chapter 5 Function De¿nitions
1. Type } =@ 58d in mathematics.
2. Leave the insertion point in the equation.
3. Click the New De¿nition button
submenu, choose New De¿nition.
on the Compute toolbar or, from the De¿ne
Thereafter, until you exit the document or unde¿ne the variable, if d has not been
previously de¿ned, the system recognizes } as 58d. If d has previously been de¿ned
to be { . |, then the system recognizes } as 58 +{ . |, = Try the following examples
that contrast the two types of assignments, and look at the list displayed under De¿ne +
Show De¿nitions for each case.
Example 25 Make the assignments d @ 4, { =@ d, | @ d, and d @ 5 (in that order),
and evaluate { and |.
{ @ 4
| @ 5
Example 26 Make the assignments d @ e, { =@ d5 , | @ d5 , and d @ 9 (in that order),
and evaluate { and |.
{ @ e5
| @ 69
Functions of One Variable
By using function notation, you can use the same general procedure to de¿ne a function
as was described for de¿ning a variable.
L To de¿ne the function i whose value at { is d{5 . e{ . f
1. Enter the equation i +{, @ d{5 . e{ . f.
2. Place the insertion point in the equation.
3. Click the New De¿nition button
submenu, choose New De¿nition.
on the Compute toolbar or, from the De¿ne
Now the symbol i represents the de¿ned function and it behaves like a function. For
example, apply Evaluate to i+w, to get i +w, @ dw5 . ew . f and apply Evaluate to i 3 +w,
to get i 3 +w, @ 5dw . e.
Compound De¿nitions
If j and k are previously de¿ned functions (other than piecewise-de¿ned functions), then
the following equations are examples of legitimate de¿nitions:
De¿ning Variables and Functions
i +{, @ 5j+{,
i +{, @ j+{, . k+{,
i +{, @ j+{,k+{,
i +{, @ j+k+{,,
109
i +{, @ +j k, +{,
Once you have de¿ned both j+{, and i+{, @ 5j+{,, then changing the de¿nition of
j+{, will rede¿ne i+{,.
Note The algebra of functions includes objects such as i . j,i j, i j, ij, and
i 4 . For the value of i . j at {, write i+{, . j+{, for the value of the composition
of two de¿ned functions i and j, write i +j+{,, or +i j, +{, and for the value of the
product of two de¿ned functions, write i +{,j+{,. You can obtain the inverse (or inverse
relation) for some functions i+{, by applying Solve + Exact to the equation i +|, @ {
and specifying | as the Variable to Solve for.
Functions of Several Variables
De¿ne functions of several variables by writing an equation such as i+{> |> }, @ d{ .
| 5 . 5} or j+{> |, @ 5{ . vlq 6{|, placing the insertion point in the equation, and
choosing New De¿nition from the De¿ne submenu. Just as in the case of functions of
one variable, the system always operates on expressions that it obtains from evaluating
the function at a point.
Piecewise-De¿ned Functions
You can de¿ne functions that are described by different expressions on different parts
of their domain, and you can evaluate, plot, differentiate, and integrate these functions.
These are called piecewise-de¿ned functions or “case” functions.
Note that there are strict conditions concerning the piecewise de¿nition of functions.
They must be speci¿ed in a two- or three-column matrix with at least two rows, with the
function values in the ¿rst column, “if” or “li” in the second column of a three-column
matrix (and “if,” or any text, or no text, in the second column of a two-column matrix),
followed by the range condition in the last (second or third) column. Also, the matrix
must be fenced with a left brace and null right delimiter, as in the following examples.
The range for the function value in the bottom row is always interpreted as “rwkhuzlvh,”
so it is not necessary to cover the entire number line in the ranges you specify.
L To form the matrix for a piece-wise de¿nition
1. From the Brackets list below
, choose
for the left bracket and the null
110
Chapter 5 Function De¿nitions
for the right bracket. (The dashed vertical line
delimiter (dashed vertical line)
does not normally appear in a printed document. It appears on screen as a dashed
red line, but only when View + Helper Lines is turned on.)
2. Click
or choose Insert + Matrix.
3. Set the numbers for Rows (number of conditions) and Columns (3 or 2).
4. Click OK.
Functions should be entered as in the following examples. (When entering such
functions, check Helper Lines on the View submenu, to see important details.)
;
? { . 5 if { ? 3
5
if 3 { 4
i +{, @
=
5@{ if 4 ? {
;
w
if w ? 3
A
A
A
A
if 3 w ? 4
? 3
4
if 4 w ? 5
j+w, @
A
A
5
if 5 w ? 6
A
A
=
9 w if 6 w
{ . 5 li { ? 4
k+{, @
6@{ li 4 {
{.5 {?4
n +{, @
6@{ 4 {
L To de¿ne a piecewise-de¿ned function
1. Type the function values in a matrix enclosed in brackets as described.
2. Leave the insertion point in the function de¿nition.
3. Click
or, from the De¿ne submenu, choose New De¿nition.
You can then choose Evaluate to get results such as i +4, @ 4, i + 45 , @ 5, i +5, @
4, k+4, @ 4 and
;
if { ? 3
A {.5
A
A
A
xqghqhg
if { @ 3
?
5
if 3 ? { ? 4
i 3 +{, @
A
A
xqghqhg if { @ 4
A
A
=
5@{
if 4 ? {
Note To operate on piecewise-de¿ned functions, such as to evaluate, plot, differentiate, or integrate such a function, you can make the de¿nition and then work with the
De¿ning Variables and Functions
111
function name i or the expression i +{,. You can also place the insertion point in the
de¿ning matrix to carry out such operations.
L To plot a piecewise-de¿ned function
1. De¿ne a function i +{, as described above.
2. Select the expression i+{, or the function name i or select the de¿ning matrix.
or choose Plot 2D + Rectangular.
3. Click
For piecewise-de¿ned functions that are not continuous, the choices of the expression
i +{, or only the function name i, can have different results. For the function | @ j+{,
de¿ned above, which is not continuous, you can plot with or without vertical connecting
lines by using either the expression j+{, or the function name j to generate the plot.
3
3
2
2
1
-4
-2
2
x
1
4
-4
-2
2
0
-1
0
-1
-2
-2
-3
-3
-4
-4
-5
-5
j+{,
4
j
See page 154 for guidelines to plotting piecewise-de¿ned functions.
De¿ning Generic Functions
You can use De¿ne + New De¿nition to declare an expression of the form i +{, to be a
function without specifying any of the function values or behavior. Thus you can use the
function name as input when de¿ning other functions or performing various operations
on the function.
L De¿ne + New De¿nition
i+{,
j+{, @ {5 6{
L Evaluate
i+j+{,, @ i {5 6{
j+i+{,, @ i 5 +{, 6i +{,
112
Chapter 5 Function De¿nitions
De¿ning Generic Constants
You can use De¿ne + New De¿nition to declare any valid expression name to be a
constant. Such names will then be ignored under certain circumstances. For example,
when identifying dependent and independent variables for implicit differentiation, a de¿ned constant is not considered as a variable. Observe the difference below, where d is
a de¿ned variable and e is not.
L De¿ne + New De¿nition
d
L Calculus + Implicit Differentiation
d{| @ vlq | Solution: d| . d{| 3 @ +frv +|,, |3
e{| @ vlq | Solution: e3 {| . e| . e{| 3 @ +frv +|,, | 3
Handling De¿nitions
The choices on the De¿ne submenu, in addition to New De¿nition, include Unde¿ne,
Show De¿nitions, Clear De¿nitions, Save De¿nitions, Restore De¿nitions, and
De¿ne Maple Name. The two choices New De¿nition and Show De¿nitions also
appear on the Compute toolbar as
and
.
Showing De¿nitions
You view the complete list of currently de¿ned variables and functions for the document
that is open by choosing Show De¿nitions from the De¿ne submenu or clicking
on the Compute toolbar. A window comes up showing the de¿nitions that are active in
the open document. The de¿ned variables and functions are listed in the order in which
the de¿nitions were made.
Removing a De¿nition
You can remove from a document a de¿nition that you created with De¿ne + New
De¿nition (or an assumption that you have created with dvvxph) in any of the following
ways.
Select the de¿ning equation, or select the name of the de¿ned expression or function,
and from the De¿ne submenu choose Unde¿ne.
From the De¿ne submenu, choose Clear De¿nitions (to cancel all de¿nitions displayed under Show De¿nitions that were created with De¿ne + New De¿nition).
Handling De¿nitions
113
Make another de¿nition with the same name.
On the De¿nition Options page of Maple Settings, check Do Not Save. Close the
document. (See the next section, Saving and Restoring De¿nitions, for more detail
on this option.)
For the ¿rst option, you can select the equation or name by placing the insertion point
within or on the right side of the equation or name that you wish to remove, or you can
select the entire equation, expression, or function name by using the mouse. You can
copy the de¿ning equation from the list of de¿nitions in the Show De¿nitions window
and paste it into the document if you do not have a copy readily at hand.
Saving and Restoring De¿nitions
For each document, you can set the system
1. not to save or restore de¿nitions automatically (in which case you must actively
choose to save or restore de¿nitions when you wish to do so),
2. to give you a prompt when you enter or exit the document asking whether you wish
to save or restore de¿nitions, or
3. to save or restore de¿nitions automatically.
To set the system to one of these options, from the Maple menu choose Settings,
De¿nition Options, and make your choices in the dialog box.
The default for each new document is Always Save and Always Restore.
You can override the default setting with Save De¿nitions and Restore De¿nitions
from the De¿ne submenu. Choosing Save De¿nitions from the De¿ne submenu has
the effect of storing all the currently active de¿nitions in the working copy of the current
document. When the document is saved, the de¿nitions are saved with it. Restore
114
Chapter 5 Function De¿nitions
De¿nitions does the reverse—it takes any de¿nitions stored with the current document
and makes them active.
Important
If you change the default setting for a document in Maple Settings to
Do Not Restore and you open, modify, and close the document without ¿rst choosing
De¿ne + Restore De¿nitions, then any de¿nitions previously saved with the document
will be lost and not recoverable.
Formulas
The Formula dialog provides a way to enter an expression and a Maple operation. What
appears on the screen is the result of the operation and depends upon active de¿nitions
of variables that appear in the formula. Formulas remain active in your document—that
is, changing de¿nitions of relevant variables will change the data on the screen.
When Helper Lines are turned on, a Formula is identi¿ed by a yellow background.
L To insert a formula
1. Click
on the Field toolbar
- or From the Insert menu, choose Field and then choose Formula.
2. In the Formula area, enter a mathematics expression.
3. In the Operation area, enter the operation you want to perform on the expression.
(Click the arrow to the right for a list of available operations.)
Formulas
115
4. Choose OK.
The results of the operation will be displayed on your screen.
Example 27 Choose Insert + Field + Formula. In the Formula box, type d, and
under Operations choose evaluate. Choose OK.
The d will appear on your screen at the position of the insertion point. Now, at
any point in your document, de¿ne d @ vlq {. The formula d will be replaced by the
expression vlq {. Make another de¿nition for d. The formula will again be replaced by
the new de¿nition everywhere the formula d appears in the document.
Example 28 Insert a 5 5 matrix. With the insertion point in the ¿rst input box, click
. In the Formula box, type d. Under Operations, choose evaluate. Choose OK.
Repeat for each matrix entry, typing e, d . 5e, and +d e,5 respectively in the formula
box to get the following matrix:
d
e
d . 5e +d e,5
Now de¿ne d @ vlq { and e @ frv {. The matrix will be replaced by the following
matrix.
vlq {
frv {
vlq { . 5 frv { +vlq { frv {,5
{
De¿ne d @ oq { and e @ h . The matrix will be replaced by the following matrix.
oq {
h{
oq { . 5h{ +oq { h{ ,5
Example 29 Insert a table with 2 columns and 5 rows. Insert formulas {, |, and { .
| . } in the columns on the right.
Date
Income
1/31/96
{
2/28/96
|
3/31/96
}
Total { . | . }
De¿ne { @ 53=89, | @ 4;=<5, } @ 56=78 to get the table
Date Income
1/31/96
53=89
2/28/96
4;=<5
3/31/96
56=78
Total
95= <6
Example 30 Multiple choice examinations with variations can be constructed using
formulas. This example outlines a way for constructing them manually. For more information on an automatic way for creating such examinations, look for references to online quizzes in the Welcome document. (See Help Contents, What’s New, or choose
Help + Search + Exam Builder.)
116
Chapter 5 Function De¿nitions
The questions depend on de¿nitions that are made globally for each document—they
are not local to each question or variant. This means that you should use Math Names
(see page 104) instead of single character names for variables. A sample question is
shown below. The variables d4 and e4 shown in this question are math names. They
should be entered as formulas—use Insert + Field + Formula followed by Insert +
and then click
.
Math Name, or click
You can create an examination with variations by making different de¿nitions for the
variables such as the d4 and e4 shown in the following question. Turn on Helper Lines
to check that all appropriate entries are formulas.
1. For which values of the variable { is d4 { e4 ? 3?
a.
b.
c.
d.
e.
{ ? e4 @ d4
{ A e4 @ d4
{ A e4
{ ? e4
None of these
First variation: De¿ne d4 @ 5 and e4 @ 8 by placing the insertion point in each
equation and choosing De¿ne + New De¿nition.
1. For which values of the variable { is 5{ 8 ? 3?
a.
b.
c.
d.
e.
{ ? 8@5
{ A 8@5
{A8
{?8
None of these
After printing a quiz, make different de¿nitions for d4 and e4 to obtain additional
variations of the quiz.
Maple Functions
You can access Maple functions that do not appear as a menu item.
Accessing Maple Functions
L To access the Maple function pivot and to name it S
1. From the De¿ne submenu, choose De¿ne Maple Name.
2. Respond to the dialog box as follows.
Maple Functions
117
Maple Name: pivot(x,i, j)
Scienti¿c WorkPlace [Notebook] Name: S +{> l> m,
File: (Leave blank.)
Maple Packages Needed: (Check Linear Algebra Library.)
3. Check OK.
This procedure de¿nes a function S +{> l> m, that performs a pivot on the l> m entry of
a matrix {.
5
6
;8 88 6: 68
83
:<
89 8. De¿ne S +{> l> m, @ pivot(x,i,j)
Example 31 De¿ne { @ 7 <:
7<
96
8: 8<
as described above. Then, evaluate S +{> 5> 5, to get
5 54:
6
466
7<<
3
43
43
8
9
83
:<
89 :
S +{> 5> 5, @ 7 <:
8
6994
83
3
545:
83
656<
58
An extensive Maple library is included with your system. Here is a short list from
the many examples that are available using the De¿ne Maple Name dialog.
Maple Name
Heaviside(x)
nextprime(x)
isprime(n)
phi(n)
legendre(a,b)
galois(f)
interp(x,y,v)
Psi(x)
resultant(a,b,x)
¿nduni(x,F)
gbasis(F,X)
Sample VQE Name
K+{,
s+q,
t+q,
*+q,
O+d> e,
j+i ,
S +{> |> y,
#+{,
u+d> e> {,
x+{> I ,
J+I> [,
Maple Packages Needed
none
none
none
numtheory
numtheory
none
none
none
none
grobner
grobner
Multiple notations for vectors are possible, including row or column matrices, and
q-tuples enclosed by either parentheses or square brackets. However, to work with a
Maple-de¿ned function, you must use appropriate Maple syntax for the function arguments. For example, gbasis from the Grobner library accepts a list entered with square
brackets, such as ^d> e> f> g`, or a set entered with curly braces, such as i{5 . 6{> 8{|j.
Example 32 Use De¿ne + De¿ne Maple Name to de¿ne a function J+[> \ , from
the Maple function gbasis(X,Y) in the Grobner library. Apply Evaluate to get each
of the following.
J+^[ . 4> \ . 4> [\ . ]`> ^[> \> ]`, @ ^\ . 4>
4 . ]> [ . 4`
J+^\ 5 ] . 4> [ 5 . \ 5 > [] 5 . 4`> ^[> \> ]`, @ ] . [> \ 5 . ] 5 > 4 . ] 6
5
5
5
5
5
5
6
J+^\
5] . 4> [ 5. \ 5> [] 5. 4`>^]> \> [`, @ [ . \ > ]5. [>54 . [ 6 J+ \ ] . 4> [ . \ > [] . 4 > ^\> [> ]`, @ ] . [> \ . ] > 4 . ]
118
Chapter 5 Function De¿nitions
See page 397 for another example. In that section, the Maple function nextprime
is used.
Maple functions de¿ned in this way can be saved with and restored to a document
with Save De¿nitions and Restore De¿nitions as described previously for de¿ned
functions (see page 113). These functions, with their Maple name correspondences,
appear in the Show De¿nitions window but they are not removed by Clear De¿nitions.
To remove a Maple function, select the function name and choose Maple + De¿ne +
Unde¿ne.
The guidelines for valid function and expression names (see page 103) apply to the
names that can be entered in the De¿ne Maple Name dialog box. You can give a
multicharacter name to a Maple function as follows. With the De¿ne Maple Name
dialog box open and the insertion point in the Scienti¿c WorkPlace (Notebook) Name
box, click the Math Name icon
, enter the desired function name, and click OK.
Adding User-De¿ned Maple Functions
You can access user-de¿ned functions written in the Maple language. Save the function
to a ¿le ¿lename.m in a Maple session. While in a document, from the De¿ne submenu,
choose De¿ne Maple Name.
To access the function “myfunc” and name it “P,” respond to the dialog box as
follows.
Maple Name: myfunc(x)
Scienti¿c WorkPlace (Notebook) Name: P+{,
File: /dirname/subdirname/myfunc.m
Maple Packages Needed: (Check the name of all pertinent Maple libraries. Leave
blank if nothing special is called for.)
Note the forward slashes in the subdirectory speci¿cation for the location of the .m
¿le. This syntax must be closely followed. It will be read in Maple as
read ‘/dirname/subdirname/myfunc.m‘
This procedure de¿nes a function P+{, that behaves according to your Maple program. The guidelines at the beginning of this appendix for valid function and expression
names apply to the names that can be entered in the De¿ne Maple Name dialog box.
Maple functions accessed through the De¿ne Maple Name dialog can be saved
with and restored to a document with Save De¿nitions and Restore De¿nitions, as
described earlier for de¿ned functions. The Maple functions accessed through the De¿ne Maple Name dialog appear in the Show De¿nitions window, but they are not
removed by Clear De¿nitions. To remove such a Maple function, select the function
name and choose Maple + De¿ne + Unde¿ne.
Tables of Equivalents
Maple constants and functions are available either as items on the Maple menu or
Tables of Equivalents
119
through evaluating mathematical expressions.
Maple Constants
The common Maple constants can be expressed in ordinary mathematical notation.
Maple V
E
I
Pi
gamma
Htxlydohqw
h s
l or 4 (or m, see page 32)
q
S 4
jdppd or olp
p oq q
$4
q
p@4
Maple Menu Items
Following is a summary of equivalents for some of the common Maple functions and
procedures together with the equivalent Maple menu item.
Algebra
Maple V
eval
evalc
evalf
simplify
combine
combine
combine
combine
Maple Menu
Evaluate
Evaluate
Evaluate Numerically
Simplify
Combine + Exponentials
Combine + Logs
Combine + Powers
Combine + Trig Functions
Maple V
factor
ifactor
expand
evalb
solve
fsolve
isolve
rsolve
Maple Menu
Factor
Factor
Expand
Check Equality
Solve + Exact
Solve + Numeric
Solve + Integer
Solve + Recursion
120
Chapter 5 Function De¿nitions
Maple V
collect
convert + parfrac
roots
sort
linalg[companion]
Maple Menu
Polynomials + Collect
Polynomials + Divide
Polynomials + Partial Fractions
Polynomials + Roots
Polynomials + Sort
Polynomials + Companion Matrix
Calculus
Maple V
student[intparts]
student[changevar]
convert + parfrac
student[leftsum]
student[rightsum]
student[middlesum]
student[leftbox]
student[rightbox]
student[middlebox]
student[extrema]
map + diff
Maple Menu
Calculus + Integrate by Parts
Calculus + Change Variables
Calculus + Partial Fractions
Calculus + Approximate Integral
Calculus + Approximate Integral
Calculus + Approximate Integral
Calculus + Plot Approx. Integral
Calculus + Plot Approx. Integral
Calculus + Plot Approx. Integral
Calculus + Find Extrema
Calculus + Iterate
Calculus + Implicit Differentiation
Power Series
Differential Equations
Maple V
pdesolve
dsolve + explicit
dsolve + laplace
dsolve + numeric
dsolve + series
Maple Menu
Solve PDE
Solve ODE + Exact
Solve ODE + Laplace
Solve ODE + Numeric
Solve ODE + Series
Vector Calculus
Maple V
linalg[jacobian]
linalg[hessian]
linalg[potential]
linalg[vecpotent]
Maple Menu
Vector Calculus + Jacobian
Vector Calculus + Hessian
Vector Calculus + Scalar Potential
Vector Calculus + Vector Potential
Vector Calculus + Set Basis Variables
Tables of Equivalents
Matrices
Maple V
linalg[adj]
linalg[concat]
linalg[charpoly]
linalg[colspace]
linalg[cond]
linalg[de¿nite]
linalg[det]
linalg[eigenvals]
linalg[eigenvects]
linalg[ffgausselim]
linalg[htranspose]
Maple Menu
Matrices + Adjugate
Matrices + Concatenate
Matrices + Characteristic Polynomial
Matrices + Column Basis
Matrices + Condition Number
Matrices + De¿niteness Tests
Matrices + Determinant
Matrices + Eigenvalues
Matrices + Eigenvectors
Matrices + Fill Matrix
Matrices + Fraction-free Gaussian Elimination
Matrices + Hermitian Transpose
Maple V
linalg[inverse]
linalg[jordan]
linalg[minpoly]
linalg[norm]
linalg[kenel]
linalg[orthog]
linalg[permanent]
linalg[LUdecomp]
linalg[QRdecomp]
linalg[randmatrix]
linalg[rank]
Maple V
Frobenius
linalg[rref]
linalg[rowspace]
linalg[singularvals]
Svd
linalg[smith]
linalg[trace]
linalg[transpose]
Maple Menu
Matrices + Inverse
Matrices + Jordan Form
Matrices + Minimum Polynomial
Matrices + Norm
Matrices + Nullspace Basis
Matrices + Orthogonality Test
Matrices + Permanent
Matrices + PLU Decomposition
Matrices + QR Decomposition
Matrices + Random Matrix
Matrices + Rank
Maple Menu
Matrices + Rational Canonical Form
Matrices + Reduced Row Echelon Form
Matrices + Reshape
Matrices + Row Basis
Matrices + Singular Values
Matrices + SVD
Matrices + Smith Normal Form
Matrices + Trace
Matrices + Transpose
Edit + Insert Column(s)
Edit + Insert Row(s)
Edit + Merge Cells
121
122
Chapter 5 Function De¿nitions
Simplex
Maple V
simplex[dual]
simplex[feasible]
simplex[maximize]
simplex[minimize]
simplex[standardize]
Maple Menu
Simplex + Dual
Simplex + Feasible
Simplex + Maximize
Simplex + Minimize
Simplex + Standardize
Statistics
Maple V
stats[regression]
stats[multiregress]
stats[linregress]
linalg[leastsqrs]
Maple Menu
Statistics + Fit Curve to Data + Multiple Regression
Statistics + Fit Curve to Data + Multiple Regression
Statistics + Fit Curve to Data + Multiple Regression
Statistics + Fit Curve to Data + Polynomial of Degree n
Maple V
stats[RandBeta]
stats[random[binomiald]]
stats[random[cauchy]]
stats[RandChiSquare]
stats[RandExponential]
stats[RandFdist]
stats[RandGamma]
stats[RandNormal]
stats[RandPoisson]
stats[RandStudentsT]
stats[RandUniform]
stats[random[weibull]]
Maple Menu
Statistics + Random Numbers + Beta
Statistics + Random Numbers + Binomial
Statistics + Random Numbers + Cauchy
Statistics + Random Numbers + Chi-Square
Statistics + Random Numbers + Exponential
Statistics + Random Numbers + F
Statistics + Random Numbers + Gamma
Statistics + Random Numbers + Normal
Statistics + Random Numbers + Poisson
Statistics + Random Numbers + Student’s t
Statistics + Random Numbers + Uniform
Statistics + Random Numbers + Weibull
Maple V
stats[average]
stats[median]
stats[mode]
stats[correlation]
stats[covariance]
stats[describe,mean deviation]
stats[describe,moment]
stats[describe,quantile]
stats[sdev]
stats[variance]
Maple Menu
Statistics + Mean
Statistics + Median
Statistics + Mode
Statistics + Correlation
Statistics + Covariance
Statistics + Mean Deviation
Statistics + Moment
Statistics + Quantile
Statistics + Standard Deviation
Statistics + Variance
Tables of Equivalents
123
Plot 2D
Maple V
plot
Maple Menu
Plot 2D
Maple V
plot3d
Maple Menu
Plot 3D
Plot 3D
Equivalents for Maple Expressions
The following tables give Maple examples with equivalent examples that can be evaluated with Maple + Evaluate or CTRL + E.
Algebra
Maple V
sqrt(x)
abs(x)
max(a,b,c)
min(a,b,c)
gcd(x^2+1,x+1)
lcm(x^2+1,x+1)
Àoor(123/34)
ceil(123/34)
Maple V
binomial(6,2)
factorial(x) or x!
123 mod 17
a &^n mod m
rem(3*x^3+2*x,x^2+1,x)
{a,b}union{b,c}
{a,b}intersect{b,c}
signum(x)
Equivalent
s
{or {4@5
m{m
pd{+d> e> f, or d b e b f
plq+d> e> f, or d a e a f
jfg+{5 . 4> { . 4,
5
ofp+{
. 4> { . 4,
456
67
456
67
Equivalent
9
5
{$
456 prg 4:
dq prg p
6{6 . 5{ prg {5 . 4
id> ej ^ ie> fj
id> ej _ ie> fj
4 if { 3
vljqxp +{,
4 if { ? 3
124
Chapter 5 Function De¿nitions
Trigonometry
Maple V
sin(x)
cos(x)
tan(x)
cot(x)
sec(x)
csc(x)
arcsin(x)
arccos(x)
arctan(x)
arccot(x)
arcsec(x)
arccsc(x)
Equivalent
vlq { or vlq+{, ( See page 126.)
frv { or frv+{,
wdq { or wdq+{,
frw { or frw +{,
vhf { or vhf +{,
fvf { or fvf +{,
dufvlq { or vlq4 { or dufvlq+{, or vlq4 +{,
duffrv { or frv4 { or duffrv+{, or frv4 +{,
dufwdq { or wdq4 { or dufwdq+{, or wdq4 +{,
duffrw { or frw4 { or duffrw +{, or frw4 +{,
dufvhf { or vhf4 { or dufvhf +{, or vhf4 +{,
duffvf { or fvf4 { or duffvf +{, or fvf4 +{,
Exponential, Logarithmic, and Hyperbolic Functions
Maple V
exp(x)
log(x) or ln(x)
log10(x)
sinh(x)
cosh(x)
tanh(x)
coth(x)
arccosh(x)
arcsinh(x)
arctanh(x)
Equivalent
h{ or h{s+{,
orj { or oq { or orj +{, or oq +{, ( See page 90.)
orj43 { or orj43 +{, (See page 78)
vlqk { or vlqk+{,
frvk { or frvk+{,
wdqk { or wdqk+{,
frwk { or frwk +{,
frvk4 { or frvk4 +{,
vlqk4 { or vlqk4 +{,
wdqk4 { or wdqk4 +{,
Calculus
Maple V
diff(x*sin(x),x)
D(f)
D(f)(3)
int(x*sin(x),x)
int(x*sin(x),x = 0..1)
limit(sin(x)/x,x=0)
sum(i^2,2^i, i = 1..in¿nity)
Equivalent
g
g{ +{ vlq {,
i 3 > Gi> G
iU 3 +6,
{ vlq { g{
U4
{ vlq { g{
3
olp{$3 vlq{ {
S4 l5
l@4 5l
Tables of Equivalents
125
Complex Numbers
Maple V
Re(z)
Im(z)
abs(z)
Equivalent
Uh +},
Lp +},
m}m
csgn(z)
fvjq+},,
signum(z)
vljqxp +},,
conjugate(z)
}
4 if Uh +}, A 3 or Uh +}, @ 3 and Lp +}, 3
4 if Uh +}, ? 3 or Uh +}, @ 3 and Lp +}, ? 3
+ }
if } 9@ 3
m}m
3 if } @ 3
Linear Algebra
Maple V
multiply(A,B)
inverse(matrix(2,2,[1,2,3,4])
transpose(matrix(2,2,[1,2,3,4])
map(x -A x mod 17,A)
htranspose(matrix(2,2,[1,I+1,-I,2])
multiply(A,inverse(B))
map(x -A x mod 17,inverse(A))
linalg[norm(x,n)]
linalg[norm(x,frobenius)]
linalg[norm(x,in¿nity)]
Equivalent
DE
4
4 5
6 7
W
4 5
6 7
D prg 4:
K
4 l.4
l
5
DE 4
D4 prg 4:
n{nq
n{nI
n{n4
Vector Calculus
Maple V
grad(x*y*z,[x,y,z])
norm(array([1,-3,4]),p)
crossprod(array([1,-3,4]),array([2,2,-5]))
diverge(vector([x,x*y,y-z]),vector([x,y,z]))
curl(vector([x,x*y,y-z]),vector([x,y,z]))
laplacian(x^2*y*z^3,[x,y,z])
Equivalent
u{|}
n+4>
s
5 6>67,n5
6
4
5
7 6 8 7 5 8
7
8
u +{> {|> | },
u +{> {|> | },
u5 {5 |} 6
126
Chapter 5 Function De¿nitions
Special Functions
Maple V
BesselI(v,z)
BesselK(v,z)
BesselJ(v,z)
BesselY(v,z)
Equivalent
EhvvhoLy +}, or Ly +},
EhvvhoNy +}, or Ny +},
EhvvhoMy +}, or My +},
Ehvvho\y +}, or \y +},
Beta(x,y)
Ehwd +{> |,
Catalan
S4
dilog(x)
glorj +{,
euler(n)
hxohu +q,
euler(n,x)
hxohu +q> {,
erf(x)
erfc(x)
LambertW(x)
hui+{,
4 hui+{,
OdpehuwZ+{,
n@3
n
+4,
5
+5n . 4,
Maple V
AiryAi(x)
AiryAi(n,x)
AiryBi(x)
AiryBi(n,x)
Ci(x)
Ei(x)
GAMMA
Si(x)
Psi(x)
Psi(n,x)
Equivalent
Dlu|Dl+{,
Dlu|Dl+q> {,
Dlu|El+{,
Dlu|El+q> {,
Fl+{,
Hl+{,
+{,
Vl+{,
Svl+{,
Svl+q> {,
Zeta(x)
Zeta(n,s)
+{,
+q> {,
(See page 343 for notation.)
(See page 343 for notation.)
(See page 343 for notation.)
(See page 343 for notation.)
+{, . +|,
+{ . |,
Catalan’s constant
U { oq w
gw
4
4w
S
5
hxohu +q, q
w
@ 4
q@3
hw .{whw
q$
S
5h
hxohu +q> {, q
@ 4
w
q@3
hw . 4
q$
U
5
{
error function: s5 3 hw gw
complementary error function
OdpehuwZ +{, hOdpehuwZ+{, @ {
Airy wave function (a solution to |33 |{ @ 3)
qth derivative of Dlu|Dl function
Airy wave function (a solution to |33 |{ @ 3)
qth derivative of Dlu|El function U
{
w
cosine integral: jdppd . oq { 3 4frv
gw
w
U { hw
exponential integral:U 4 w gw
4 w {4gw
gamma function:
U { vlq3 w h w
sine integral: 3 w gw
g
Psi function: # +{, @ g{
oq +{,
qth derivative of Psi function
S
4
Zeta function: +{, @ 4
q@4 v for v A 4
q
qth derivative of Zeta function
Trigtype Functions
Your system recognizes two types of functions—ordinary functions and trigtype functions. The gamma and exponential functions +{, and h{s +{, are examples of ordinary
functions, and vlq { and oq { are examples of trigtype functions. The distinction is that
the argument of an ordinary function is always enclosed in parentheses and the argument
of a trigtype function often is not.
Twenty six functions are interpreted as triptype functions: the six trig functions,
the corresponding hyperbolic functions, the inverses of these functions written as “arc”
Trigtype Functions
127
functions (e.g. dufwdq +{, ), and the functions orj and oq. These functions were identi¿ed as trigtype functions because they are commonly printed differently from ordinary
functions in books and journal articles.
There is no ambiguity in determining the argument of an ordinary function because it
is always enclosed in parentheses. Consider +d . e, { for example. It is clear that the
writer intends that be evaluated at d . e and then the result multiplied by {. However,
with the similar construction vlq +d . e, {, it is quite likely that the sine function is
intended to be evaluated at the product +d . e, {. If this is not what is intended, the
expression is normally written as { vlq +d . e,, or as +vlq +d . e,, {.
To ascertain how an expression you enter will be interpreted, place the insertion point
in the expression and press CTRL + ?.
L C TRL + ?.
vlq {@5 @ vlq {5
You can reset your system to require that all functions be written with parentheses
around the argument.
L To disable the trigtype function option
1. In the Maple Settings dialog, choose the De¿nitions Options page.
2. Check Convert Trigtype to Ordinary.
3. Choose OK.
Your system will then not interpret vlq { as a function with argument {, but will still
recognize vlq +{,.
Determining the Argument of a Trigtype Function
Roughly speaking, the algorithm that decides when the end of the argument of a trigtype
function has been reached stops when it ¿nds a . or sign, but tends to keep going as
long as things are still being multiplied together. There many exceptions, some of which
are shown in the following examples.
L
CTRL
+?
vlq { . 8 @ vlq { . 8 It didn’t write vlq +{ . 8, so { is the argument of vlq.
vlq+d . e,{ @ vlq +d . e, { It didn’t write +vlq +d . e,, { , so +d . e, { is the
argument.
vlq {+d . e, @ vlq { +d . e, It didn’t write +vlq {, +d . e, , so { +d . e, is the
argument.
vlq { frv { @ vlq { frv { It didn’t write vlq +{ frv {, so { is the argument of vlq.
128
Chapter 5 Function De¿nitions
vlq {+frv {.wdq {, @ vlq { +frv { . wdq {, It didn’t write +vlq {, +frv { . wdq {,
so { +frv { . wdq {, is the argument of vlq.
+vlq {, +frv { . wdq {, @ +vlq {, +frv { . wdq {, Here { is the argument of vlq.
vlq +{, +d . frv e, @ +vlq {, +d . frv e, Here { is the argument of vlq.
The algorithm stops parsing the argument of one trigtype function when it comes to
another
vlq { frv +d{ . e, @ +vlq {, +frv +d{ . e,,
except when the second trigtype function is part of an expression inside expanding
parentheses:
vlq { +frv +d{ . e,, @ vlq +{ +frv +d{ . e,,,
Some examples with the ordinary function h{s +{, @ h{ are included for comparison.
vlq { frv +d{ . e, @ vlq { frv +d{ . e, In this case, frv +d{ . e, is not part of the
argument.
vlq { h{s +{, @ vlq +{ h{s +{,, In this case, h{s +e, is part of the argument.
vlq { +frv +d{ . e,, @ vlq { +frv +d{ . e,, In this case, frv +d{ . e, is part of the
argument.
+vlq {, +frv +d{ . e,, @ +vlq {, +frv +d{ . e,, In this case, frv +d{ . e, is not
part of the argument.
vlq +{, +frv +d{ . e,, @ +vlq {, +frv +d{ . e,, In this case, frv +d{ . e, is not
part of the argument.
vlq { +d . h{s +e,, @ vlq { +d . h{s +e,, In this case, d . h{s +e, is part of the
argument.
+vlq {, +d . h{s +e,, @ +vlq {, +d . h{s +e,, In this case, d . h{s +e, is not part
of the argument.
vlq +{, +d . h{s +e,, @ +vlq {, +d . h{s +e,, In this case, d . h{s +e, is not part
of the argument.
Division using ‘@’ is treated much like multiplication.
vlq {@5 @ vlq {5
vlq {@ frv { @
vlq {|@5 @ vlq { |5
but vlq+{,@5 @
vlq {
frv {
vlq {
5
and +vlq {, @5 @
and +vlq {, @ frv { @
vlq {
frv {
and vlq+{|,@5 @ vlq {|
5
vlq {
5
but vlq +{@ frv {, @ vlq frv{ {
but +vlq {|, @5 @
vlq {|
5
As the examples above show, parentheses enclosing both the function and its argument will remove any ambiguity. If you write +vlq {|, }, the product {| will be taken
as the argument of vlq.
Exercises
129
Exercises
1. De¿ne d @ 8. De¿ne e @ d5 . Evaluate e. Now De¿ne d @
of e and check your answer by evaluation.
s
5. Guess the value
2. De¿ne i +{, @ {5 . 6{ . 5. Evaluate
i +{ . k, i +{,
k
and Simplify the result. Do computations in place to show intermediate steps in the
simpli¿cation.
3. Rewrite the function i+{, @ pd{ {5 4> : {5 as a piecewise-de¿ned function.
4. Experiment with the Euler phi function *+q,, which counts the number of positive
integers n q such that jfg+n> q, @ 4. Use De¿ne + De¿ne Maple Name
to open a dialog box. Type phi(n) as the Maple name, *+q, as the Vflhqwlf
ZrunSodfh2Qrwherrn Name, and check the Maple Library Numtheory box. Test
the statement “If jfg+q> p, @ 4 then *+qp, @ *+q,*+p,” for several speci¿c
choices of q and p.
5. De¿ne g+q, by typing divisors(n) as the Maple name, g+q, as the Vflhqwlf
ZrunSodfh2Qrwherrn Name, and check the Maple Library Numtheory box. Explain what the function g+q, produces. (This is an example of a set-valued function,
since the function values are sets instead of numbers.)
Solutions
1. If d @ 8 then de¿ning e @ d5 produces e @ 58= Now de¿ne d @
is now e @ 5.
s
5. The value of e
2. Evaluate followed by Simplify yields
+{ . k,5 . 6k {5
i +{ . k, i +{,
@
k
k
@ 5{ . k . 6
5
5
Select the expression @ +{.k, k.6k{ and with the CTRL key down drag the expres5
sion to create a copy. Select the expression +{ . k, and with the CTRL key down
choose Expand. Add similar steps (use Factor to rewrite 5{k . k5 . 6k) until you
have the following:
+{ . k,5 . 6k {5
i+{ . k, i +{,
@
k
k
{5 . 5{k . k5 . 6k {5
@
k
5{k . k5 . 6k
@
k
130
Chapter 5 Function De¿nitions
k +5{ . k . 6,
k
@ 5{ . k . 6
3. To rewrite i +{, @ pd{ {5 4> : {5 as a piecewise-de¿ned function, ¿rst note
that the equation {5 4 @ : {5 has the solutions { @ 5 and { @ 5. The function
i is given by
; 5
? { 4 if { ? 5
: {5 if 5 { 5
j+{, @
= 5
{ 4 if { A 5
As a check, note that i +8, @ 57, j+8, @ 57, i +4, @ 9, j+4, @ 9, i +6, @ ;, and
j+6, @ ;.
@
4. Construct the following table:
q *+q,
4
4
5
4
6
5
7
5
8
7
9
5
:
9
;
7
<
9
43
7
Notice, for example, that
*+7 8,
*+7 :,
*+6 ;,
q
44
45
46
47
48
49
4:
4;
4<
53
*+q,
43
7
45
9
;
;
49
9
4;
;
q
54
55
56
57
58
59
5:
5;
5<
63
*+q,
45
43
55
;
53
45
4;
45
5;
;
@ ; @ *+7,*+8,
@ 45 @ *+7,*+:,
@ ; @ *+6,*+;,
5. We have the following table:
q
g+q,
q
g+q,
q
4
i4j
44
i4> 44j
54
5
i4> 5j
45 i4> 5> 6> 7> 9> 45j 55
6
i4> 6j
46
i4> 46j
56
7
i4> 5> 7j
47
i4> 5> :> 47j
57
8
i4> 8j
48
i4> 6> 8> 48j
58
9 i4> 5> 6> 9j 49
i4> 5> 7> ;> 49j
59
:
i4> :j
4:
i4> 4:j
5:
; i4> 5> 7> ;j 4; i4> 5> 6> 9> <> 4;j 5;
<
i4> 6> <j
4<
i4> 4<j
5<
43 i4> 5> 8> 43j 53 i4> 5> 7> 8> 43> 53j 63
Notice that g+q, consists of all the divisors of q.
g+q,
i4> 6> :> 54j
i4> 5> 44> 55j
i4> 56j
i4> 5> 6> 7> 9> ;> 45> 57j
i4> 8> 58j
i4> 5> 46> 59j
i4> 6> <> 5:j
i4> 5> 7> :> 47> 5;j
i4> 5<j
i4> 5> 6> 8> 9> 43> 48> 63j
© Copyright 2026 Paperzz