A small intro to Maple
Here's a list of topics you can find on this page:
Starting Maple
-
Unless you have your own copy of Maple, you must use the computers in
the
AMCL (SC 175).
- There is a difference between Maple 11 and Classic Maple
11. Despite the Maple 11 icon that appears on all my documents, I
almost always use Classic Maple.
- Don't double-click on any documents I've created, or the
non-classic version of Maple 11 will open. Instead, open Classic
Maple 11, then open a file -- either one of mine or one of yours --
from within the program.
For first time users of Maple
-
There is a very nice tutorial you can access once you've opened Maple.
Pull down the "Help" menu on the right-hand side of the window, and
click
on "New User's Tour."
-
Sections 1-6 of the tour will be useful to almost everyone.
-
Multivariable students should also look at section 7.
-
Differential equations students should also look at section 8.
- Linear algebra students should look at sections 7 and 9.
Using "Help" in Maple
-
If you know what you want help on, you can type "?whatever" to find out
about "whatever." Do this within your Maple worksheet.
-
From the "Help" menu, there are a couple of things you can do.
-
"Topic Search" will allow you to type in the topic you're interested in.
-
"Introduction" and "Using Help" will allow you to search the help
database
by directories and subdirectories. This is especially useful if you're
not quite sure what you're looking for.
-
Maple commands should end with a ";" or a ":". The semi-colon will tell
the computer to perform the command and show the result. The colon will
let the computer perform the command in the background.
-
To name a function, plot, derivative, etc. type "whatever:=the
command."
For example, "parabola:=plot(x^2,x=-3..3):" will name the graph of
y=x^2
"parabola" and will not show the picture (because of the colon at the
end).
- In order to use the linear algebra packages, you first need to
input: with(linalg);
- To enter a 2x3 matrix called A, type either:
- A:=matrix([[1,2,3],[4,5,6]]);
- A:=matrix(2,3,[1,2,3,4,5,6]);
- A vector can be input as either:
- matrix(5,1,[a,b,c,d,e]);
- vector(5,[a,b,c,d,e]);
- To multiply two matrices type: evalm(A&*B); you can use
exponents: evalm(A^23&*B);
- To find the echelon form of A, type: gausselim(A);
- To find the reduced echelon form of A, type: rref(A);
- Maple will do back-substitution for you too.
- First, go back to
the ``gausselim(A);'' line and insert ``B:='' so the final product
should be: B:=gausselim(A);
- Now you can do back-substitution on B by typing:
backsub(B);
- The Maple output should be [-11,10], meaning that x_1=-11
and x_2=10.
- You can use backsub on any reduced matrix. Thus,
you can use it after doing gausselim or rref.
- Given a matrix A, the Maple command to find the eigenvalues of
A
is eigenvals(A);
- To find eigenvectors for A, type eigenvects(A):
You'll see output of the form
- [.531,1,{[.45,.23,1.67]}] or
- [-3,2,{[1,0,2],[3,2,0]}]
- In each case, the first number is the eigenvalue, the
second
number is the multiplicity of the eigenvalue, and the third set of
numbers gives the basis for the eigenspace corresponding to the
eigenvalue.
- The characteristic polynomial for a square matrix A is:
- You can find eigenvalues by solving the characteristic
equation.
Do this by hand or:
- solve(charpoly(A,x)=0,x);
- Suppose you have an eigenvalue from the step above, call it a.
To find the corresponding eigenspace you must find Nul(A-a*I). Do this
by hand, or follow
these steps:
- B:=evalm(A-a*array(identity, 1..n,1..n));
Note that you must
put in the number a (which is an eigenvalue), and you must replace n
by a number (if A is a 3x3 matrix, then n=3).
- Now row reduce B by typing
- Finally, determine the basis of the null space.
- The general plot command is:
plot3d(x^2+3*y^2,x=-5..5,y=-5..5);
- For easy rotation, add "axes=boxed" to the command line.
- The general command is:
contourplot(x^2+3*y^2,x=-5..5,y=-5..5);
- To shade so that black is low and white is high, add the lines:
coloring=[black,white], filled=true
- To make sure you see contours at specific values of z, add the
line: contours=[1,2,3,4]
Disclaimer