ArcLength Problems

From the article ``Arclength: An Example from the New Calculus''
in
Mathematica in Education
Vol.3 No.2
Spring 1994
(c) TELOS/Springer-Verlag

by
Jack K. Cohen
Center for Wave Phenomenon
Colorado School of Mines
Golden, CO  80401-1887
jkc@keller.mines.colorado.edu

Introduction

Texts do arclength problems that seem artificial and avoid more interesting cases such as the arclength of an arch under the sine or the arclength of an ellipse because they don't come out in terms of functions with elementary antiderivatives.  But this is a good opportunity to contrast using the Existence  Theorem and the Fundamental Theorem.

Laying the groundwork

Interactively develop with the class an arclength approximator based on computing the sum of the chord lengths of adjacent points.  There are many ideas, here's one possible development:

Pythagorean[{x1_, y1_}, {x2_, y2_}] :=
	Sqrt[(x1 - x2)^2 + (y1 - y2)^2]

ChordLength[f_, x_, dx_] :=
	Pythagorean[{x, f[x]}, {x + dx, f[x + dx]}]

ArcLength[f_, a_, b_, n_] :=
Module[
	{h = (b - a)/n, k},
	N@Sum[ChordLength[f, a + k h, h],
	{k, 0, n-1}]
]

For convenience, also define the formula for differential arclength:

ds[f_, x_] := Sqrt[1 + f'[x]^2]

Some Elementary Examples

For certain special functions, antiderivatives exist for the differential arclength and we can then use the FTC to compute the arclength.  For example:

f[x_] := x^2

dsParabola = ds[f, x]

sParabola[x_] = Integrate[dsParabola, x]

So, by the FTC, the arclength for 0 to 1 is

sParabola[1] - sParabola[0]

or, in numerical terms:

sParabola[1] - sParabola[0] //N

Note to the instructor

The students may not have seen the trigonometric substitution technique routinely used for the integrand above.  Moreover, when they do, they will express the answer in terms of the logarithm, not the arcsinh function.  They should be reminded that all antiderivatives of a given function differ only by a constant, no matter how different they may seem.

But, for most common functions f(x) the evaluation portion of the FTC cannot be used because an antiderivative in terms of elementary functions doesn't exist.  For example, just replace x^2 by x^3 :

f[x_] := x^3

Integrate[ds[f,x], x]

Notice that the ``answer'' involves an integral that Mathematica could not ``do''.  Indeed, integrands involving square roots of quartics usually involve the non-elementary functions known as elliptic functions.

PROBLEM: Verify that the functions sqrt(1 + x^n) with n = 2, 1, 0, -1 and -2 have elementary antiderivatives.  Then determine which functions of the form y = x^p have differential arclengths with elementary antiderivatives.  Two of the powers p correspond to lines; which two?  Look at the problems in your calculus book and identify arclength exercises involving the non-trivial powers you have found.

This being the case, textbooks concoct rather exotic functions with the property that 1 + y'^2 becomes a perfect square of powers.   For example,
	y = 1/6 x^3 + 1/2 1/x
	
	y = 1/8 x^4 + 1/4 1/x^2
	
	y = 1/3 x^3 + 1/4 1/x .

PROBLEM:  Verify that the above three examples miraculously lead to a perfect square and an arclength integral without a square root.

A reasonable person just has to be wondering: How in the world do they come up with these dreadful looking things?  Well, see the next problem, where you are given a chance to answer that question for yourself.

PROBLEM:  Using the experience gained in solving the last problem, find out which  functions of the form, y = x^p + c x^q, have differential arclengths with elementary antiderivatives?  Here, c, p, and q are constants.  Put the above three examples in the form considered in this problem and verify that everything is consistent.   Find other problems in your text that exploit the result you have rediscovered.

Arch of Sine Curve

Find the arclength of one arch of the sine curve---that is, the arclength from 0 to π.

f[x_] := Sin[x]

ds[f, x]

This differential arclength does not have an elementary antiderivative:

Integrate[ds[f, x], x]

However, since ds[f,x] is continuous (verify this!), the Existence Theorem guarantees that any standard sequence of Riemann sums will converge to the numerical answer.

Before using such a standard sequence,  let's get an approximation by using our idea of summing chord lengths:

ArcLength[f, 0, Pi, 20]

TableForm[
	Table[
		{n, ArcLength[f, 0, Pi, n]},
	{n, 10, 90, 20}],
	TableHeadings -> {None, {"N", "Arclength"}}
]

Question: Is the above arclength approximator a Riemann sum?

Now turn to some examples of standard Riemann sum limits.  Here is the result of using the midpoint rule on the differential arclength:

TableForm[
	Table[
		{n, N@MidpointRule[ds[f, x], {x, 0, Pi, n}]},
	{n, 1, 10}],
	TableHeadings -> {None, {"N", "Arclength"}}
]

This converges much quicker than our chord approximator!  How about the lowly Rectangle rule?

TableForm[
	Table[
		{n, N@LeftEndpointRule[ds[f, x], {x, 0, Pi, n}]},
	{n, 1, 10}],
	TableHeadings -> {None, {"N", "Arclength"}}
]

Remark:NIntegrate gives Mathematica's best numerical integrator:

NIntegrate[ds[f, x], {x, 0, Pi}]

Remark: LeftEndpointRule and MidpointRule are not part of Mathematica, but rather are supplied as part of the CSM calculus environment.

PROBLEM:  Why is our chordlength approximator so slowly convergent compared with standard numerical techniques (including even the lowly rectangle rule)?

Remarks for the instructor

The integration techniques convert the problem into a related area problem that uses the exact differential arclength.  The intuitive formula only crudely approximates that arclength.  We might think of improving the approximation by computing the arclength of the parabola through 3 adjacent points---this would not be the same as Simpson's rule applied to the integrand ds[f,x] (this could be an additional exercise).

Ellipse -- Rectangular Form

The standard form for an ellipse is (x/a)^2 + (y/b)^2 = 1.  Solving for y and introducing the eccentricity e (no connection to the base of the natural logarithms!) leads to the following expression for y:

f[x_] := Sqrt[(1 - e^2) (a^2 - x^2)]

PROBLEM: Explain in full detail, why this formula gives the upper arch of an ellipse with semi-major axis a and eccentricity e.  If necessary, use the index of your text to get the definition of e and other facts about the ellipse.  Note especially that e is between 0 and 1 for an ellipse.

ds[f, x]

The parameter `a' just scales the whole result proportionately, so take a = 1 henceforth (we have to take some particular value to apply numerical methods--here, we are lucky that we don't lose generality by doing so):

a = 1;

PROBLEM: Justify the claim in the previous paragraph and explain, in clear english, how to get arclengths for arbitrary values of a from the values for a = 1.

NIntegrate[4 ds[f,x] /. {e -> .5}, {x, 0, a}]

NIntegrate[4 ds[f,x] /. {e -> 0}, {x, 0, a}]

NIntegrate[4 ds[f,x] /. {e -> 1}, {x, 0, a}]

PROBLEM: Explain the results obtained for e = 0 and for e = 1.  Generalize these two results to arbitrary a.

NIntegrate[4 ds[f,x] /. {e -> .5}, {x, 0, a}] //Timing

PROBLEM: Make a graph of arclength vs. eccentricity.  Note: Since the NIntegrates take a long time, consider making a table and using ListPlot instead of using Plot.  We will cure the timing problem in the next section.

Solution for the instructor

aTable =
Table[{e, NIntegrate[4 ds[f,x], {x, 0, a}]},
{e, 0.0, 1.0, .10}]

ListPlot[aTable, PlotJoined -> True]

ListPlot[aTable, PlotRange -> {0, 6.5}, PlotJoined -> True]

Ellipse -- Polar Form

PROBLEM: In the rectangular form of the ellipse, make the substitution x = a cos(θ) and show that the equation reduces to            y = b sin(θ).    Then show that ds = sqrt(dx^2 + dy^2) reduces to                               ds = a sqrt(1 - e^2 cos^2(θ)) dθ

Clear[a];

ds = a Sqrt[1 - e^2 Cos[theta]^2]

Again, the parameter `a' just scales the whole result proportionately, so take a = 1 henceforth:

a = 1;

PROBLEM: Justify this claim and explain how to get arclengths for arbitrary values of a.  Explain why integrating from θ = 0 to θ = π/2 gives 1/4 of the arclength of the ellipse

NIntegrate[4 ds /. {e -> .5}, {theta, 0, Pi/2}]

NIntegrate[4 ds /. {e -> 0}, {theta, 0, Pi/2}]

NIntegrate[4 ds /. {e -> 1}, {theta, 0, Pi/2}]

NIntegrate[4 ds /. {e -> .5}, {theta, 0, Pi/2}] //Timing

PROBLEM: Explain the results obtained for e = 0 and for e = 1.  Generalize these two results to arbitrary a.

PROBLEM: Make a graph of arclength vs. eccentricity.  Notice that now, NIntegrate goes like the wind!  So you can use a Plot command like this:

Plot[NIntegrate[4 ds, {theta, 0, Pi/2}], {e, 0, 1}]

PROBLEM: Why is Mathematica able to obtain integrals so much faster in the polar representation?

Investigation problem

Let d be a number between 0 and 1.  Which is greater: the arclength from c < x < a on the upper branch of the ellipse (x/a)^2 + (y/b)^2 = 1 with eccentricity e = 1 - d or the arclength from a < x < c on the upper right branch of the hyperbola (x/a)^2 - (y/b)^2 = 1 with eccentricity             e = 1 + d ? Hint: Use a representation in terms of hyperbolic functions for the hyperbola!

Solution for the instructor

For the elliptical case, the x limits are defined by                                  x = a <--> cos(θ) = 1 ==> θ = 0 and  x = c = a e <--> cos(θ) = e.  For the hyperbolic case, use x = a cosh(u), y = b sinh(u) and the relations cosh^2 u - sinh^2 u = 1, b^2 = c^2 - a^2 = a^2 (e^2 - 1) to derive ds = a sqrt(e^2 cosh^2 u - 1) du.

Clear[a];

dsE = a Sqrt[1 - (1-d)^2 Cos[theta]^2]

dsH = a Sqrt[(1+d)^2 Cosh[u]^2 - 1]

a = 1;

pEllipse =
Plot[NIntegrate[dsE, {theta, 0, ArcCos[1-d]}], {d, 0, 1}]

pHyperbola =
Plot[NIntegrate[dsH, {u, 0, ArcCosh[1+d]}], {d, 0, 1},
	PlotStyle -> GrayLevel[0.3]
]

Show[pEllipse, pHyperbola]

Answer: For any value of d between 0 and 1, the arclength is greater on the hyperbola.