Está en la página 1de 2

Maple Project for Calculus III, L. Foster Due Dec.

3 This purpose of this project is to expose you to some of the features of a mathematical software program such as Maple (Mathematica and Mathcad are similar packages). Maple can be a useful tool in solving many problems in calculus. You will gain experience with drawing surfaces and paths in three space as well as doing multiple integrals and solving systems of equations such as those that come from Lagrange multipliers. For drawing surfaces and paths you will need to refer to my handouts USING MAPLE TO DRAW GRAPHS and Using Maple to plot the surface f(x,y) = 2 x3 + x y2 + 5 x2 + y2. I will give example of multiple integrals and solving system of equations below Maple is available in MH221 (to use it you need to have enrolled in Math110L or pay $$ (perhaps around $30) and get a password from the secretaries in MH308). Some years Maplesoft, the producers of Maple, had trial versions available at http://www.maplesoft.com/trial.shtml but it looks like these are not available this year. However you might search around for trial copies. If you do not have an account for accessing the computers in MH 221 and can not find a trial version you will need to find a partner who does have an account in MH221. The project can be done in teams of two students (turning in one solution with both student names). Note that to run Maple on a computer where Maple is installed you should click on the Maple icon (which looks like a Maple leaf) if there is one or select the maple program from Start / Programs / Maple. The project will be due on Wednesday, Dec. 3. In the problems below please do NOT turn in your entire Maple sessions. The material that I would like turned in is indicated in bold, below. 1. The surface f(x,y) = x y (1 x y) has a local maximum at (1/3, 1/3) and saddle points at (0,0), (1,0) and (0,1). Use plot3d to clearly show the maximum and the three saddle points. The maximum can be hard to see. In the plot3d function you should carefully select the x and y limits and the view limits to adjust the scales so that the local maximum is easy to see. You will probably need to use trial and error with a number of different limit choices. I believe that it is easier to identify locations if you use axes=NORMAL not axes=BOX as was illustrated in the Using Maple to plot the surface f(x,y) = 2 x 3 + x y2 + 5 x2 + y2 handout. Turn in a printout of your best plot. You can print a graph by printing your entire Maple work session. Another way to print the plot is to copy and paste it into word, wordpad or similar application before printing them. To put a graph in the clipboard left click on the plot and select copy. Note that to plot this surface you dont need clever parametrizations like those illustrated in Using Maple to Draw Graphs. A simpler parametrization using x and y, like the one in Using Maple to plot the surface f(x,y) = 2 x3 + x y2 + 5 x2 + y2, suffices. The hard part is choosing the x and y limits and view limits. Draw a contour plot of the same function that clearly shows the saddle points and the local maximum. You will need to carefully select the x and y limits and the number of contours to show these features. For example the command contourplot([x,y,z],-2.5..1,-2.5..1,contours=100) in the Using Maple to plot the surface f(x,y) = 2 x3 + x y2 + 5 x2 + y2. handout does not provide adequate detail. It may take a minute or two to run the contourplot command if the number of contours is large. Turn in a printout of your best contour plot. Use the spacecurve command to plot the path given in parametric form by x = (2+ cos (1.5*t)) * cos (t) + 0.2 * cos (100*t) , y = (2 + cos (1.5*t)) * sin (t) + 0.2 * sin (100*t) and z = sin (1.5*t). (Here I am using syntax similar to what you will want to use in Maple - for example * is used for multiplication). Make the range of t values large enough so that the resulting curve is a closed curve so that it curve loops back on itself and starts repeating. The limits t=-5..5 used in the "USING MAPLE TO DRAW GRAPHS" handout will not have a large enough t range. Turn a printout of a graph with the perspective that best shows the curve. Note that in Maple one can change the perspective by clicking on a graph and moving the mouse. Use the spacecurve command to plot the path of any (vector valued) function that is of interest to you and is not similar to the curve in question 3 or in the "USING MAPLE TO DRAW GRAPHS" handout. You could choose an example or exercise out of the book or one that you invent yourself. Turn in a printout of your graph. Also label your graph with the function that you graphed. You can let Maple label the graph as is illustrated in the "USING MAPLE TO DRAW GRAPHS" handout or, if you wish, you can label it by hand. To find the minimum of a function of several variables requires solving a system of equations that comes from setting partial derivatives to zero or from using Lagrange multipliers. (Lagrange multipliers are in Section 14.8, which we skipped. You can review the section if you want but you dont need to know the details of Lagrange multipliers to solve the computer problem below.) It can often be tedious to solve such systems of equations by hand. In some cases you can use Maple to solve these equations. For example for the problem minimize (x + y) 2 + z2 subject to the constraints x2 + y2 + z = 1 Lagrange multipliers lead to the system:

2.

3.

4.

5.

2(x+y)=2x, 2(x+y)=2y, 2 z = , and x2 + y2 + z = 1 These can be solved in Maple with the command
solve( {2*(x+y)=2*lam*x, 2*(x+y)=2*lam*y, 2*z=lam, x^2+y^2+z = 1 }, { x,y,z,lam } );

Maple's response is (also see the box below for the actual Maple session):
{z = 0, x = -RootOf( 2 _Z2 - 1), y=RootOf( 2 _Z2 - 1), lam=0}, {z=1, x=0, y=0, lam= 2}

Here RootOf( 2 _Z2 - 1) means the roots of this quadratic equation or 1 / 2 and -RootOf( 2 _Z 2 - 1) means to choose a root of this equation with the opposite signs of the choice in RootOf( 2 _Z 2 - 1). Therefore there are three solutions: (a) z = 0, x = - 1 / 2 , y = + 1 / 2 with lam =0 , (b) z = 0, x = + 1 / 2 , y = - 1 / 2 with lam = 0 and (c) z =1, x = 0, y = 0 with lam = 2. Suppose that the constrained optimization problem is to find the extreme values of f(x, y) = 2 x2 + 3 y2 - 4 x - 5 subject to the constraint g(x,y) = x2 + y2 = 16. The Lagrange multiplier equations are : 4 x - 4 = 2 x, 6 y = 2 y, and x2 + y2 = 16. Use Maple to solve these equations. Note that you will need to insert * ' s in your equations where multiplication is needed. Turn in a printout of your problem statement in Maple and Maple's response. These will be similar to the two example Maple lines listed above. Do not turn in lots of unrelated Maple lines from your work session. You can delete any irrelevant lines from your work session or you can cut and paste selected lines into another application such as word Translate the Maple solutions into normal mathematical notation and write the answers by hand. 6. It is tedious to do multiple integrals by hand.
1 z y

Maple can often do them easily. For example consider the triple

integral

xyz dx dy dz . In Maple one can type


0 0 0

int(int(int(x*y*z,x=0..y),y=0..z),z=0..1); and Maple responds 1/48. Do the triple integral

yz dy dz dx using Maple.
0 0 0

9 x 2 x

Turn in a printout of your Maple input and Maple's

response. Again just turn in these lines. Note that in Maple 7.


1 1 x
2

9 x 2 is written sqrt(9 x^2).

(There is still a place for people). Occasionally Maple is not as smart as you are. For example consider
x2 + y2

e
0 0

d y d x . In Maple one would type in

int( int( exp(x^2 + y^2 ), y = 0 .. sqrt(1-x^2)),x=0..1); Try this out in Maple. Turn in a printout of your Maple input and Maple's response. Again just turn in these lines. Now solve the integral by hand by changing the integral from xy coordinates to polar coordinates. Turn in your answer and the work for your hand solution. Is your answer nicer than Maples?

También podría gustarte