Part 1: Elementary Calculations
Each of the command entry instructions below is sent to Maple for processing by pressing the RETURN or ENTER key on your keyboard.
1. In the Maple worksheet,
and then press RETURN or ENTER. (From now on, we will not add this last part of the instruction.)
Note where that the cursor remains in the exponent until you move it.
Part 2: Variables
Note where that the semicolon allows you to put two commands on the same line
3. The result of the preceding step
follows from the fact that the variable x has been assigned the value
3 and the variable y has been assigned the value 2. Check
this by entering
4. Enter the following line. Note that it ends with
Note that entering a line with a colon has the effect as entering it without a colon, except that nothing is displayed afterwards.
6. Use pencil and paper to decide
what number xy2 + 3z represents, and then check your answer by
Use your mouse to return to the expression just entered, replace the 3 by 4, and press RETURN.
7. Suppose we want to remove
the identification of x with 3.
Check this by entering
Now remove the identifications of y with 2 and z with 5. Check by entering
You should see xyz as the output.
distinguishes between := and =. The first is used for definitions. The equals
sign alone is used to enter equations.
Check this by entering
(Here the s after the comma in the command tells Maple what to solve for.)
% + 5
The percent sign has the value of the last quantity calculated. Check this by entering
% + z
Part 3: Text
1. You may enter text as you would in any word processor by clicking on the word "Text" on the toolbar (next to the word "Math").
2. You can return to Maple Notation input by clicking on the word "Math".
Part 4: What Maple remembers
1. Create a new region and
On a new line type
2. Go back into the region, delete the line
and press RETURN. In the new region,
Notice that Maple still remembers that x has been assigned the value 15 -- even though that line no longer appears in the worksheet.
Maple remembers what has been entered in the order it was entered.
If you save a
Maple file without removing the output, then reload it later, it will
look the same as when you saved it. But Maple will not remember any of
the displayed commands. All of those commands must be reentered before you
are again in the same state as when you saved and closed the
Now assign the value 7 to s and the value 1 to t.
to see the current value of z.
4. Go back up to the line
and change the 7 to 8. Then press RETURN while the cursor is still in this line. Again note that an altered line must be entered for the
value to be acknowledged by Maple. Similarly, change the value of t
to -1. Now enter
� Maple remembers what has been entered in the order it was entered.
5. A very useful command is the
restart command. If you enter
Maple clears the memory. It is the same as loading the current worksheet. All Maple commands that you need, including loading of
packages, must be reentered.
Part 5: Functions
1. Next we define a function to assign the value
10 sin x to each x. Enter
You may be surprised to see 10 sin(1) rather than a decimal approximation.
2. To obtain
a decimal approximation, enter
evalf(10*sin(1)) or evalf(%)
The command "evalf" stands for "floating point evaluation."
3. To be sure that the action of evalf is clear, enter
4. Let's evaluate f at pi/6. First, we need the value of pi. Enter
Alter this line to read
Compare this with
Both "pi" symbols look the same, but only the one obtained with an upper case "P" and a lower-case "i" carries the numerical value.
Now find a decimal approximation to f(pi/6)
Part 6: Graphing
1. In order to
plot 3 sin(2x) over the interval [0,2 pi].
We can obtain the same result by defining the function f given by f(x) = 3 sin(2x) and plotting f(x). Enter the following:
2. When the plot appears, use your mouse to "select" it -- you should see a box around the graphic. Experiment with the drag buttons at the corners and sides of the box. Experiment with the icons at the top of the screen to see what they do.
3. Next we plot data given as
ordered pairs. Enter
Go back and see what happens if you delete "style=point."
4. Often we wish to view several
graphs at the same time. One way to do this is to enter the desired plots
directly into the plot command.
5. Another way to create multiple plots is
to use the display command in the plots package. To access this
package click on "Tools" on the top toolbar, then click on "Load Package" then
click on "Plots".
This creates a plot and names it "graph1." Create a second plot by entering
To see both plots together, enter
6. To plot a curve defined implicitly, like the unit circle for example, first make sure that you have loaded the plots package (see 5 above)
then on a new line type implicitplot(x^2+y^2 = 1, x = -1 .. 1, y = -1 .. 1).
7. Try ploting x^2-y^2=1 with x =
-3..3 and y = -3..3.
8. In the Maple worksheet, click on the word plots (following the word loading) to see many other possible plot commands.
Part 7: Differentiation and Integration
1. Define g to be the function given
by g(x) = x2cos x.
Check your work by evaluating g(pi). You should obtain -pi2. If you have trouble, look at Part 5 again.
2. Now enter
How would you calculate the third derivative?
3. If you want to calculate the derivative of an expression that you have not yet entered, just replace g(x) by the expression.
For example, enter
Now insert a literal constant in the expression: Enter
Then change the final x to an a. That is, enter
What is the role of the symbol after the comma in the differentiation expression?
4. Next we calculate indefinite integrals. If necessary, unassign x:
You can check that the result is an antiderivative of x sin(x) by entering
5. Next try to find an antiderivative for sin(x3 + x5). Maple does not know an antiderivative of this function that may be defined in terms of functions known to it. On the other hand, try
Note that Maple gives an answer involving the "erf" function , which you probably never heard of and not that useful to you at the moment. We'll discuss this more later in the course.
6. Next we calculate definite integrals. To integrate x sin(x) over the interval [0,pi/2], enter
7. Now try this method on the integral of sin(x3+x5) over the interval [0,pi/2]. Maple still doesn't know an antiderivative for sin(x3+x5). To obtain a numerical estimate, enter
If you know that all you want is a numerical estimate, you can enter
The significance of the upper-case I in Int is that Maple does not try to find a symbolic solution before starting on the numerical estimate.
8. Maple can also compute improper integrals. Enter
Part 8: Algebraic Operations
1. Enter the polynomial
2. Use the following command to factor P
Note that there is no space bewtween factor and (P)
4. We may use the solve command to obtain a complete factorization. Enter the following
Notice in the complex roots that Maple uses a capital I for the imaginary unit -- rather than just i.
Part 9: Limits
1. Limits are easy to calculate in
Maple. As a test we'll calculate the limit of sin(x)/x as x
approaches 0. Enter the
limit(sin(x)/x, x = 0)
2. The Maple limit command also
calculates limits at infinity. Enter
limit((1 + x3)/((1 + x)*(1+2*x2)), x = infinity)
3. The standard limit command will deal with one-sided limits if there is no possibility of confusion. Enter
limit(sqrt(x)/sqrt(x + x^2), x=0
limit(abs(x)/x, x = 0)
5. Why is this
limit ambiguous? Try
limit(abs(x)/x, x = 0, right)
Now replace "right" by "left."