MA332 Maple notes, Fall 1998 The assignment statement in Maple is := I don't know what, if anything, = means. x := 6; Creates a variable named x, assigns it the value 6. All statements in Maple end with ; (if you want output) or : (if you want the statement executed silently). Some variable names are protected (like names of math functions, for example). Digits is a protected variable that controls the number of digits of precision when Maple does SOFTWARE floating point. Digits := 40; // sets the precision to 40 digits By default, Maple does symbolic evaluation of expressions. x := (x + 6/x) / 2; yields 7/2, and abs_error := x - sqrt(6); yields 7/2 - sqrt(6) (although Maple formats that nicely). In order to evaluate these expressions in floating point, you have to use the evalf command: x := evalf((x + 6/x) / 2); abs_error := evalf(x - sqrt(6)); These lines do what you expect, printing the result in all its 40-digit splendor. You might also want to try: rel_error := evalf (abs_error / sqrt(6)); digits := -log (rel_error); For the last command, it turns out that we don't need the evalf, although it is not clear why (perhaps log and the other math functions automatically use FP arithmetic if the argument is a FP value). To execute a statement again, you can move the cursor to the line you want to execute and press enter. Thus, once you have typed in the lines I suggested, you can execute the repeatedly to get successive estimates. Plotting: To get the help page for the plot command, type ?plot Then try the following: plot (tan(x)-x, x=3.2..4.6); You can define functions as follows: f:=x->tan(x)-x; And then plot them: plot (f(x), x=3.2..4.6); You can also plot more than one function on the same axes by providing a list of functions: plot ({tan(x), x}, x=3.2..4.6);