MATH 261, Spring 2001 Due Date: Name(s): Project 17.2a: Line Integrals in the Plane Objective The objective of this project is to illustrate how line integrals in the plane can be computed using Maple. Narrative If you have not already done so, read Sections 17.2­17.4 of the text. Line integrals in the plane may be written in one of two forms. On one hand, if f : R2 R is continuous and r = r(t) = (x(t), y(t)), t [a, b], is a parametrization of the curve C in the plane then C f ds = b t=a f(r(t)) |r (t)| dt. On the other hand, if P and Q are any two functions that are continuous over C then C P dx + Q dy = b t=a P dx dt + Q dy dt dt. To see the connection between these forms, observe that if F = P, Q is a vector field in the plane and T = r (t)/|r (t)| denotes the unit tangent vector field to C, then on one hand, C F dr = b t=a F(r(t)) r (t) dt This is the definition of C F dr. = b t=a F(r(t)) r (t) |r (t)| |r (t)| dt = C F T ds Since ds = |r (t)| dt. = C f ds Where f = F T. On the other hand, b t=a F(r(t)) r (t) dt = b t=a P, Q dx dt , dy dt dt = b t=a P dx dt + Q dy dt dt = C P dx + Q dy. Tasks 1. Type the command lines below into Maple in the order in which they are listed; they illustrate how C f(x, y) ds, where f(x, y) = x2 + 3y2 and C is the curve parametrized by x = 2 cos t, y = 2 sin t, t [0, ], can be computed using Maple. > # Project 17.2a: Line Integrals in the Plane > # Task 1 > restart: with(plots): > f := (x,y) -> x^2+3*y^2; Here we define f(x, y). > r := vector([2*cos(t),2*sin(t)]); Here we define C. > plot([r[1],r[2],t=0..Pi],x=-2..2,y=0..2, Here is what C looks like. color=blue,scaling=constrained); > r1 := map(diff,r,t); Here we compute dr/dt. > integrand := subs({x=r[1],y=r[2]},f(x,y))*sqrt(r1[1]^2+r1[2]^2); Here is our integrand, ... > Int(f(x,y),s) = evalf(int(integrand,t=0..Pi)); and here is our integral. 2. Type the command lines below into Maple in the order in which they are listed; they illustrate how C F dr where C is the curve parametrized by x = 2 cos t, y = 2 sin t, t [0, 2], and F is the nonconservative field F(x, y) = x - y, x - 2 can be computed using Maple. > # Task 2 > restart: with(linalg): with(DEtools): with(plots): > F := vector([x-y,x-2]); Here we define f(x, y). > r := vector([2*cos(t),2*sin(t)]); Here we define C. > Field := dfieldplot([diff(x(t),t)=F[1],diff(y(t),t)=F[2]], [x(t),y(t)],t=0..4,x=-2..2,y=-2..2): > Curve := plot([r[1],r[2],t=0..2*Pi],x=-2..2,y=-2..2,color=blue): > display({Field,Curve}); Here we graph F and C. > dr := map(diff,r,t); Here we compute dr. > integrand := subs({x=r[1],y=r[2]},dotprod(F,dr)); Here is our integrand, ... > Int(F, r) = evalf(int(integrand,t=0..2*Pi)); and here is our integral. Note that F is not conservative and the line integral is not zero. Indeed, the integral is twice the area of the unit circle, in agreement with Green's Theorem. 3. Repeat Task 2 letting C be the curve parametrized by x = 2 cos t, y = 2 sin t, t [0, 2] and F be the conservative field F(x, y) = 2x, 6y = (x2 + 3y2 ). Observe that the line integral is (at least close to) zero, in agreement with The Fundamental Theorem for Line Integrals and Green's Theorem. Comments The difference between a line integral of a conservative field F over a curve C and a line integral of a non-conservative field F over C is that in the conservative case, the projection of F along the unit tangent vector to C at each point is always balanced by the projection of F along the unit tangent vector to C at other points, but in the non-conservative case this need not happen.