Maple Lab 0 (Spring 2007 Math 251 Sections 05-07)
Background Worksheet.
Remember that even though this lab will not count towards your final grade, you must turn it in!
It's a good idea to start every sheet with the restart command. Maple remembers everything that
you do, so the restart command gives you a fresh start without having to shutdown and restart
the program itself!
| > |
A Quick Note for Typing in Maple:
To create new text groups such as this use the button labeled "T" above. To create a new execution group
(the lines with maple commands which start with ">") you can use the button labeled "[>" or the keyboard
shortcut "Ctrl+J". To insert a group before the cursor use "Ctrl+K".
To delete a line of input or Maple output you can use the keyboard shortcut "Ctrl+Delete". To begin
another line in an execution group use "Shift+Enter". Remember that "Enter" alone will just execute
the command you've typed.
Sometimes the commands we want to use are built into Maple. Other times we must load up a
special package of commands to get the job done. To add commands we use the command
"with(...);"
| > |
Warning, the name changecoords has been redefined
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
To find out what all of these commands do we can ask Maple using "?".
| > |
| > |
This sphere is kind of rough. We can use the help to find a plot option to smooth it out.
It looks like numpoints is a good way to go.
| > |
Let's play with vectors. We will include the vector calculus package and use rectangular (cartesian) coordinates.
| > |
Warning, the assigned names `<,>` and `<|>` now have a global binding
Warning, these protected names have been redefined and unprotected: `*`, `+`, `-`, `.`, D, Vector, diff, int, limit, series
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Let's define two vectors. Call them "a" and "b".
| > |
We compute the "dot product" using a period between these two vectors.
| > |
You can compute the "cross product" of these two vectors using "&x". Let's call this cross product "c".
| > |
Now let's plot the vectors a and b and their cross product c along with the parallelogram spanned by the vectors a and b.
Recall that the area of this parallelogram is equal to the length of cross product vector.
| > |
Let's create a vector length function. Recall that ":=" assigns the expression to the right to the name on the left.
Also, "x -> y" means that "x" maps to "y".
| > |
| > |
You can see it is not hard to create your own functions.
Actually in this case it is unnecessary. We can just use the "Norm" function to compute lengths.
| > |
Let's plot part of a line. First, let's define a vector function which describes our line and then use the plot command.
Our line will pass through the point (1,2,3) and be parallel to the vector <4,5,6>.
Notice that last time we defined a function it spit out a bunch of junk we really didn't want to see. So this time
we'll end our function definition with a colon ":" instead of a semi-colon ";". This will suppress the output.
| > |
| > |
Notice all of the options I've added to the "spacecurve" command. What do they do?
Now let plot the plane whose normal vector is <4,5,6> and which passes through the point (1,2,3).
This plane's equation is "4(x-1)+5(y-2)+6(z-3)=0"
| > |
There are a number of different ways to do this. Let's check out a few.
First, solve for z and use plot3d. The "solve" command will help us out.
| > |
| > |
Or we could use implicit plot and leave the equation in its original form.
| > |
Or we can "parametrize" the plane by letting x = s, y = t, and z = -4/6(s-1)-5/6(t-2)+3.
| > |
| > |
Let's say we want to plot several things together. For this, we use the "display3d" command.
| > |