COMP203: Lecture 16

Vocabulary

When circumstances allow, I'll be typing up bits of my lecture notes and posting them online. These may or may not bear any resemblance to the actual lectures.


Maple terms

In Logo, there were specific meanings assigned to words like "output". Many of these words are used a little differently in Maple (and differently again in everyday conversation).

Maple's command prompt looks like [> and fills the same function as Logo's ? prompt. (Maple uses no symbol where Logo used ~ and >.)

Input is something you type at Maple's command propmt.

The thing you type at Maple's command prompt is a command (like a Logo instruction).

To Execute a command, you hit enter.

Output is Maple's response to executing a command. It usually appears on your screen in blue.

Maple's built-in procedures are referred to as functions. Examples of functions include evalf(), sin(), and exp(). Do not leave space between the name of the function and the parentheses after it.

Inputs to Maple's functions are called arguments. For example, exp(5) and 20 are argments to evalf in the command evalf(exp(5), 20);.

Math terms

Computers are very precise and accurate, but they are not wise. Asking Maple to solve z = 3r + 5 does not yield a satisfying response -- you'd need to tell Maple to solve for r, or perhaps set z=0. Some homework questions will test on you on the difference between expressions, equations and functions; just as the Logo homework tested your understanding of the difference between output and print.

Future teachers should be especially careful about the difference between expressions and equations so that their students will recognize the distinction. Students who fail to distinguish between equations and expressions are prone to errors such as attempting to use cross multiplication to simplify a sum of fractions:

3/5 + 2/7 = 21/10?

An equation is a statment of equality describing a relationship between variables. For example: z = 3r + 5 or b = 7.

An expression describes a value and does not contain an equal sign. For example: 3r + 5, exp(5), or 7.

A function accepts a value as input and returns some other value. Maple has built-in functions and we will soon learn to define mathematical functions. Note that y = 2x + 3 is an equation, not a function. We write f(x) = 2x + 3 to describe the corresponding function.

To assign a value to a variable, use := not =. The value of a variable can be an expression, a function or an equation!

Other useful facts

Maple is case sensitive. Pi is not the same as pi. A is not the same as a. Evalf() is not the same as evalf(). Logo is not case sensitive.

When you re-open a saved Maple document, all the work you did still appears on the worksheet. However, Maple doesn't remember doing that work. When you return to work on a question it is a good idea to re-execute (hit enter after) previous work on the question.

When in doubt, use multiplication symbols to indicate multiplication. Maple doesn't understand (x-2)(x+2) but does understand (x-2) * (x+3).