Shared07 - Arc Length and Surface Area Assignments / Arc Length and Surface Area Notes.sagewsOpen in CoCalc
This material was developed by Aaron Tresham at the University of Hawaii at Hilo and is
%md
### Prerequisites:

* Intro to Sage
* Symbolic Integration


# Arc Length and Surface Area

We're going to cover two applications of integrals in these notes: (1) the length of a curve and (2) the area of a surface of revolution.

# Arc Length

Our goal is to find the length of the graph of a function from to . This is called "arc length."

We will assume that our function is "smooth" on , which means that the derivative is continuous at every in .

The simplest curve is a straight line. We can find the length of a line segment using geometry. For anything more complex, we will use line segments to approximate the curve.

Here is the procedure:

1. Divide the interval into subintervals of equal width with endpoints .

2. Find the length of the line segments connecting the points and for .

3. Add up all these lengths to get an approximation for the arc length.

4. Take the limit as approaches infinity to get the actual arc length.

Here is a sample picture with .

Does this process sound familiar. Is anyone surprised that the final answer turns out to be an integral?

We find the length of the line segments (step 2) using the distance formula. Let be the distance from to . Then

where is a constant.

This is where it gets a little tricky. By the Mean Value Theorem, there exists with such that . Multiplying both sides by gives:

So then we have

The arc length is thus

[Note: We have assumed is continuous to guarantee that this integral exists.]

## Arc Length Formula

If is continous on the interval , then the arc length of the curve from to is

## Example 1

Find the length of from to .

Solution: , so for .

Therefore,

f(x)=ln(sec(x))
integral(sqrt(1+derivative(f,x)^2),x,0,pi/4)

arcsinh(1)

You may not recognize this function (it is not arcsin), but this is in fact the same as the answer I gave above:

N(arcsinh(1));N(ln(sqrt(2)+1))

0.881373587019543 0.881373587019543

Here's what you get if you do the simplification first:

integral(sec(x),x,0,pi/4)
N(_)

1/2*log(1/2*sqrt(2) + 1) - 1/2*log(-1/2*sqrt(2) + 1) 0.881373587019543

## Example 2

Find the length of from to .

Solution: Since , we have

This can be done by hand, but the algebra is kind of involved. Let's just use Sage:

f(x)=x^2/8-ln(x)
integral(sqrt(1+derivative(f,x)^2),x,1,2)
N(_)

log(2) + 3/8 1.06814718055995

Remember that log is the natural logarithm in Sage.

## Example 3

Find the length of from to .

Solution: Since , we have .

f(x)=3*x^2-5*x+4
integral(sqrt(1+derivative(f,x)^2),x,0,2)
N(_)

5/12*sqrt(26) + 35/12*sqrt(2) + 1/12*arcsinh(7) + 1/12*arcsinh(5) 6.66242761277947

So .

## Example 4

Find the length of from to .

Solution: Since , we have .

If we try this integral in Sage, we run into trouble.

integral(sqrt(1+sin(x)^2),x,0,pi)

Error in lines 1-1 Traceback (most recent call last): File "/projects/9189c752-e334-4311-afa9-605b6159620a/.sagemathcloud/sage_server.py", line 879, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-6.7/local/lib/python2.7/site-packages/sage/misc/functional.py", line 663, in integral return x.integral(*args, **kwds) File "sage/symbolic/expression.pyx", line 10712, in sage.symbolic.expression.Expression.integral (build/cythonized/sage/symbolic/expression.cpp:52941) return integral(self, *args, **kwds) File "/projects/sage/sage-6.7/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py", line 761, in integrate return definite_integral(expression, v, a, b, hold=hold) File "sage/symbolic/function.pyx", line 994, in sage.symbolic.function.BuiltinFunction.__call__ (build/cythonized/sage/symbolic/function.cpp:10865) res = super(BuiltinFunction, self).__call__( File "sage/symbolic/function.pyx", line 502, in sage.symbolic.function.Function.__call__ (build/cythonized/sage/symbolic/function.cpp:6801) res = g_function_evalv(self._serial, vec, hold) File "sage/symbolic/function.pyx", line 1065, in sage.symbolic.function.BuiltinFunction._evalf_or_eval_ (build/cythonized/sage/symbolic/function.cpp:11522) return self._eval0_(*args) File "/projects/sage/sage-6.7/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py", line 176, in _eval_ return integrator(*args) File "/projects/sage/sage-6.7/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py", line 23, in maxima_integrator result = maxima.sr_integral(expression, v, a, b) File "/projects/sage/sage-6.7/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py", line 776, in sr_integral return max_to_sr(maxima_eval(([max_integrate],[sr_to_max(SR(a)) for a in args]))) File "sage/libs/ecl.pyx", line 792, in sage.libs.ecl.EclObject.__call__ (build/cythonized/sage/libs/ecl.c:6998) return ecl_wrap(ecl_safe_apply(self.obj,(<EclObject>lispargs).obj)) File "sage/libs/ecl.pyx", line 365, in sage.libs.ecl.ecl_safe_apply (build/cythonized/sage/libs/ecl.c:4861) raise RuntimeError, "ECL says: "+ecl_base_string_pointer_safe(s) RuntimeError: ECL says: Error executing code in Maxima:

Since Sage can't do this integral symbolically, we'll find a numerical approximation instead. In Sage we can use the numerical_integral command.

numerical_integral(f,a,b)

Note: Since this is numerical, only one variable is involved, so you do not specify the variable.

numerical_integral(sqrt(1+sin(x)^2),0,pi)

(3.820197789027712, 4.241271544000682e-14)

numerical_integral returns an ordered pair: the first number is the answer, and the second number is an estimate of the error in the approximation (notice the e-14: this number is .

Thus, our arc length is approximately .

# Areas of Surfaces of Revolution

We have already talked about the volume of a solid of revolution, which you get by rotating a region around an axis. In particular, we saw what happens when you take the region between the graph of a function and the x-axis. If you rotate just the boundary curve, and not the region under the curve, then you do not get a solid; instead, you get a surface of revolution. Our goal is to find the surface area of such objects.

Since we have already seen the development of formulas involving integrals for volume and for arclength, I am going to skip over most of the derivation of the surface area formula.

We have a curve from to . We are going to rotate this curve around the x-axis to form a surface.

We divide the interval into subintervals of equal width with endpoints .

For each subinterval , we approximate the curve with a line segment from the point to the point .

When we rotate this line segment around the x-axis, we get an approximation for the portion of the surface on this subinterval. Rotating a line segment around an axis produces a frustum of a cone (i.e., a cone with the top cut off). The surface area of a frustum of a cone is known from geometry to be , where is the length of the line segment and is the average height of the line segment above the x-axis.

To get the surface area, you add up the approximations from each subinterval, and take the limit as goes to . You have to do some algebraic manipulation, and you have to use the Mean Value Theorem (similar to what we did for arc length). I will omit the messy steps.

## Surface Area Formula

If the function and is continuous on the interval , the area of the surface generated by rotating the graph of around the x-axis is

## Example 5

Find the surface area of a sphere of radius .

Solution: We rotate the graph of from to to generate a sphere.

Since , we have

%auto
%hide
f(x)=sqrt(1-x^2)
revolution_plot3d(f,(x,-1,1),parallel_axis='x',show_curve=True)

3D rendering not yet implemented
%var r
f(x)=sqrt(r^2-x^2)
integral(2*pi*f(x)*sqrt(1+derivative(f,x)^2),x,-r,r)

4*pi*r^2

## Rotation around the y-axis

If you rotate around the y-axis, then you may use as a function of :

If and is continuous on the interval (interval of y-values), the area of the surface generated by rotating the graph of about the y-axis is

Alternatively, if you have from to , then you can use

## Example 6

Find the area of the surface generated by rotating around the y-axis the graph of from to .

Solution: Since we are rotating around the y-axis, we can find so that . We solve for to get (note ). The x-interval corresponds to the y-interval .

Now , so

But since we were given , it would be easier to do everything in terms of :

Here are the calculations of the two integrals:

%var y
integral(2*pi*sqrt(y)*sqrt(1+(1/2/sqrt(y))^2),y,0,4) #using g(y)
N(_)

1/6*pi*(17*sqrt(17) - 1) 36.1769031974114
integral(2*pi*x*sqrt(1+4*x^2),x,0,2) #using f(x)
N(_)

1/6*pi*(17*sqrt(17) - 1) 36.1769031974114
%auto
%hide
f(x)=x^2
revolution_plot3d(f,(x,0,2),parallel_axis='z',show_curve=True) #revolution_plot3d assumes the function f is in the xz-plane, so we rotate around the z axis.

3D rendering not yet implemented

## Example 7 (Gabriel's Horn)

Consider the surface obtained by rotating around the x-axis the graph of for .

The area of this surface is

so our surface area integral diverges (infinite surface area).

The curious thing about Gabriel's Horn is that it holds a finite volume. Using the method of disks, the enclosed volume is

integral(pi/x^2,x,1,+Infinity)

pi

Here's a piece of the horn:

%auto
%hide
f(x)=1/x
revolution_plot3d(f,(x,1,5),parallel_axis='x',show_curve=True)

3D rendering not yet implemented