basics.mws

Basics

This worksheet is called 'basics'.

Once you start Maple, you can use Help to get a lot of useful help.

SAVE YOUR WORK OFTEN! MAPLE OFTEN QUITS UNEXPECTEDLY!

Click on the + sign to open a section, on the - sign to close it.

Click on the first red command area and hit Enter to tell Maple to accept the command.

A Maple worksheet is much like a word processor in some ways. You can cut and paste, delete, move around with the arrow keys or the mouse, etc. The main difference is that if you type a math command after the Maple > prompt and hit either Return or Enter, it will execute the command. It is not enough for the command to appear on the screen. You must put the cursor on it and hit Enter for it to register.
Commands are in red, normal text is in black (hit the T button to switch to text mode).

Hit Shift-Return to get a new line without executing the statement.

Maple as a calculator

To make section headings like this, click Format, Indent. You might want to highlight some lines first.

> 3+4; Maple is like a calculator, except that it needs a semicolon to know where the statement ends.

7

> b:=15; := means 'is set equal to. So b is set equal to 15.

b := 15

> cos(Pi/3); # Maple can do this one exactly
Typing # at the end of a command line is another way of making a comment.
It's not as pretty, though. But when I first typed this, I didn't know how to get text!

1/2

> cos(1); But now this one, so it doesn't try.

cos(1)

> evalf(cos(1)); This forces Maple to approximate. Evaluate as a floating point number.

.5403023059

> cos(1.0); The decimal point forces Maple to approximate numerically.

.5403023059

Simple symbolic manipulation and display of output

> b:=7*A; Even though A is not yet defined, b is set equal to 7A.

b := 7*A

> (x-2)^5; Maple will simply repeat back what you typed, formatted nicely. The output can be pasted into Word or FrontPage. I believe that it will look better than the output of Word's equation editor. However, it will probably be harder to put it straight into a line of text where you want it.

(x-2)^5

> expand(%); Expand the last expression entered.

x^5-10*x^4+40*x^3-80*x^2+80*x-32

> factor(%); Factor the last expression.

(x-2)^5

> (x^2+5*x^8)/sqrt(4*x-2); Here is something more complicated. This is easier to use than Equation Editor, I think.

(x^2+5*x^8)/(sqrt(4*x-2))

Solving equations

> solve(2*x^2+5*x-4=0,x); Solve the equation exactly.

-5/4+1/4*sqrt(57), -5/4-1/4*sqrt(57)

> evalf(%); Evaluate the last expression numerically.

.637458609, -3.137458609

> solve(x^2+5*x+7=0,x); The solution has complex roots.

-5/2+1/2*I*sqrt(3), -5/2-1/2*I*sqrt(3)

> eq:=exp(x)-5=0; eq is set equal to an equation.

eq := exp(x)-5 = 0

> solve(eq,x); evalf(%); Solve eq for x exactly, then approximate. Notice that there are two commands on the same line.

ln(5)

1.609437912

> solve(sin(x)=0,x); Maple gives only one solution; of course, there are infinitely many.

0

> fsolve(sin(x)=0,x,2..8); Solve numerically over a certain range.

6.283185307

Plots

> plot(2*x^2+5*x-4,x=-4..1); Plot the function over the given x range.

[Maple Plot]

> plot(sin(x),x=0..2*Pi, thickness=3,color=black,labels=["X axis here","Y axis over here"]);

[Maple Plot]

>