{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 "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 272 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 273 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 274 "" 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 275 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 276 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 277 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 278 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 279 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 280 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 281 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 } {CSTYLE "" 20 282 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" 20 283 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 284 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 285 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{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 "Heading 1 " -1 258 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 }} {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 170 "\nHere we are going to use some dot products and fields, so we need to define the proper pac kages. Again we assume that t is positive, and we'll also need to ass ume that " }{XPPEDIT 18 0 "theta" "6#%&thetaG" }{TEXT -1 13 " is posit ive:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "restart;\nwith(plot s):\nwith(linalg):\nassume(t,positive):\nassume(theta,positive):" }}} {SECT 1 {PARA 256 "" 0 "" {TEXT -1 34 "Section 17.3: Conservative Fiel ds " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 48 "Let's consider the followin g two vector fields, " }{TEXT 272 2 "f1" }{TEXT -1 5 " and " }{TEXT 273 2 "f2" }{TEXT -1 4 ". \n" }{MPLTEXT 1 0 180 "f1:=vector([x+3*y,y- 3*z,z^3]);\nf2:=vector([2*x*cos(x*y*z)-(x^2+y^2+z^2)*sin(x*y*z)*y*z, 2 *y*cos(x*y*z)-(x^2+y^2+z^2)*sin(x*y*z)*x*z, 2*z*cos(x*y*z)-(x^2+y^2+z^ 2)*sin(x*y*z)*x*y]);\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 210 "We wan t to see if they are conservative. To check this, one way is to see i f the integral from one point to another is path-independent. As a ty pical example, we will integrate from the point (1,0,0) to (1,0," } {XPPEDIT 18 0 "2*Pi" "6#*&\"\"#\"\"\"%#PiGF%" }{TEXT -1 139 ") in two \+ ways: along the black helix given by (cos(t),sin(t),t) and along the s traight blue line given by (1,0,t), for t ranging from 0 to " } {XPPEDIT 18 0 "2*Pi" "6#*&\"\"#\"\"\"%#PiGF%" }{TEXT -1 1 "." }{TEXT 274 0 "" }{TEXT -1 53 " We show the two fields along with the curves \+ below:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 303 "field1:=fieldplo t3d(f1,x=-2..2,y=-2..2,z=0..7,color=red,arrows=SLIM):\nhelix:=vector([ cos(t),sin(t),t]);\nlin:=vector([1,0,t]);\nhcurv:=spacecurve(helix,t=0 ..2*Pi,thickness=3,color=black):\nlcurv:=spacecurve(lin,t=0..2*Pi,thic kness=3,color=blue):\ndisplay(field1,hcurv,lcurv,axes=normal,orientati on=[58,43]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 132 "field2:=fi eldplot3d(f2,x=-2..2,y=-2..2,z=0..7,color=green,arrows=SLIM):\ndisplay (field2,hcurv,lcurv,axes=normal,orientation=[58,43]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 164 "Note how the second field has a sort of \+ symmetry that the first lacks. We begin by computing the velocity vec tors for both curves, then calculate the integrals of " }{TEXT 275 2 " f1" }{TEXT -1 27 ", first substituting for t:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 249 "vhel:=map(diff,helix,t);\nvlin:=map(diff,lin,t);\nf1 hel:=eval(evalm(f1),[x=helix[1],y=helix[2],z=helix[3]]);\nhelint1:=int (dotprod(f1hel,vhel),t=0..2*Pi);\nf1lin:=eval(evalm(f1),[x=lin[1],y=li n[2],z=lin[3]]);\nlinint1:=int(dotprod(f1lin,vlin),t=0..2*Pi);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "Since the values of the integrals \+ are " }{TEXT 276 3 "NOT" }{TEXT -1 23 " the same, we see that " } {TEXT 277 2 "f1" }{TEXT -1 4 " is " }{TEXT 278 3 "NOT" }{TEXT -1 29 " \+ conservative. Now we check " }{TEXT 279 2 "f2" }{TEXT -1 1 "." }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 211 "f2hel:=simplify(eval(evalm(f2),[x= helix[1],y=helix[2],z=helix[3]]));\nhelint2:=int(dotprod(f2hel,vhel),t =0..2*Pi);\nf2lin:=eval(evalm(f2),[x=lin[1],y=lin[2],z=lin[3]]);\nlini nt2:=int(dotprod(f2lin,vlin),t=0..2*Pi);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 55 "Since the values of the integrals are the same, we may " }{TEXT 280 7 "SUSPECT" }{TEXT -1 6 " that " }{TEXT 281 2 "f2" }{TEXT -1 234 " is conservative, but we can NOT be sure. (We may just have g otten lucky with our choice of paths.) So we can check if there is a \+ potential form, which is equivalent to seeing if the following three e quations have similar solutions:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "simplify(int(f2[1],x));\nsimplify(int(f2[2],y));\nsimplify(int(f2[3], z));" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 248 "In this case the answers are exactly the same, and so we have found the potential function. I n general this may not be the case, as Maple isn't too bright about ad ding on functions of other variables. Fortunately, there is a simple \+ solution: the " }{TEXT 0 9 "potential" }{TEXT -1 98 " command. The ar guments for it are the gradient field you wish to test, the variables \+ (in order) " }{TEXT 0 5 "[x,y]" }{TEXT -1 4 " or " }{TEXT 0 7 "[x,y,z] " }{TEXT -1 130 " (depending on how many variables are in the field), \+ and then a name in single quotes. If the field is not conservative, y ou get " }{TEXT 282 5 "false" }{TEXT -1 6 " back:" }}{PARA 0 "> " 0 " " {MPLTEXT 1 0 28 "potential(f1,[x,y,z],'phi');" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "However, if the function is conservative, you get " }{TEXT 283 4 "true" }{TEXT -1 76 " back AND the potential function wil l be stored under the name you gave the " }{TEXT 0 9 "potential" } {TEXT -1 9 " command:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "potential( f2,[x,y,z],'phi');\nphi;" }}}{EXCHG {PARA 0 "" 0 "" {XPPEDIT 18 0 "phi " "6#%$phiG" }{TEXT -1 129 " may look rather messy, but it is the same thing if we manipulate it a bit. (How we do that is beyond the scope of this course.)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "simplify(phi); " }}}{EXCHG {PARA 257 "" 0 "" {TEXT -1 10 "\nExercise\n" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "As an exercise, verify t hat the field " }{TEXT 284 2 "f3" }{TEXT -1 2 "=(" }{XPPEDIT 18 0 "cos (x),2*y;" "6$-%$cosG6#%\"xG*&\"\"#\"\"\"%\"yGF)" }{TEXT -1 85 ") is in deed conservative, and then check your result by showing that the inte gral of " }{TEXT 285 2 "f3" }{TEXT -1 43 " around the circle of radius 1 is indeed 0." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {SECT 1 {PARA 4 "" 0 "" {TEXT -1 8 "Solution" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 168 "f3:=vector([cos(x), 2*y]);\npotential(f3,[x,y],'p hi');\ncirc:=vector([cos(t),sin(t)]);\nv3:=map(diff,circ,t);\neval(dot prod(f3,v3),[x=circ[1],y=circ[2]]);\nint(%,t=0..2*Pi);" }}}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 258 "" 0 "" {TEXT -1 50 "Sections 17.4-17.5: Div, Curl, and Green's Theorem" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "Maple can easily calculate the div ergence of a field by using the " }{TEXT 0 7 "diverge" }{TEXT -1 127 " command. The first argument is the field; the second is the set of v ariables with respect to which you want to differentiate:" }{MPLTEXT 1 0 0 "" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "diverge(f1,[x,y,z]);\ndi verge(f2,[x,y,z]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "These two e xamples were 3-D examples, but we can calculate 2-D examples as well: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 50 "f4:=vector([x^2+y^3,-y+x]);\nd4 :=diverge(f4,[x,y]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 80 "The curl \+ is slightly more complicated. For 3-D functions, it is easy. Use the " }{TEXT 0 4 "curl" }{TEXT -1 37 " command, making the second argumen t " }{TEXT 0 7 "[x,y,z]" }{TEXT -1 2 ":\n" }{MPLTEXT 1 0 35 "curl(f1,[ x,y,z]);\ncurl(f2,[x,y,z]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 172 "N ote that as I mentioned in class, the curl of a 3-D function is a vect or. However, you run into trouble when you try to get Maple to calcul ate the curl of a 2-D function:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "curl(f4,[x,y]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 132 "To ge t Maple to calculate the curl of a 2-D function, you make it a 3-D fun citon with the third component zero, then work as before:" }}{PARA 0 " > " 0 "" {MPLTEXT 1 0 54 "f43d:=vector([f4[1],f4[2],0]);\nc4:=curl(f43 d,[x,y,z]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 150 "The first two com ponents are always zero, and the third component is the curl.\n\nLastl y, we wish to verify Green's Theorem by calculating both forms. " }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 232 "We do a case where the spatial in tegral is easier than the line integral. We now want to integrate the curl of the vector field over the square of side length 2 centered at the origin. Now the line integral consists of four sides:" } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "side1:= vector([-1,t-1]);\nside2:=vector([t-1,1]);\nside3:=vector([1,1-t]);\ns ide4:=vector([1-t,-1]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 135 "The v ectors are defined in this way so that going from t=0 to t=2 will alwa ys traverse the curve counterclockwise. Here's the picture:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 173 "field4a:=fieldplot(f4,x=-1.5..1.5,y=-1.5 ..1.5):\ns1:=plot(\{[-1,t-1,t=0..2],[t-1,1,t=0..2],[1,1-t,t=0..2],[1-t ,-1,t=0..2]\},color=red):\ndisplay(field4a,s1,scaling=constrained);" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "In this case, the curl integral \+ is easy:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "curlint4:=int(int(c4[3] ,x=-1..1),y=-1..1);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 230 "However, \+ the line integral must be done in four parts. First we must calculate the tangent vectors, as well as f4 on each of the curves. (There are ways to automate this process, but I don't have time to show you what they are.)" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 275 "t1:=map(diff,side1, t);\nt2:=map(diff,side2,t);\nt3:=map(diff,side3,t);\nt4:=map(diff,side 4,t);\nf41:=eval(evalm(f4),[x=side1[1],y=side1[2]]);\nf42:=eval(evalm( f4),[x=side2[1],y=side2[2]]);\nf43:=eval(evalm(f4),[x=side3[1],y=side3 [2]]);\nf44:=eval(evalm(f4),[x=side4[1],y=side4[2]]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 142 "Then we take the dot products and integr ate. Fortunately, the range for t is always 0 to 2, so we can cheat a bit by combining the integrals:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 133 "i4b1:=dotprod(t1,f41);\ni4b2:=dotprod(t2,f42);\ni4b3:=dotprod(t3, f43);\ni4b4:=dotprod(t4,f44);\ncircint:=int(i4b1+i4b2+i4b3+i4b4,t=0..2 );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 91 "Therefore, the answers chec k, as expected, but it's much easier to do the spatial integral." } {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 257 "" 0 "" {TEXT -1 10 "\nExercise \n" }{MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 45 "Verify G reen's Theorem by checking the field " }{XPPEDIT 18 0 "[1+x^2,3-y^2]" "6#7$,&\"\"\"F%*$%\"xG\"\"#F%,&\"\"$F%*$%\"yGF(!\"\"" }{TEXT -1 30 " o ver the circle of radius 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 285 "f5:=vector([1+x^2,3-y^2]);\nf53d:= vector([f5[1],f5[2],0]);\ncirc:=vector([cos(t),sin(t)]);\nf5t:=eval(ev alm(f5),[x=circ[1],y=circ[2]]);\ntv5:=map(diff,circ,t);\nc5:=curl(f53d ,[x,y,z])[3];\ncurlint5:=int(int(c5,y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1. .1);\ncircint5:=int(dotprod(f5t,tv5),t=0..2*Pi);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}}{MARK "4" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }