ࡱ> %'$7 \bjbjUU 67|7|(3l ,4 m#lX&]$}"""""""$$ &h#@]#&'#,R(& ")  " &L `ܦc  )\  =#0m# a(a(   Line Integrals and Conservative Vector Fields copyright 2000 by Paul Green and Jonathan Rosenberg In this notebook, we will evaluate integrals of the form  EMBED Equation.3  where C is a curve directed by a choice of forward unit tangent vector T, and F is a vector field defined in a vicinity of C. The key observation is that if r(t) parametrizes C in such a way that the forward direction corresponds to increasing t, then we have the identity  EMBED Equation.3 , so that the integral takes the form  EMBED Equation.3 , where t0 and t1 are the initial and terminal values of the parameter t. It is important to understand that the parametrization r(t) and the vector field F are independent of one another except for the requirement that the composition F(r(t)) must make sense for all relevant values of t. Note also that all of this makes equally good sense in the plane, where F and r each have two components, and in 3-space, where each has three components. syms x y z t Example 1: Let us integrate the vector field F=[y^2,sqrt(4-z^2),x] along the twisted cubic parametrized and directed by tcube=[t,t^2,t^3] for t between 0 and 1. We must express F in terms of the parameter: Fpar=subs(F,[x,y,z],tcube) Now we set integrand=realdot(Fpar,diff(tcube,t)) This integral cannot be evaluated symbolically, so we evaluate it numerically in two different ways. integral=double(int(integrand,t,0,1)) alternate=quad8(inline(vectorize(integrand)),0,1) Problem 1: Integrate the vector field G=[2*y,-3*x] around the unit circle in the xy-plane, directed counterclockwise. Example 2: We proceed now to illustrate the fundamental theorem of line integrals, which states that if F is the gradient of a function f, and C is a directed curve originating at A and terminating at B, then  EMBED Equation.3 . Let us set f=x*y +cos(y*z)+exp(x*z) H=jacobian(f,[x,y,z]) and evaluate  EMBED Equation.3  along the twisted cubic in two different ways. Hpar=subs(H,[x,y,z],tcube) integrand=realdot(Hpar,diff(tcube,t)) ans1=int(integrand,t,0,1) A=subs(tcube,t,0) B=subs(tcube,t,1) ans2=subs(f,[x,y,z],B)-subs(f,[x,y,z],A) double(ans1-ans2) The difference here can be attributed to round-off error. Problem 2: Evaluate  EMBED Equation.3  two different ways as in Example 2, where g=sqrt(5+x^2+2*y^2+3*z^2) and C is the directed line segment from [1,3,4] to [0,-3,8]. In connection with the fundmental theorem of line integrals, it is of interest to be able to recognize when a vector field is a gradient and recover a function of which it is a gradient. A vector field is called conservative (the term has nothing to do with politics, but comes from the notion of "conservation laws" in physics) if its line integral over every closed curve is 0, or equivalently, if it is the gradient of a function. We recall that the curl of a gradient is always 0, and that a vector field whose curl is 0 is, at least locally, a gradient. Example 3: As an example, we consider the vector field F3=[ 2*x*(9+y^2-4*z^2)/(-9+x^2+y^2+z^2)^2, -2*y*(-18+x^2+5*z^2)/(-9+x^2+y^2+z^2)^2, 2*z*(-27+4*x^2+5*y^2)/(-9+x^2+y^2+z^2)^2] simplify(curl(F3,[x,y,z])) We see that the curl of F3 is 0, and that F3 is defined everywhere except on the sphere  EMBED Equation.3 . Given any point pt inside the sphere, we can integrate F3 along the directed line segment from a reference point (in this case, the origin 0) to the given point, and that should recover a function whose gradient is F3. Let us try it. pt=[x,y,z] seg=t*pt F3par=subs(F3,pt,seg) integrand=realdot(F3par,diff(seg,t)) f3=int(integrand,t,0,1) simplify(jacobian(f3,[x,y,z])-F3) Problem 3: Show that there is a function, defined for positive x, y, and z, whose gradient is G3, as defined in the following cell. Find such a function and check your answer. Because G3 is not defined at the origin, you will need to change your reference point to some point with positive coordinates such as [1,1,1]. How will this affect the analogue of seg in Example 3? G3=[ 2/x, -2/(y^2+z^2)*y, -2/(y^2+z^2)*z] Caution: Sometimes integrating along rays is not the best way to find a function whose gradient is a given conservative vector field. The problem is that sometimes the line integral will be too complicated to evaluate, while one can still find the function by "integrating one variable at a time". Example 4: As an example, we consider the vector field F4 =[-2*sin(x^2*y)*x*y*exp(-z)+3/(1+z^4), -sin(x^2*y)*x^2*exp(-z)-2*y/(1+z^4), -cos(x^2*y)/exp(z)+4*y^2/(1+z^4)^2*z^3-12*x/(1+z^4)^2*z^3] This vector field is conservative, since it is everywhere defined and simplify(curl(F4,[x,y,z])) However, integrating F4 along rays starting from the origin is not the best way to find a function f of which F4 is the gradient. Instead, we try to solve the equations (f/(x = F4(1), (f/(y = F4(2), (f/(z = F4(3), one at a time. Since the y-dependence is the simplest, it's easiest to begin with the middle equation and let f1=int(F4(2),y) Then if we take simplify(F4-jacobian(f1,[x,y,z])) we're reduced to a much simpler vector field, and if f2=int(ans(1),x) then simplify(F4-jacobian(f1+f2,[x,y,z])) shows F4 is the gradient of: f=simple(f1+f2) Additional Problems: Let F be as in Example 1. Evaluate  EMBED Equation.3  along the directed line segment from [0,0,0] to [1,1,1]. Do you expect the same answer as in Example 1? What does this have to do with curl(F) ? Find a function whose gradient is H2, defined below. Check your answer. H2=[ 4*x/(1+2*x^2+3*y^2+z^4), 6*y/(1+2*x^2+3*y^2+z^4), 4*z^3/(1+2*x^2+3*y^2+z^4)] Evaluate  EMBED Equation.3  both directly and using the results of Additional Problem 2, where C is the elliptical spiral parametrized below, and t runs from 0 to 2(. spiral=[ 2*cos(t),3*sin(t),2*t]  EMBED Equation.3   EMBED Equation.3  -de13STUVef#$&*+,bc     ΔΔH* jEHU"j < CJPJUVmHnHu jFEHU"j" < CJPJUVmHnHu5\566] jEHU"j| < CJPJUVmHnHu jUjUmHnHuCJ :.d345jk   $a$$a$([ <?1k}     ' ( / 0 C D E F U " & @ D » j EHU"j7< CJPJUVmHnHu j7EHU"j,6< CJPJUVmHnHu jU 5OJQJ0J56D     ] ^ i T U n $ % & & B C D V h < X Y Z      < V _ ` my|}*,QSTXptRT֝֝֝֗֗ OJQJ\56OJQJ jWEHU"jJ>< CJPJUVmHnHujUmHnHu5\6]60J 5OJQJ jU j EHU-jS:< 5CJOJPJQJUVmHnHu;/VWXrstHIJKLxy>LTFLT<LMOPTV[\^_cejkmnrt -ev~#$%&Wbcvwxy6 jEHU"jBE< CJPJUVmHnHu jEHU"j| < CJPJUVmHnHu jU5 j5\0J OJQJ\ 5OJQJD /0exy~Y'(@AYZ & F & F%()<=>?ABUVWX\ƿ jEHU"j7>< CJPJUVmHnHu j<EHU"j < CJPJUVmHnHu jU0J jp6Z[\/ =!"#$%`!sYvF7fBa.K݊yFmE@i n7#RpeqIj.Cִv.F}l@9O`܀FDdlB  S A? 21/.s(>]5i`!1/.s(>]5`4 Rx}RKP&6,ZDġ8)ꠓvYV_[|Ppp .?A\][YxaK~w\js Vb(2h gJYEjL2Z'`")2}Flw$Αmc|Iqm -ASm.k3EP_Wk~Xi3xx [}phV2~'{m07H/?G6Gk9):Qw)>3GN03LM6-sU4!|;~}@ͱjRtfDd@lB  S A? 2ƒWd" _IPi`!ƒWd" _IP pxS+DQ>x ,ĂPJ(eG  y5RfR_b1+;% k%%s}#3ܺ{}+@&[Q)#ts̍qԭRqE v/B1e-M'@p}7*=鵺Dd B  S A? 2=mSgВaQ{i`!=mSgВaQ`xcdd``> @c112BYL%bL0Yn&~! KA?HZ 깡jx|K2B* R&]1 @001d++&1ܮy[~!};  P.P56zU5|n.TR<bD? ^G=< ~/ ;Q'6.ĺ .q#][1Lp.L s+ss˺4ɿY{06o oP{e/'4a"~Pf!pCޭ z)LiWv321)W2;]ggb ` rYH1vG14V1 b(fdbR ,.Ie(geI`gbL 06KPDdtB  S A? 2J_z͌e^oֿFK v`!J_z͌e^oֿF  \xRJP=%ik""MA@pbZ!pp.;vM..Qks_=$ Q'@`X* "A(F$(hU-%(<"nCY*9qM @Wxm]@zгw?BDEFGHIJKLMNOPQRSTUVWRoot Entry7 Fؑc(Data WordDocument66ObjectPool9 ezcؑc_1017055612,F|ccOle CompObjfObjInfo !$'*-038<=>?@ABCEFGHIK FMicrosoft Equation 3.0 DS Equation Equation.39q5<L/ F"Tds C +" FMicrosoft Equation 3.0 DS EqEquation Native Q_1017056034 Fc becOle CompObj fuation Equation.39qBVĖ Tds=drdtdt FMicrosoft Equation 3.0 DS Equation Equation.39qObjInfo Equation Native  ^_1017056220F becѷcOle  CompObj fObjInfoEquation Native _1017132588Fѷc.c<$V F(r(t))"drdtdt t 0 t 1 +" FMicrosoft Equation 3.0 DS Equation Equation.39qbL/ F"TdsOle CompObjfObjInfoEquation Native ~ C +" =f(B)"f(A) FMicrosoft Equation 3.0 DS Equation Equation.39q5L/ H"Tds C +"_1017132933F.ccOle CompObjfObjInfoEquation Native Q_1017133651"F@c`ycOle CompObj f FMicrosoft Equation 3.0 DS Equation Equation.39q9L/ "g"Tds C +" FMicrosoft Equation 3.0 DS Equation Equation.39qObjInfo!"Equation Native #U_10171346661'$F c`VucOle %CompObj#%&fObjInfo&(Equation Native )k_1017136450)Fc@$cO@Yԗ x 2 +y 2 +z 2 =9 FMicrosoft Equation 3.0 DS Equation Equation.39q9L/ H2"TdOle +CompObj(*,fObjInfo+.Equation Native /Us C +" FMicrosoft Equation 3.0 DS Equation Equation.39q<L/  FMicrosoft Equation 3.0 DS Eq_1017055937.F-c@cOle 1CompObj-/2fObjInfo04Equation Native 5#_10171346473F vccOle 6CompObj247fuation Equation.39q=L/ Oh+'0 ,@ `l    The MATLAB Notebook v1.5.2"Template for The MATLAB Notebook osDapartment of MathematicObjInfo59Equation Native :#1TableCa(SummaryInformation(8;nnvF0 *_&I9 @w+^0+ 3A2n.` fP'į@J.hlrcи1 N#LLJ% YA`l0`wFDdB  S A? 2N*Xہ! *v`!N*Xہ! * ~ Rxcdd``bd``baV d,FYzP1C&,7\ A?d-@e깡jx|K2B* R&]_c&,`babMa`0` T6_H_30p1Usi#,&O2ϑK<a#7ZCU3$ 27$37X/\!(?71ɝ5w+Z{1K\{𹷖5)Ũ>sYvF7fBa.K݊yFmE@i n7#RpeqIj.Cִv.F}l@9O`܀VDdB  S A? 2x9*jYz%*v`!x9*jYz% @0= bxcdd``ncd``baV d,FYzP1C&,7\ A?d-sC0&dT20L7Ӂ`0LY \k巁BrPHqe190~yX1ps0dqj Q! ~ Ay HNPs2ýW{g&="ޙ1䲐bRb,מw\w8sAS 8EPI)$5kZ<;C#|6'f~yd]DdT<   C A? 2@> Heading 2x5CJOJQJkHJJ Heading 3$$<@&a$5CJOJQJ<A@< Default Paragraph Font"O" NoGraphB*0O0 Input5B* CJOJQJkH0O0 OutputB*CJOJQJkH0O!0 Error5B*CJOJQJkH6O16 AutoInit5B* CJOJQJkH.OA. Calc<B*CJOJQJkH2\25\6.d345jk ]^iTUn$%&BCDVh< X Y Z   /VWXrstHIJKLxy>L /0exy~Y']00000000000000000000000000000000000000000000^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @0@0@00@0@0000000y0y0y0y0y0y0y0y0y0y0y0y0y0y0y0y0y0y0y0y00 0 00 000  T\ & Z\[/CE     #%bvx\:::::::::-/5::/X$i2$ B 9@LQ[^}$)hklo(].7SU '5:kp UVpy&*FKX]hl< = Z ]  $/8XZt|"MN 05egy}~ (]3333333333333333333333333333333333333333333333333Dapartment of Mathematics(C:\TEMP\AutoRecovery save of lineint.asdDapartment of Mathematics(C:\TEMP\AutoRecovery save of lineint.asdDapartment of Mathematics(C:\TEMP\AutoRecovery save of lineint.asdDapartment of MathematicsD:\mat241\lineint.docDapartment of Mathematics0\\TTCLASS\USERS\class\math241\common\LINEINT.DOCDapartment of Mathematics0\\TTCLASS\USERS\class\math241\common\LINEINT.DOCValued Gateway Client+C:\My Documents\Matlab\homework\lineint.docValued Gateway ClientKC:\WINDOWS\Application Data\Microsoft\Word\AutoRecovery save of lineint.asdValued Gateway ClientKC:\WINDOWS\Application Data\Microsoft\Word\AutoRecovery save of lineint.asdJonathan M. Rosenberg#E:\class\math241\common\lineint.docC@Phh^h`o(.C@  @'] AskedForShutdown|jInputCellCount[MATLABFig16Color(MATLABFigEmbed@MATLABFigHeightMATLABFigUnits`MATLABFigWidth$ MATLABFmtMATLABFmtStyleMATLABStopOnError\ShowCellMarkers4ShowRecalcMarkersno33YESYES3.5Inches4ShortLooseYES11@::d+88::\p@UnknownG:Times New Roman5Symbol3& :ArialAMath1Symbol3@MS Minch-3 fg?5 :Courier New"CV hcDfEFY (!V20drm2V6C:\Program Files\Microsoft Office\Templates\m-book.dotThe MATLAB Notebook v1.5.2!Template for The MATLAB Notebook Dapartment of MathematicsJonathan M. Rosenberg