{VERSION 4 0 "APPLE_PPC_MAC" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2 " -1 257 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 } 3 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "" 4 258 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 12 "MATH 243-015" }}{PARA 0 " " 0 "" {TEXT -1 32 "Analytic Geometry and Calculus C" }}{PARA 0 "" 0 " " {TEXT -1 19 "Prof. D. A. Edwards" }}{PARA 0 "" 0 "" {TEXT -1 14 "Cop yright 2001" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 133 "\nHere we are going to use some dot products and lengths, so we need to assume something abo ut t. Here it will be more convenient to " }{TEXT 0 6 "assume" } {TEXT -1 11 " that t is " }{TEXT 0 8 "positive" }{TEXT -1 19 ", rather than real." }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "restart;\nwith(plots):\nwith(linalg):\nassume(t,positive):" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 49 "Section 16.8: Cylindrical and Spherical Integrals" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 207 "A s in the two-dimensional case, Maple has no predefined commands for do ing cylindrical and spherical integrals. Therefore, we must make the \+ conversions ourselves. Suppose we want to integrate the function " } {XPPEDIT 18 0 "x^2+2*(y+3*z);" "6#,&*$%\"xG\"\"#\"\"\"*&F&F',&%\"yGF'* &\"\"$F'%\"zGF'F'F'F'" }{TEXT -1 82 " over the sphere of radius R. Fi rst we do the integral in Cartersian coordinates:" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 337 "fc3:=x^2+2*(y+3*z);\nacx3:=int(int(int(fc3,z=-sqrt (R^2-x^2-y^2)..sqrt(R^2-x^2-y^2)),y=-sqrt(R^2-x^2)..sqrt(R^2-x^2)),x=- R..R);\nacy3:=int(int(int(fc3,z=-sqrt(R^2-x^2-y^2)..sqrt(R^2-x^2-y^2)) ,x=-sqrt(R^2-y^2)..sqrt(R^2-y^2)),y=-R..R);\nacz3:=int(int(int(fc3,x=- sqrt(R^2-z^2-y^2)..sqrt(R^2-z^2-y^2)),y=-sqrt(R^2-z^2)..sqrt(R^2-z^2)) ,z=-R..R);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 181 "Here we get the answer, but it does take a while. \n\nNext we do the integral in cylindrical coordinates. First we conv ert fc3 into polar coordinates using the standard substitutions:" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "fp3:=eval(fc3,[x=r*cos(theta),y=r*s in(theta)]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 32 "For the ranges, w e see that now " }{XPPEDIT 18 0 "theta" "6#%&thetaG" }{TEXT -1 16 " go es from 0 to " }{XPPEDIT 18 0 "2*Pi" "6#*&\"\"#\"\"\"%#PiGF%" }{TEXT -1 44 " and r goes from 0 to R. Since z went from " }{XPPEDIT 18 0 "- sqrt(R^2-x^2-y^2)" "6#,$-%%sqrtG6#,(*$%\"RG\"\"#\"\"\"*$%\"xGF*!\"\"*$ %\"yGF*F.F." }{TEXT -1 4 " to " }{XPPEDIT 18 0 "sqrt(R^2-x^2-y^2)" "6# -%%sqrtG6#,(*$%\"RG\"\"#\"\"\"*$%\"xGF)!\"\"*$%\"yGF)F-" }{TEXT -1 57 ", we see that the new range (from the definition of r) is" }{XPPEDIT 18 0 " -sqrt(R^2-r^2" "6#,$-%%sqrtG6#,&*$%\"RG\"\"#\"\"\"*$%\"rGF*!\" \"F." }{TEXT -1 4 " to " }{XPPEDIT 18 0 "sqrt(R^2-r^2)" "6#-%%sqrtG6#, &*$%\"RG\"\"#\"\"\"*$%\"rGF)!\"\"" }{TEXT -1 132 ". Of course, this m eans we must do the z integration first. Also, we must make sure to a dd the extra r from the differential term:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "ap3:=int(int(int(fp3*r,z=-sqrt(R^2-r^2)..sqrt(R^2-r^2 )),r=0..R),theta=0..2*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 225 "Ag ain, we have a problem, basically since we have introduced complicated square roots once we do the first integration. Therefore, next we do the integral in spherical coordinates. First we make the necessary s ubstitutions:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "fs3:=eval(fc3,[x=r ho*cos(theta)*sin(phi),y=rho*sin(theta)*sin(phi),z=rho*cos(phi)]);" }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 108 "Now the ranges of integration ar e rather straightforward. We must remember to insert the proper expre ssion " }{XPPEDIT 18 0 "rho^2*sin(phi)" "6#*&%$rhoG\"\"#-%$sinG6#%$phi G\"\"\"" }{TEXT -1 23 " from the differential:" }{MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "as3:=int(int(int(fs3*rho^2*s in(phi),rho=0..R),phi=0..Pi),theta=0..2*Pi);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 162 "To make sure we have the right answer, we substitute R =4 into each expression. (It takes a while because Maple has to calcu late the integral in ap3 numerically.)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "evalf(eval([acx3,acy3,acz3,ap3,as3],R=4));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 257 "" 0 "" {TEXT -1 10 " \nExercise\n" }{MPLTEXT 1 0 0 "" }}}{PARA 0 "" 0 "" {TEXT -1 39 "As an exercise, integrate the function " }{XPPEDIT 18 0 "x*y*sin(y*z);" "6# *(%\"xG\"\"\"%\"yGF%-%$sinG6#*&F&F%%\"zGF%F%" }{TEXT -1 139 " over the right circular cylinder of radius 3 whose base is in the xy-plane, wh ose axis is the positive z-axis, and whose height is also 3." }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 120 "hca rt:=x*y*sin(y*z);\nhpol:=eval(hcart,[x=r*cos(theta),y=r*sin(theta)]); \nint(int(int(hpol,z=0..3),theta=0..2*Pi),r=0..3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 27 "Section 17.1: Vector Fields" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 120 "We define a vector field just as we did a vect or function of one variable. We begin with the following vector field g3:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "g3:=vector([y^3,x^2+exp(-y) ]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 43 "To plot a vector field, we use the command " }{TEXT 0 9 "fieldplot" }{TEXT -1 114 ". The first \+ argument is the vector field we wish to plot; the others are the range s of the independent variables:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "field1:=fieldplot(g3,x=-1..1,y=-1..1):\ndisplay(field1);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 77 "We can also plot vector fields in \+ 3-D. Consider the following vector field: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "g4:=vector([x^2+y,y^2-z,x-z]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 45 "To show the field in 3-D, we use the command " } {TEXT 0 11 "fieldplot3d" }{TEXT -1 30 ", whose syntax is the same as \+ " }{TEXT 0 9 "fieldplot" }{TEXT -1 1 ":" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 95 "field2:=fieldplot3d(g4,x=-2..2,y=-2 ..2,z=0..7):\ndisplay(field2,axes=normal,orientation=[8,70]);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 256 "" 0 "" {TEXT -1 28 "Section \+ 17.2: Line Integrals" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 42 "Suppose we want to integrate the function " }{XPPEDIT 18 0 "x^2+2*y" "6#,&*$%\"x G\"\"#\"\"\"*&F&F'%\"yGF'F'" }{TEXT -1 26 " along the curve given by \+ " }{TEXT 256 1 "r" }{TEXT -1 5 "(t)=(" }{XPPEDIT 18 0 "t^(1/2),(t+2/3) ^(3/2);" "6$)%\"tG*&\"\"\"F&\"\"#!\"\"),&F$F&*&F'F&\"\"$F(F&*&F,F&F'F( " }{TEXT -1 60 ") from t=1 to t=25. First we define the relevant func tions:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 48 "f1:=x^2+2*y;\nr:=vector([ t^(1/2),(t+2/3)^(3/2)]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "Next \+ we write f1 in terms of t and calculate the velocity vector " }{TEXT 257 1 "v" }{TEXT -1 4 "(t):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "fint :=eval(f1,[x=r[1],y=r[2]]);\nv:=map(diff,r,t);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "To get an idea of what we're doing, we plot the curv e " }{TEXT 258 1 "r" }{TEXT -1 35 "(t) in the xy-plane and the curve ( " }{TEXT 259 1 "r" }{TEXT -1 6 "(t),f(" }{TEXT 260 1 "r" }{TEXT -1 177 "(t))) in space. Thus, we are trying to find the area of the surf ace outlined below. You should know how to generate p1 and p2, though the generation of p3 we will cover later." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 265 "p1:=spacecurve([r[1],r[2],fint],t=1..25,color=black, thickness=3):\np2:=spacecurve([r[1],r[2],0],t=1..25,color=black,thickn ess=3):\np3:=plot3d([r[1],r[2],z],z=0..fint,t=1..25,style=patchcontour ):\ndisplay(p1,p2,p3,axes=normal,labels=['x','y','z'],orientation=[-45 ,64]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "To find the value of th e integral, we must first calculate the speed:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "sp:=simplify(norm(v,2));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "Then we multiply fint by sp and integrate from t=1 to t=2 5:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "int(fint*sp,t=1..25);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 65 "This answer is of little utility u nless we assign a number to it:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "e valf(%);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 72 "Now let's find the ce ntroid of a spring decribed by the curve given by (" }{XPPEDIT 18 0 "t ,t^2,t^3" "6%%\"tG*$F#\"\"#*$F#\"\"$" }{TEXT -1 43 ") from t=0 to t=5. A graph is shown below:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 112 "r2:=v ector([t,t^2,4*t^(3/2)/3]);\nspacecurve(r2,t=0..5,thickness=3,color=bl ack,axes=normal,orientation=[-22,43]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 113 "First we find the mass of the spring, using 1 for the de nsity. To do this, we just integrate the length of v(t):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "sp2:=simplify(norm(map(diff,r2,t),2 ));\nmas:=int(sp2,t=0..5);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 82 "The n we find each of the three moments by integrating x, y, and z times t he speed:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 83 "myz:=int(r2[1]*sp2,t=0 ..5);\nmxz:=int(r2[2]*sp2,t=0..5);\nmxy:=int(r2[3]*sp2,t=0..5);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 90 "To get the coordinates of the cent roid, we just divide the appropriate moment by the mass:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "cen:=evalm(vector([myz,mxz,mxy])/mas);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 101 "Let's calculate the line integral of the vector field g3 from the previous section about the ellipse " }{XPPEDIT 18 0 "x^2+4*y^2=1" "6#/,&*$%\"xG\"\"#\"\"\"*&\"\"%F(*$%\"yGF 'F(F(F(" }{TEXT -1 27 ", which is parametrized by " }{TEXT 261 1 "r" } {TEXT -1 33 "(t)=(cos(t),sin(t)/2) for t=0 to " }{XPPEDIT 18 0 "2*Pi" "6#*&\"\"#\"\"\"%#PiGF%" }{TEXT -1 1 ":" }{MPLTEXT 1 0 31 "\nr3:=vecto r([cos(t),sin(t)/2]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "Therefor e, we are looking at how the velocity field varies along this curve:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 84 "curve1:=plot([r3[1],r3[2],t=0..2* Pi],thickness=3,color=red):\ndisplay(field1,curve1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 159 "To calculate the circulation, we take the dot \+ product of the velocity and the vector field to find the integrand, an d then write this expression in terms of t:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "vel:=map(diff,r3,t);\ndotprod(g3,vel);\ninteg:=eval(% ,[x=r3[1],y=r3[2]]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 52 "Then we i ntegrate the expression from t=0 to t=2*Pi:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 27 "circ:=int(integ,t=0..2*Pi);" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 100 "We can also evaluate line integrals in 3-D. Consider \+ the following helix, where t ranges from 0 to " }{XPPEDIT 18 0 "2*Pi" "6#*&\"\"#\"\"\"%#PiGF%" }{TEXT -1 1 ":" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "r4:=vector([cos(t),sin(t),t]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 98 "We wish to calculate the line integral of the field g4 fr om the previous section along the helix: " }{MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 112 "curve2:=spacecurve(r4,t=0.. 2*Pi,thickness=3,color=black):\ndisplay(field2,curve2,axes=normal,orie ntation=[8,70]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 105 "The line int egral is again given by the integral of the dot product of the field a nd the velocity vector:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 108 "vel4:=m ap(diff,r4,t);\ndotprod(g4,vel4);\nint4:=eval(%,[x=r4[1],y=r4[2],z=r4[ 3]]);\nwork:=int(int4,t=0..2*Pi);\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 258 "" 0 "" {TEXT -1 9 "Exercises" } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "1. Integrate the function (numerically if necessary) " }{XPPEDIT 18 0 "cos(x)+y^2+ sin(z);" "6#,(-%$cosG6#%\"xG\"\"\"*$%\"yG\"\"#F(-%$sinG6#%\"zGF(" } {TEXT -1 54 " over the helix (cos(t),sin(t),t) for t between 0 and " } {XPPEDIT 18 0 "2*Pi" "6#*&\"\"#\"\"\"%#PiGF%" }{TEXT -1 1 "." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 191 "fun c:=cos(x)+y^2+sin(z);\nrfun:=vector([cos(t),sin(t),t]);\nfhel:=eval(fu nc,[x=rfun[1],y=rfun[2],z=rfun[3]]);\nvf:=map(diff,rfun,t);\nspf:=simp lify(norm(vf,2));\nint(fhel*spf,t=0..2*Pi);\nevalf(%);" }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 32 "2. Integ rate the vector field (" }{XPPEDIT 18 0 "x, y, sin(y*z)" "6%%\"xG%\"yG -%$sinG6#*&F$\"\"\"%\"zGF)" }{TEXT -1 42 ") over the helix in the prev ious exercise." }}}{SECT 1 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "We use the definitions from above. \n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 114 "pot:=vector([x,y,sin(y*z)]); \nint2:=eval(dotprod(pot,vf),[x=rfun[1],y=rfun[2],z=rfun[3]]);\nevalf( int(%,t=0..2*Pi));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{EXCHG {PARA 257 "" 0 " " {TEXT -1 1 "\n" }}}}{MARK "6" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }