Application Center - Maplesoft

App Preview:

Parametric arc length

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

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 x = f(t) , y = g(t) , t in [a, b] .

> f := t-> t^2 ; g := t-> t^3 - 3*t ;

f := proc (t) options operator, arrow; t^2 end proc...

g := proc (t) options operator, arrow; t^3-3*t end ...

> plot([f(t), g(t), t=-2..2]);

[Maple Plot]

We partition the parameter interval [a, b] into n equal subintervals with endpoints t_0 = a , t_1 , ... ,
t_n = b , 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 f and g 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);

[Maple Plot]

(We suppressed the output when plf and plg 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

( f(t_(j-1)) , g(t_(j-1)) ) and ( f(t_j) , g(t_j) ), so its length can be computed from the distance formula.
Adding these lengths---one for each subinterval---gives the formula

Sum(sqrt((f(t_j)-f(t_(j-1)))^2+(g(t_j)-g(t_(j-1)))^... .

The following procedure computes this formula, given the functions f and g , the parameter interval [a, b] , 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));

14.50855999

> evalf(approxlen(f,g,-2,2,10));

15.04250614

> evalf(approxlen(f,g,-2,2,20));

15.16801014

> evalf(approxlen(f,g,-2,2,50));

15.20261565

> evalf(approxlen(f,g,-2,2,100));

15.20756178

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 t at the self-intersection point?)

Solution. The curve crosses the x -axis when t = -sqrt(3) and again when t = sqrt(3) , both times when x = 3 .
The length of the curve between these two values of
t can be approximated using approxlen :

> evalf(approxlen(f,g,-sqrt(3),sqrt(3),5));

10.30251267

> evalf(approxlen(f,g,-sqrt(3),sqrt(3),10));

10.61485449

> evalf(approxlen(f,g,-sqrt(3),sqrt(3),50));

10.73025135

> evalf(approxlen(f,g,-sqrt(3),sqrt(3),100));

10.73385832

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 r = theta . By writing it as a parametric curve, find the length of the portion of the curve between theta = 0 and theta = 2*Pi .

Solution. As a polar curve, our curve has equations x = theta*cos(theta) , y = theta*sin(theta) .

> f1 := theta-> theta*cos(theta) ;

>

f1 := proc (theta) options operator, arrow; theta*c...

> g1 := theta-> theta*sin(theta) ;

>

g1 := proc (theta) options operator, arrow; theta*s...

> plot([f1(theta), g1(theta), theta=0..2*Pi]);

[Maple Plot]

> evalf(approxlen(f1,g1,0,2*Pi,50));

21.23832517

> evalf(approxlen(f1,g1,0,2*Pi,100));

21.25180080

> evalf(approxlen(f1,g1,0,2*Pi,500));

21.25611439

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

Int(sqrt(diff(f,t)^2+diff(g,t)^2),t = a .. b) .

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 ;

f := proc (t) options operator, arrow; t^2 end proc...

g := proc (t) options operator, arrow; t^3-3*t end ...

> evalf(arclength(f,g,-2,2));

15.20921063

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)));

10.73506068

> evalf(arclength(f1,g1,0,2*Pi));

21.25629415

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.