Background Information for Bonus Maple Assignment
After completing the first four assignments, this one should not be too difficult. You'll need to plot surfaces, find derivatives, solve systems of equations, and plot points in 3-D.
This page was created in Maple 10's Document Mode, and then exported to html. As a result, there are some strange line-break issues that I have not been able to fix, and the commands may not be cut-and-paste friendly.
Plotting Surfaces z=f(x,y).
By now you should be familiar with the plot3d command. If you wanted to plot, say,
,
then you could use:
![]()
![]()
Of course, you may want to add some optional features like axes, color, orientation, and so on:
![]()
If you want to plot a plane curve as a 3-D cylinder, you can use the implicitplot3d command. For example, to plot
as a 3-D surface, you could enter:
To plot surfaces together, use the display command. Store each plot to a variable, then display the set containing each plot-variable. For example:
![]()
![]()
![]()
![]()
![]()
For this assignment you should get a similar picture. You don't need to draw the blue curve, but the command used above should work for whatever f you're given. You will most likely need to play with the upper z-bound for the plane to avoid squashing your surface too much (scaling=constrained is a bad idea). The blue curve highlights the intersection of the two surfaces. It is along this line that you will be finding maxima and minima.
Derivatives
The diff command you learned in that Introduction to Maple will actually do partial derivatives. For example:
Adding extra letters at the end tells Maple to compute additional derivatives:
Solving Systems of Equations
Up until now, you have only used the solve and fsolve commands to find solutions to single equations, but Maple can do much more. For example to solve the system:
you would use the command:
Of course, some systems of equations have multiple solutions:
Sometimes solve will give you unhelpful answers:
That "RootOf" part means the roots of the equation
, that is,
. To get Maple to write these out explicitly, you'll need the "allvalues" command:
Of course you also have the option to use fsolve, but that will usually stop once it's found one solution and hence miss others:
For this assignment, you'll need to find all solutions to a system of equations involving nothing more complicated than polynomials, so the combination of "allvalues" and "solve" will do the job.
"How do you get lambda?," you might ask. Well, you can either just type in "lambda" as your variable or use a different letter, say L, to stand in for it.
Plotting Points in 3-D
You had to do this in the second Maple assignment. There you used plot3d to do it. Below is another way to do it with the "pointplot3d" command.
To point the point (3,0,2) for example, just enter
That's really hard to see, so you'll want to try dressing it up with extra options like the symbol, symbolsize, and color options. If you want to plot a couple of points, making the symbols diamonds, and making the symbols fairly large, you could use:
![]()
What is a good final plot?
Something like this:
Of course, you'll need to write the command to get the criticalPoints plot.