Whitman MATH 235 - Maple Commands

Unformatted text preview:

Maple Commands for Chapter 14 (Stewart)1 Graph the functionGraph z = f(x, y). In this example, z =√9 − x2− y2f:=(x,y)->sqrt(9-x^2-y^2);plot3d(f(x,y),x=-3..3,y=-3..3);Compare that with the following:z:=sqrt(9-x^2-y^2);plot3d(z,x=-3..3,y=-3..3);Exercise: Plot z = sin(xy), for x ∈ [−10, 10] and y ∈ [−10, 10]. Change thecolor scheme to “Z Hue”, and increase the number of points used to plot.Note that when you click your mouse on the graph, you can spin it around.You can also change how the axes look, put on a legend, change the coloring,etc. Experiment with the menu options (with the black box around thefigure- otherwise, you get the regular menu options).2 Plot the level curvesPlot the level curves (also called contours) of the function z = f(x, y). TheMaple command is contourplotwith(plots):z:=(x+y)/(sin(y)+2);contourplot(z,x=-3..3,y=-3..3);Now change the number of points used and see if the graph changes. We canalso tell Maple which contourplots to graph. In this example, compare theplot of f(x, y) = sin2(x) +14y2with its contours at 1/10, 1/2, 1, 3. Plot thedefault contours in three dimensions.g:=(sin(x))^2+(1/4)*y^2;plot3d(g,x=-5..5,y=-2..2);contourplot(g,x=-5..5,y=-2..2,contours=[1/10,1/2,1,3]);contourplot3d(g,x=-5..5,y=-2..2);13 Multiple Limits.EXAMPLE: Does lim(x,y)→(0,0)x2− y2x2+ y2exist?limit( (x^2-y^2)/(x^2+y^2), {x=0, y=0} );Note: If Maple cannot determine the value of the limit, the limit expres-sion will be returned unevaluated. For example,limit((sin(x^2)-sin(y^2))/(x-y), {x=0,y=0});EXAMPLE: Use a graph of the function to determine if the following limitexists (try a contourplot, too).lim(x,y)→(0,0)2x2+ 3xy + 4y23x2+ 5y2f:=(x,y)->(2*x^2+3*x*y+4*y^2)/(3*x^2+5*y^2);plot3d(f(x,y),x=-1..1,y=-1..1);4 Partial Derivatives:4.1 Example:If f(x, y, z) = xexyln(z), compute all first partial derivatives and all secondpartials involving x and z.restart;f:=x*exp(x*y)*ln(z);fx:=diff(f,x);fy:=diff(f,y);fz:=diff(f,z);fxz:=diff(fx,z);fzx:=diff(fz,x);fyz:=diff(fy,z);and so on.24.2 Using the Definition:Use the definition to compute fx(x, y, z), iff(x, y, z) =qx2+ y2+ z2f:=(x,y,z)->sqrt(x^2+y^2+z^2);DiffQuot:=(f(x+h,y,z)-f(x,y,z))/h;fx=limit(DiffQuot,h=0);5 Tangent PlanesFind the expression for the tangent plane, and plot the plane together withthe function.EXAMPLE: If f(x, y) = xexy, plot z = f(x, y) together with the tangentplane to f at x = 1, y = 1.First, rewrite the equation of the tangent plane:z = z0+ fx(x0, y0)(x − x0) + fy(x0, y0)(y − y0)Using Maple:f:=(x,y)->x*exp(x*y);fx:=diff(f(x,y),x);fy:=diff(f(x,y),y);fx1:=subs({x=1,y=1},fx);fy1:=subs({x=1,y=1},fy);P:=f(1,1)+fx1*(x-1)+fy1*(y-1);plot3d({f(x,y),P},x=-1..3,y=-1..3,view=0..5,axes=’boxed’);6 The Chain Rule(See Section 14.5, Example 5, p. 935 of Stewart’s Calc)If u = x4y + y2z3, and x = rset, y = rs2e−t, and z = r2s sin(t), find thevalue of∂u∂swhen r = 2, s = 1, t = 0.In Maple:3x:=r*s*exp(t);y:=r*s^2*exp(-t);z:=r^2*s*sin(t);u:=x^4*y+y^2*z^3;h:=diff(u,s);h1:=subs({r=2,s=1,t=0},h);evalf(h1);7 Implicit Differentiation:If F (x, y) = 0, thendydx=−FxFyEXAMPLE: Find y0if x3+ y3= 6xy.In Maple:F:=x^3+y^3-6*x*y;dydx:=diff(F,x)/diff(F,y);8 The GradientCompute the Gradient, ∇f = [fx, fy, fz]In Maple, if f(x, y, z) = 3x2+ 2yz, then the gradient is:with(linalg):grad(3*x^2+2*y*z, vector([x,y,z]));9 Contours and GradientsPlot the contours of f(x, y) = x2− y2, together with some gradient vectors(See Section 14.6, Figure 13, pg.


View Full Document

Whitman MATH 235 - Maple Commands

Documents in this Course
Load more
Download Maple Commands
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Maple Commands and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Maple Commands 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?