L26-parametricArcLength.mws
Calculus II
Lesson 26: Parametric Arc Length
In this worksheet, we will use the process of integration to compute the lengths of plane parametric curves. The same approach will find the lengths of 3-dimensional curves, but we will not consider that extension. Suppose we are given a parametric curve, described by equations
,
, t in
.
>
f := t-> t^2 ; g := t-> t^3 - 3*t ;
>
plot([f(t), g(t), t=-2..2]);
We partition the parameter interval
into
equal subintervals with endpoints
,
, ... ,
, and draw the piecewise-linear curve composed of line segments joining the corresponding points on our original curve. It turns out that, with some care, we can do this with the same procedure
pl
that we used earlier to compute arclengths of graphs: we just have to apply
pl
to
and
separately.
>
pl := proc(f,a,b,n)
>
local u,v,k;
>
k := 1 + floor(n*(x-a)/(b-a));
>
u := a + (k-1)*(b-a)/n;
>
v := a + k*(b-a)/n;
>
unapply(f(u) + (f(v) - f(u))/(v-u)*(x-u), x);
>
end proc:
>
plf := pl(f,-2,2,6):
>
plg := pl(g,-2,2,6):
>
plot({[f(t),g(t),t=-2..2], [plf(t),plg(t),t=-2..2]}, thickness=2);
(We suppressed the output when
and
were defined; it is not very interesting.)
It is easy to compute the length of the piecewise-linear curve. A typical segment joins the points
(
,
) and (
,
), so its length can be computed from the distance formula.
Adding these lengths---one for each subinterval---gives the formula
.
The following procedure computes this formula, given the functions
and
, the parameter interval
, and the number of subintervals.
>
approxlen := proc(f,g,a,b,n)
local l;
l := (b-a)/n;
sum( sqrt( (f(a+j*l) - f(a+(j-1)*l))^2
+ (g(a+j*l) - g(a+(j-1)*l))^2 ), j=1..n);
end proc:
As always,
Maple
will evaluate the answer exactly, including square roots, so it is convenient to ask for a decimal approximation.
>
evalf(approxlen(f,g,-2,2,5));
>
evalf(approxlen(f,g,-2,2,10));
>
evalf(approxlen(f,g,-2,2,20));
>
evalf(approxlen(f,g,-2,2,50));
>
evalf(approxlen(f,g,-2,2,100));
We see a familiar pattern: as the number of subintervals increases, the lengths of the piecewise-linear approximations approach a fixed value, which is obviously the true length of the original curve.
>
Question 1
Use piecewise-linear approximations to find the length of the loop of the curve above, accurate to within 0.01. (Hint: what are the two values of
at the self-intersection point?)
Solution.
The curve crosses the
-axis when
and again when
, both times when
.
The length of the curve between these two values of
can be approximated using
approxlen
:
>
evalf(approxlen(f,g,-sqrt(3),sqrt(3),5));
>
evalf(approxlen(f,g,-sqrt(3),sqrt(3),10));
>
evalf(approxlen(f,g,-sqrt(3),sqrt(3),50));
>
evalf(approxlen(f,g,-sqrt(3),sqrt(3),100));
Although we should probably try a larger number of subintervals to be sure that the second decimal place will remain stable, we can probably assume that the length is 10.73, accurate to within 0.01.
>
>
Question 2
Plot the polar curve
. By writing it as a parametric curve, find the length of the portion of the curve between
and
.
Solution.
As a polar curve, our curve has equations
,
.
>
f1 := theta-> theta*cos(theta) ;
>
>
g1 := theta-> theta*sin(theta) ;
>
>
plot([f1(theta), g1(theta), theta=0..2*Pi]);
>
evalf(approxlen(f1,g1,0,2*Pi,50));
>
evalf(approxlen(f1,g1,0,2*Pi,100));
>
evalf(approxlen(f1,g1,0,2*Pi,500));
The length of the curve appears to be approximately 21.25.
>
With the power of
Maple
, the numerical procedure
approxlen
is all we need to find arclengths as accurately as we want. Very often a numerical procedure of this type is the only practical way of finding arclength, but it is possible to write down an integral which gives the exact length of the curve. (In practice, the integral will have to be evaluated numerically for most curves of interest.) As explained in class, an argument with the Mean Value Theorem leads to the integral
.
The following procedure returns this integral. Since many arclength integrals cannot be evaluated synbolically,
arclength
returns the integral unevaluated; use
evalf
to get a decimal approximation to its value.
>
arclength := proc(f,g,a,b)
Int(sqrt(diff(f(t),t)^2 + diff(g(t),t)^2), t=a..b);
end proc:
For the example we have been using, we can confirm that the integral formula agrees with the arclength we found from the piecewise-linear approximations:
>
f := t-> t^2 ; g := t-> t^3 - 3*t ;
>
evalf(arclength(f,g,-2,2));
Question 3
Confirm that the integral formula agrees with the results you obtained with piecewise-linear approximations in Questions 1 and 2.
Solution.
>
evalf(arclength(f,g,-sqrt(3),sqrt(3)));
>
evalf(arclength(f1,g1,0,2*Pi));
These two values agree with the approximations obtained in Questions 1 and 2, at least in the first few decimal places. If we were to use more subintervals in Questions 1 and 2, we would of course get better approximations.