Professional Documents
Culture Documents
Vecfunc12 23
Vecfunc12 23
Vecfunc12 23
L=
b
2
df dg dh
+
dt
+
dt dt dt
a
b
dx dy dz
+ + dt
dt dt dt
a
b
= v( t ) dt.
s( t ) =
t
2
dx dy dz
+
d =
+
v dt.
d d d
t
0
Example:
Consider the space curve: r(t) = (6 sin( t ))i + (6 cos( t ))j + 5 tk, 0 t,t 4 .
> restart:r:=t->[6*cos(t),6*sin(t),5*t];
with(plots):
curve:=spacecurve(r(t),t=0..4*Pi,color=red,axes=boxed):
r := t [ 6 cos( t ), 6 sin( t ), 5 t ]
Warning, the name changecoords has been redefined
We can measure the arc length of this curve as t varies from 0 to 4 . We will
approximate the length with line segments first, and then compute it exactly
This second sequence of points allows us to show each of the line segments
connecting the above sequence of points as a line segment parallel to the
xy-plane and a segment orthogonal to it.
> Pts2:=seq(op(
evalf(
[[r(t*Pi/(n/4))[1],r(t*Pi/(n/4))[2],r((t-1)*Pi/(n/4))[3]],r(t
*Pi/(n/4))])
),t=0..n):
Pts3:=seq(op(
evalf(
[[r(t*Pi/(n/4))[1],r(t*Pi/(n/4))[2],r((t)*Pi/(n/4))[3]],
[r(t*Pi/(n/4))[1]+subs(s=t*Pi/(n/4),diff(r(s)[1],s))*4*Pi/n,
r(t*Pi/(n/4))[2]+subs(s=t*Pi/(n/4),diff(r(s)[2],s))*4*Pi/n,
r(t*Pi/(n/4))[3]+subs(s=t*Pi/(n/4),diff(r(s)[3],s))*4*Pi/n]]
)),t=0..n):
To see the line segments, we display them using PLOT3D, and display which
are in the plots package. Inserting "dots" in the display command will also
show the points. The formula for distance is part of the student package.
Recall that an integral is just the limit of a sum. We take more and more
summands, but decrease the distance between the points where the function is
evaluated. In the do loop, we divide the integral into n pieces. totdist is our
approximation of the integral which gives the arc length.
> with(plots):
dots:=PLOT3D(POINTS(Pts),COLOR(HUE,0.95),
AXESSTYLE(FRAME),VIEW(-6..6,-6..6,0..64)):
dots2:=PLOT3D(POINTS(Pts2),COLOR(HUE,0.95),
AXESSTYLE(FRAME),VIEW(-6..6,-6..6,0..64)):
dots3:=PLOT3D(POINTS(Pts3),COLOR(HUE,0.95),
AXESSTYLE(FRAME),VIEW(-6..6,-6..6,0..64)):
segments3:=PLOT3D(CURVES([Pts3[5],Pts3[6]]),COLOR(HUE,4.0),AX
ESSTYLE(BOX)):
segments:=PLOT3D(CURVES([Pts]),COLOR(HUE,0.6),AXESSTYLE(BOX))
:
segments2:=PLOT3D(CURVES([Pts2]),COLOR(HUE,0.1),AXESSTYLE(BOX
)):
>
display(segments,dots2,segments2,curve,segments3);
with(student):
totdist:=0;
totdist2:=0:
for i from 1 to n do
totdist:=totdist+distance(Pts[i],Pts[i+1]):
totdist2:=totdist2+evalf(sqrt((subs(s=i*Pi/(n/4),diff(r(s)[1]
,s))*4*Pi/n)^2+(subs(s=i*Pi/(n/4),diff(r(s)[2],s))*4*Pi/n)^2+
(subs(s=i*Pi/(n/4),diff(r(s)[3],s))*4*Pi/n)^2)):
od:
totdist;totdist2;
totdist := 0
94.46120580
98.14649201
The exact arc length is the integral of the norm of the velocity vector.
>
int(linalg[norm](diff(r(t),t),2),t=0..4*Pi);
61
A closer estimate can be obtained by increasing the size of n, that is, by dividing
the integral into more parts.
Exercises:
1. Let r(t)=(cos( t ) + t sin( t ))i + (sin( t ) t cos( t ))j + (6 6 t)k. Graph and
approximate the length of this curve from t=0 to 4 . Find the length of this
curve using the arc length formula. To view the graph, you will need to
change the view option to VIEW(-10..10,-10..10,-60..0).
>
2. Let r(t)=(et cos( t ))i + (et sin( t ))j + (et)k. Graph this curve from t=ln( 4 ) to
0. Find the length of this curve using the arc length formula.
>
Definition [Unit tangent vector] The unit tangent vector of a smooth curve r(t) is
dr dr dt
v
.
=
=
T=
v
ds dt ds