{VERSION 5 0 "IBM INTEL NT" "5.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 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 14 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 "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helv etica" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 14 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 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 256 6 "FLUX " }} {PARA 0 "" 0 "" {TEXT 257 34 "by Shannon Mayer & Corinne Manogue" }} {PARA 0 "" 0 "" {TEXT -1 30 "Copyright 1997 Corinne Manogue" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 155 "In this worksh eet, you will examine the flux of the electric field due to a point ch arge through a cube, with sides of length 2L, centered at the origin. \+ " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "restart:with(linalg):with(plots):\nsetoptions3d(scali ng=constrained,axes=boxed):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 19 "SE T-UP THE PROBLEM\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 50 "Define the \+ dimensions of the square box to be L=1:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 5 "L:=1;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 51 "Define the unit vectors in rectangular coordinates:" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "ihat:=[1,0,0];jhat:=[0,1,0] ;khat:=[0,0,1];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 106 "Initially, define the location of the point charge \+ to be at the origin of a rectangular coordinate system:" }}{PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 15 "Point:=[0,0,0];" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "a:=Point[1];b:=Point[2];c:=Point[3];" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 44 "Find the electric field of the point char ge:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "r:=sqrt((x-a)^2+(y-b)^2+(z-c )^2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "Efield:=(q/(4*Pi*e psilon))*grad(-1/r,[x,y,z]);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 91 "P lot the three dimensional vector field. For plotting purposes, choose the charge so that " }{XPPEDIT 18 0 "q/(4*Pi*epsilon)=1" "6#/*&%\"qG \"\"\"*(\"\"%F&%#PiGF&%(epsilonGF&!\"\"F&" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 35 "Esubs:=subs(q=4*Pi*epsilon,Efield);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 94 "fieldplot3d(Esubs,x=-L..L,y=-L..L,z =-L..L,\ngrid=[6,6,6],shading=none,arrows=SLIM,thickness=2);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 40 "CALCULATE THE FLUX THROUGH ONE SUR FACE (" }{XPPEDIT 18 0 "(z=L)" "6#/%\"zG%\"LG" }{TEXT -1 3 ").\n" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "E1:=subs(z=L,[Esubs[1],Esubs[2],Esu bs[3]]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "Integrand1:=dot prod(E1,khat);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "Examine the int egrand. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "plot3d(Integrand1,x=-L ..L,y=-L..L,axes=framed);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 52 "Perf orm the integration. Put back in the factor of " }{XPPEDIT 18 0 "q/(4 *Pi*epsilon" "6#*&%\"qG\"\"\"*(\"\"%F%%#PiGF%%(epsilonGF%!\"\"" } {TEXT -1 2 ". " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "q/(4*Pi*epsilon)* Int(Int(Integrand1,x=-L..L),y=-L..L);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "int(int(q/(4*Pi*epsilon)*Integrand1,x=-L..L),\ny=-L.. L);" }}{PARA 0 "" 0 "" {TEXT -1 98 "The Maple command \"Int leaves the integral in unevaluated form, while\"int\" evaluates the integral." } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 " CALCULATE THE TOTAL FLUX (summed over all six sides of the cube).\n" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 534 "Total:=simplify(q/(4*Pi*epsilon) \n*(int(int(dotprod(subs(x=L,\n[Esubs[1],Esubs[2],Esubs[3]]),ihat),\ny =-L..L),z=-L..L)\n+int(int(dotprod(subs(x=-L,\n[Esubs[1],Esubs[2],Esub s[3]]),-ihat),\ny=-L..L),z=-L..L)\n+int(int(dotprod(subs(y=L,\n[Esubs[ 1],Esubs[2],Esubs[3]]),jhat),\nx=-L..L),z=-L..L)\n+int(int(dotprod(sub s(y=-L,\n[Esubs[1],Esubs[2],Esubs[3]]),-jhat),\nx=-L..L),z=-L..L)\n+in t(int(dotprod(subs(z=L,\n[Esubs[1],Esubs[2],Esubs[3]]),khat),\nx=-L..L ),y=-L..L)\n+int(int(dotprod(subs(z=-L,\n[Esubs[1],Esubs[2],Esubs[3]]) ,-khat),\nx=-L..L),y=-L..L)));" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "0 0 1" 0 }{VIEWOPTS 1 1 0 3 2 1804 1 1 1 1 } {PAGENUMBERS 0 1 2 33 1 1 }