Line Integral
over a curve in the plane
This worksheet investigates the line integral of the function
over the curve described by x(t) = sin(t) and y(t) = 2cos(t) with t between 0 and 6.
Here is a picture of the curve.
> | curve:=spacecurve([sin(t),2*cos(t),0,t=0..6],color=blue,thickness=3,scaling=CONSTRAINED): |
> | Plane:=plot3d(0,x=-1.2..1.2,y=-2.2..2.2,view=0..3,axes=boxed,orientation=[-130,60],scaling=CONSTRAINED): |
> | with(plots):display(curve,Plane); |
Here is a picture of the curve along with line segments perpendicular to the plane of the curve with lengths representing the value of f(x,y) at the corresponding point on the curve.
> | B1:=spacecurve([sin(0),2*cos(0),(2+sin(1/3))*t,t=0..1],color=blue,thickness=3): |
> | B2:=spacecurve([sin(0.2),2*cos(0.2),(2+sin((1+sin(0.2)*2*cos(0.2))/3))*t,t=0..1],color=blue,thickness=3): |
> | B3:=spacecurve([sin(0.4),2*cos(0.4),(2+sin((1+sin(0.4)*2*cos(0.4))/3))*t,t=0..1],color=blue,thickness=3): |
> | B4:=spacecurve([sin(0.6),2*cos(0.6),(2+sin((1+sin(0.6)*2*cos(0.6))/3))*t,t=0..1],color=blue,thickness=3): |
> | B5:=spacecurve([sin(0.8),2*cos(0.8),(2+sin((1+sin(0.8)*2*cos(0.8))/3))*t,t=0..1],color=blue,thickness=3): |
> | B6:=spacecurve([sin(1),2*cos(1),(2+sin((1+sin(1)*2*cos(1))/3))*t,t=0..1],color=blue,thickness=3): |
> | B7:=spacecurve([sin(1.2),2*cos(1.2),(2+sin((1+sin(1.2)*2*cos(1.2))/3))*t,t=0..1],color=blue,thickness=3): |
> | B8:=spacecurve([sin(1.4),2*cos(1.4),(2+sin((1+sin(1.4)*2*cos(1.4))/3))*t,t=0..1],color=blue,thickness=3): |
> | B9:=spacecurve([sin(1.6),2*cos(1.6),(2+sin((1+sin(1.6)*2*cos(1.6))/3))*t,t=0..1],color=blue,thickness=3): |
> | B10:=spacecurve([sin(1.8),2*cos(1.8),(2+sin((1+sin(1.8)*2*cos(1.8))/3))*t,t=0..1],color=blue,thickness=3): |
> | B11:=spacecurve([sin(2),2*cos(2),(2+sin((1+sin(2)*2*cos(2))/3))*t,t=0..1],color=blue,thickness=3): |
> | B12:=spacecurve([sin(2.2),2*cos(2.2),(2+sin((1+sin(2.2)*2*cos(2.2))/3))*t,t=0..1],color=blue,thickness=3): |
> | B13:=spacecurve([sin(2.4),2*cos(2.4),(2+sin((1+sin(2.4)*2*cos(2.4))/3))*t,t=0..1],color=blue,thickness=3): |
> | B14:=spacecurve([sin(2.6),2*cos(2.6),(2+sin((1+sin(2.6)*2*cos(2.6))/3))*t,t=0..1],color=blue,thickness=3): |
> | B15:=spacecurve([sin(2.8),2*cos(2.8),(2+sin((1+sin(2.8)*2*cos(2.8))/3))*t,t=0..1],color=blue,thickness=3): |
> | B16:=spacecurve([sin(3),2*cos(3),(2+sin((1+sin(3)*2*cos(3))/3))*t,t=0..1],color=blue,thickness=3): |
> | B17:=spacecurve([sin(3.2),2*cos(3.2),(2+sin((1+sin(3.2)*2*cos(3.2))/3))*t,t=0..1],color=blue,thickness=3): |
> | B18:=spacecurve([sin(3.4),2*cos(3.4),(2+sin((1+sin(3.4)*2*cos(3.4))/3))*t,t=0..1],color=blue,thickness=3): |
> | B20:=spacecurve([sin(3.6),2*cos(3.6),(2+sin((1+sin(3.6)*2*cos(3.6))/3))*t,t=0..1],color=blue,thickness=3): |
> | B21:=spacecurve([sin(3.8),2*cos(3.8),(2+sin((1+sin(3.8)*2*cos(3.8))/3))*t,t=0..1],color=blue,thickness=3): |
> | B22:=spacecurve([sin(4),2*cos(4),(2+sin((1+sin(4)*2*cos(4))/3))*t,t=0..1],color=blue,thickness=3): |
> | B23:=spacecurve([sin(4.2),2*cos(4.2),(2+sin((1+sin(4.2)*2*cos(4.2))/3))*t,t=0..1],color=blue,thickness=3): |
> | B24:=spacecurve([sin(4.4),2*cos(4.4),(2+sin((1+sin(4.4)*2*cos(4.4))/3))*t,t=0..1],color=blue,thickness=3): |
> | B25:=spacecurve([sin(4.6),2*cos(4.6),(2+sin((1+sin(4.6)*2*cos(4.6))/3))*t,t=0..1],color=blue,thickness=3): |
> | B26:=spacecurve([sin(4.8),2*cos(4.8),(2+sin((1+sin(4.8)*2*cos(4.8))/3))*t,t=0..1],color=blue,thickness=3): |
> | B27:=spacecurve([sin(5),2*cos(5),(2+sin((1+sin(5)*2*cos(5))/3))*t,t=0..1],color=blue,thickness=3): |
> | B28:=spacecurve([sin(5.2),2*cos(5.2),(2+sin((1+sin(5.2)*2*cos(5.2))/3))*t,t=0..1],color=blue,thickness=3): |
> | B29:=spacecurve([sin(5.4),2*cos(5.4),(2+sin((1+sin(5.4)*2*cos(5.4))/3))*t,t=0..1],color=blue,thickness=3): |
> | B30:=spacecurve([sin(5.6),2*cos(5.6),(2+sin((1+sin(5.6)*2*cos(5.6))/3))*t,t=0..1],color=blue,thickness=3): |
> | B31:=spacecurve([sin(5.8),2*cos(5.8),(2+sin((1+sin(5.8)*2*cos(5.8))/3))*t,t=0..1],color=blue,thickness=3): |
> | B32:=spacecurve([sin(6),2*cos(6),(2+sin((1+sin(6)*2*cos(6))/3))*t,t=0..1],color=blue,thickness=3): |
> | B33:=spacecurve([sin(t),2*cos(t),2+sin((1+sin(t)*2*cos(t))/3),t=0..6],color=blue,thickness=3): |
B33 would be the curve along the "top" of the vertical line segments.
> | display(curve,Plane,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B20,B21,B22,B23,B24,B25,B26,B27,B28,B29,B30,B31,B32,B33); |
> |
Here we are computing the line integral using an iterated integral.
> | Int((2+sin((1+sin(2*t))/3))*sqrt((cos(t))^2+4*(sin(t))^2),t=0..6); |
> | evalf(%); |
Here we are approximating the line integral using 30 straight line segments approximating 30 pieces of the curve and evaluating the function at the endpoint of each of the 30 approximating line segments. The length of each line segment is multiplied by the function value at the end of the line segment. These products are summed to approximate the line integral.
> | Tval:=0: |
> | LineInt:=0: |
> | for i from 1 to 30 do Tval:=Tval+0.2; LineInt:=LineInt+(2+sin((1+sin(Tval)*2*cos(Tval))/3))*sqrt((sin(Tval)-sin(Tval-0.2))^2+(2*cos(Tval)-2*cos(Tval-0.2))^2); end do: |
> | LineInt; |
Here we are approximating the line integral using 60 straight line segments approximating 60 pieces of the curve and evaluating the function at the endpoint of each of the 60 approximating line segments. The length of each line segment is multiplied by the function value at the end of the line segment. These products are summed to approximate the line integral.
> | Tval:=0: |
> | LineInt:=0: |
> | for i from 1 to 60 do Tval:=Tval+0.1; LineInt:=LineInt+(2+sin((1+sin(Tval)*2*cos(Tval))/3))*sqrt((sin(Tval)-sin(Tval-0.1))^2+(2*cos(Tval)-2*cos(Tval-0.1))^2); end do: |
> | LineInt; |
Here we are approximating the line integral using 120 straight line segments approximating 120 pieces of the curve and evaluating the function at the endpoint of each of the 120 approximating line segments. The length of each line segment is multiplied by the function value at the end of the line segment. These products are summed to approximate the line integral.
> | Tval:=0: |
> | LineInt:=0: |
> | for i from 1 to 120 do Tval:=Tval+0.05; LineInt:=LineInt+(2+sin((1+sin(Tval)*2*cos(Tval))/3))*sqrt((sin(Tval)-sin(Tval-0.05))^2+(2*cos(Tval)-2*cos(Tval-0.05))^2); end do: |
> | LineInt; |
Here we are approximating the line integral using 600 straight line segments approximating 600 pieces of the curve and evaluating the function at the endpoint of each of the 600 approximating line segments. The length of each line segment is multiplied by the function value at the end of the line segment. These products are summed to approximate the line integral.
> | Tval:=0: |
> | LineInt:=0: |
> | for i from 1 to 600 do Tval:=Tval+0.01; LineInt:=LineInt+(2+sin((1+sin(Tval)*2*cos(Tval))/3))*sqrt((sin(Tval)-sin(Tval-0.01))^2+(2*cos(Tval)-2*cos(Tval-0.01))^2); end do: |
> | LineInt; |
> |
One interpretation for this line integral would be the lateral surface area of the figure indicated above.
Here we are approximating the line integral using 30 incremental distances approximating 30 pieces of the curve and evaluating the function at the endpoint of each of the 30 pieces of the curve. The length of each incremental distance is multiplied by the function value at the end of the corresponding piece of the curve. These products are summed to approximate the line integral. This is more accurate.
> | Tval:=0: |
> | LineInt:=0: |
> | for i from 1 to 30 do Tval:=Tval+0.2; LineInt:=LineInt+(2+sin((1+sin(Tval)*2*cos(Tval))/3))*sqrt((cos(Tval))^2+(2*sin(Tval))^2)*0.2; end do: |
> | LineInt; |
Here we are approximating the line integral using 600 incremental distances approximating 600 pieces of the curve and evaluating the function at the endpoint of each of the 600 pieces of the curve. The length of each incremental distance is multiplied by the function value at the end of the corresponding piece of the curve. These products are summed to approximate the line integral. This is more accurate.
> | Tval:=0: |
> | LineInt:=0: |
> | for i from 1 to 600 do Tval:=Tval+0.01; LineInt:=LineInt+(2+sin((1+sin(Tval)*2*cos(Tval))/3))*sqrt((cos(Tval))^2+(2*sin(Tval))^2)*0.01; end do: |
> | LineInt; |
> |
Here we are approximating the line integral using 30 incremental distances approximating 30 pieces of the curve and evaluating the function at the midpoint of each of the 30 pieces of the curve. The length of each incremental distance is multiplied by the function value at the midpoint of the corresponding piece of the curve. These products are summed to approximate the line integral.
> | Tval:=0: |
> | LineInt:=0: |
> | for i from 1 to 30 do Tval:=Tval+0.2; LineInt:=LineInt+(2+sin((1+sin(Tval-0.1)*2*cos(Tval-0.1))/3))*sqrt((cos(Tval-0.1))^2+(2*sin(Tval-0.1))^2)*0.2; end do: |
> | LineInt; |
Here we are approximating the line integral using 600 incremental distances approximating 600 pieces of the curve and evaluating the function at the midpoint of each of the 600 pieces of the curve. The length of each incremental distance is multiplied by the function value at the midpoint of the corresponding piece of the curve. These products are summed to approximate the line integral. This is even more accurate.
> | Tval:=0: |
> | LineInt:=0: |
> | for i from 1 to 600 do Tval:=Tval+0.01; LineInt:=LineInt+(2+sin((1+sin(Tval-0.005)*2*cos(Tval-0.005))/3))*sqrt((cos(Tval-0.005))^2+(2*sin(Tval-0.005))^2)*0.01; end do: |
> | LineInt; |
> |