Part I. The Maple Worksheet
Section 2. Entering a Block of Text
Hashed out input comments can be helpful but, as a rule, they should only be used to make very brief remarks about input entries. More detailed documentation of input and output should be made in blocks of text that can be managed using Maple's text processing tools. Here is a typical example.
Annotating input and output: An example
Use Maple to find an antiderivative for the function
and verify that it differentiates to y.
The following input entry defines the y variable as a function of x.
> | y := tan(x)/sin(x)^4; |
The combination of a colon and an equals sign is called the assignment operator. As shown above, it can be used to make functions in terms of a dependent variable (y in this case) as a function of an independent variable (x).
Using an equals sign will not work.
More about this later.
Once y is defined as a function of x, an antiderivative function Y can be defined as follows.
> | Y := int(y,x); |
It is certainly not obvious that the function Y differentiates to y. A check that it does might go like this.
First differentiate Y with respect to x, naming the derivative function Yp (for "Y prime").
Note that the syntax for differentiation is similar to the syntax for integration: diff( f(x) , x ) .
> | Yp := diff(Y,x); |
Yp should be the same function as y, but its formula does not look like the one defining y. Maple's simplify procedure could be useful here. Apply it to Yp with the entry
simplify(Yp);
as shown below.
> | simplify(Yp); |
The output is not identical to y, but it might be close enough to declare the game over (can you see why?). If more evidence is required, apply the simplify procedure to y.
> | simplify(y); |
This shows that Yp is the same function as y.
End of Example.
So, the question is, how can the user insert a block of text, say after an Execution Group?
Answer: It can be done in two ways.
To insert text below the cursor
1. Use the Insert menu: Pull down the Insert menu, choose Execution Group/After Cursor. Then pull the Insert menu down again and choose Text. A blinking cursor will appear ready to accept text just like your favorite word processor.
2. Use the keyboard: Press Command-J to insert a new Execution Group below the cursor position, then press Command-T to delete the input prompt and get a blinking text cursor. On a PC press Control-J, then Control-T.
The keyboard equivalent for inserting a text block above the current cursor position is Command-K, followed by Command-T. (Control-K, then Control-T on a PC.) The Insert menu can also be used.
The keyboard equivalents are certainly worth memorizing:
Text above: Command-K, Command-T.
Text below: Command-J, Command-T. (Substitute "Control" for "Command" on a PC.)
It couldn't be much easier. Now let's talk about correcting typing mistakes.
Undo it: Command-Z
The first item on the Edit menu is Undo , the keyboard equivalent for undo is Command-Z . (Control-Z on a PC; PC users substitute "Control" (Ctrl) for "Command" in all keyboard equivalents.)
Undo and Redo are also a single mouse click away. Click on the arrow icons appearing just to the left of center on the tool bar: The left curvy arrow is Undo and the right one is Redo . That is, it undoes the Undo (see the picture in Section 1, page 1).
Maple 9.5 supports multiple Undos, so many of them that this user has not yet found the upper limit. Just by pressing Command-Z the user can easily back up and quickly fix any typing mistake. Of course, typing mistakes in a text entry or at an input prompt can also be fixed by pressing the [delete] key.
Delete it: Command-[delete]
Whole paragraphs can be deleted by holding down the Command key and pressing [delete]. This applies to text paragraphs, input entries, and Maple output as well.
Go to: Next Section Previous Section