%md

# Alternate Integral for Surface Area


# Alternate Integral for Surface Area

%md
After class on Monday, Cyrus asked me a great question.

> You know how volume is the integral of cross-sectional area?  Why isn't surface area the integral of cross-sectional circumference?

Let's talk about this.  Suppose $f(x)$ is a function on $[a,b]$, and (just to be safe), suppose that $f(x)$ is differentiable on $[a,b]$ and its derivative $f'(x)$ is continuous on $[a,b]$, too.  Use the graph of $y=f(x)$ to create a solid of revolution by revolving the graph around the $x$-axis.  In class, we derived an integral formula for the surface area, $S$, of this solid:

$$S=\int_0^1 2 \pi f(x) \sqrt{1+f'(x)^2}dx$$

We arrived at this formula using a cut-up-and-add-up approach using conical frustrums to approximate a slice of the surface.  Summing the surface areas of those frustrums, applying the Mean Value Theorem, and taking a limit led to the above definite integral.

Below you can see a SageMath representation of how a conical frustrum approximates a curving surface on a slice of the domain of the function that generates the solid.



After class on Monday, Cyrus asked me a great question.

You know how volume is the integral of cross-sectional area? Why isn't surface area the integral of cross-sectional circumference?

Let's talk about this. Suppose $f(x)$ is a function on $[a,b]$, and (just to be safe), suppose that $f(x)$ is differentiable on $[a,b]$ and its derivative $f'(x)$ is continuous on $[a,b]$, too. Use the graph of $y=f(x)$ to create a solid of revolution by revolving the graph around the $x$-axis. In class, we derived an integral formula for the surface area, $S$, of this solid:

$S=\int_0^1 2 \pi f(x) \sqrt{1+f'(x)^2}dx$

We arrived at this formula using a cut-up-and-add-up approach using conical frustrums to approximate a slice of the surface. Summing the surface areas of those frustrums, applying the Mean Value Theorem, and taking a limit led to the above definite integral.

Below you can see a SageMath representation of how a conical frustrum approximates a curving surface on a slice of the domain of the function that generates the solid.

u=var('u')
line = 1+1/3*(u)
parabola = 1+1/9*(u)*(6-(u))
sur1 = revolution_plot3d(line, (u,0,3), opacity=0.75, rgbcolor=(0,0,1), show_curve=True, parallel_axis='x')
sur2 = revolution_plot3d(parabola, (u,0,3), opacity=0.25, rgbcolor=(1,0,0), show_curve=False, parallel_axis='x')
(sur1+sur2).save('graphics-3d-frustrum.png')

%md

Cyrus's question may appear to be inspired by what we learned about volume and is a natural extension of that  knowledge.  Or it may appear to be inspired by noticing when $\Delta x$ is small, the frustrum is basically a circle, so it 'appears' that the surface area of the frustrum is essentially the circumference. Or it may appear to be inspired by wondering if we could use cylinders to approximate the surface of a slice of the solid and get a simpler formula for surface area.  Regardless of how the very reasonable question arose, it's a question that's worth exporing

## Could it be true?

If it's true that the surface area is just the integral of cross-sectional circumferences, then we could write

$$S= \int_a^b 2 \pi f(x) dx.$$

There are two problems with this.

The first problem with this approach reveals itself when look at the definite integral as representing the area between the $x$-axis and the graph of the integrand.  The second problem will be explored in the next section.

If the above integral were the surface area of a solid of revolution, then that surface area could be written as

$$S = 2\pi \int_a^b f(x)dx,$$

which is a constant multiple of the area under the curve $y=f(x)$ on $[a,b]$.  It would be remarkable if the surface area of a solid of revolution were equal to a multiple of the area betweent he axis of rotation and the generating curve!  Unfortunately, it's not true.  To see why, let's do a thought experiment that starts easy and then gets complicated.

Consider $A(x)=1-x$ and $B(x)=1+x(2-x)$ on $[0,1]$.  The plots of these are shown below with $A(x)$ in blue and $B(x)$ in red.  By inspection, it is clear to anyone who knows Calculus that

$$\int_0^1 B(x)dx < \int_0^1 A(x)dx.$$

It follows that any positive constant multiple of the integrals also obeys the inequality.  Specifically,

$$\int_0^1 2\pi B(x)dx < \int_0^1 2\pi A(x)dx.$$

If it were true that the surface area of a solid of revolution were a $2 \pi$ times the area under its generating curve, then the surface area of the solid of revolution generated by $y=A(x)$ on $[0,1]$ would be greater than the surface area of the solid of revolution generated by $y=B(x)$ on $[0,1]$ for *any* $B(x)$ whose graph sat below the graph of $A(x)$ on $[0,1]$.


Cyrus's question may appear to be inspired by what we learned about volume and is a natural extension of that knowledge. Or it may appear to be inspired by noticing when $\Delta x$ is small, the frustrum is basically a circle, so it 'appears' that the surface area of the frustrum is essentially the circumference. Or it may appear to be inspired by wondering if we could use cylinders to approximate the surface of a slice of the solid and get a simpler formula for surface area. Regardless of how the very reasonable question arose, it's a question that's worth exporing

## Could it be true?

If it's true that the surface area is just the integral of cross-sectional circumferences, then we could write

$S= \int_a^b 2 \pi f(x) dx.$

There are two problems with this.

The first problem with this approach reveals itself when look at the definite integral as representing the area between the $x$-axis and the graph of the integrand. If the above integral were the surface area of a solid of revolution, then that surface area could be written as

$S = 2\pi \int_a^b f(x)dx,$

which is a constant multiple of the area under the curve $y=f(x)$ on $[a,b]$. It would be remarkable if the surface area of a solid of revolution were equal to a multiple of the area betweent he axis of rotation and the generating curve! Unfortunately, it's not true. To see why, let's do a thought experiment that starts easy and then gets complicated.

Consider $A(x)=1-x$ and $B(x)=1+x(2-x)$ on $[0,1]$. The plots of these are shown below with $A(x)$ in blue and $B(x)$ in red. By inspection, it is clear to anyone who knows Calculus that

$\int_0^1 B(x)dx < \int_0^1 A(x)dx.$

It follows that any positive constant multiple of the integrals also obeys the inequality. If it were true that the surface area of a solid of revolution were a constant multiple of the area under its generating curve, then the surface area of the solid of revolution generated by $y=A(x)$ on $[0,1]$ would be greater than the surface area of the solid of revolution generated by $y=B(x)$ on $[0,1]$ for any $B(x)$ whose graph sat below the graph of $A(x)$ on $[0,1]$.

plot1=plot(1-x,(x,0,1),color='blue')
plot2=plot(1+x*(x-2),(x,0,1),color='red')
(plot1+plot2).save("graphics-AandBcurves.png")

%md

This certainly seems true for the functions $A(x)$ and $B(x)$ that we've graphed.  We haven't thought much about surface areas of three dimensional solids, so our intuition about this is weak.  To build our intuition about surface areas, consider this statement:

> the closer a part of the graph is to the solid's axis of rotation, the less surface area that part of the graph generates.

Even though the arc length of $B(x)$ on $[0,1]$ is greater than that of $A(x)$, because the graph $B(x)$ gets closer to the $x$-axis faster than $A(x)$, when rotated about the $x$-axis, its graph generates less surface area than the nearest part of $A(x)$.  We can modify $B(x)$ slightly to 'fix' this.  That is, we can modify $B(x)$ to increase the surface area of the solid it generates.  We'll do this by taking a page out of Nature's playbook.

## Building a Counterexample

We're going to build an example function $B(x)$ whose graph lies above the $x$-axis andbelow the graph of $A(x)$, and that generates a solid of revolution whose surface area is clearly greater than the surface area of the solid generated by $A(x)$.

When Nature wants to make something bigger but has limited resources or space to work in, it braches or bends.  For example, the human cortex (or grey matter) is a sheet of tissue consisting of the neurons that allow a human to think, and the amount of grey matter in a human brain depends on the size of the sheet of tissue that can fit near the top fo the skull.  To get more of that sheet in there, Nature decided to fold it intricately so the surface area of the sheet is huge even though the volume in the skull in small.  We see similar phenomena in the human intestines (more surface area means more efficient digestion), lungs (more surface area means more efficient oxygen transport into the blood), and nalas passages (more surface area means a greater chance the mucous membranes grab garbage from inhales air before it gets to the lungs).

So let's add ripples to $B(x)$ so the surface area of the solid it generates gets bigger.



This certainly seems true for the functions $A(x)$ and $B(x)$ that we've graphed. We haven't thought much about surface areas of three dimensional solids, so our intuition about this is weak. To build our intuition about surface areas, consider this statement:

the closer a part of the graph is to the solid's axis of rotation, the less surface area that part of the graph generates.

Even though the arc length of $B(x)$ on $[0,1]$ is greater than that of $A(x)$, because the graph $B(x)$ gets closer to the $x$-axis faster than $A(x)$, when rotated about the $x$-axis, its graph generates less surface area than the nearest part of $A(x)$. We can modify $B(x)$ slightly to 'fix' this. That is, we can modify $B(x)$ to increase the surface area of the solid it generates. We'll do this by taking a page out of Nature's playbook.

## Building a Counterexample

We're going to build an example function $B(x)$ whose graph lies above the $x$-axis andbelow the graph of $A(x)$, and that generates a solid of revolution whose surface area is clearly greater than the surface area of the solid generated by $A(x)$.

When Nature wants to make something bigger but has limited resources or space to work in, it braches or bends. For example, the human cortex (or grey matter) is a sheet of tissue consisting of the neurons that allow a human to think, and the amount of grey matter in a human brain depends on the size of the sheet of tissue that can fit near the top fo the skull. To get more of that sheet in there, Nature decided to fold it intricately so the surface area of the sheet is huge even though the volume in the skull in small. We see similar phenomena in the human intestines (more surface area means more efficient digestion), lungs (more surface area means more efficient oxygen transport into the blood), and nalas passages (more surface area means a greater chance the mucous membranes grab garbage from inhales air before it gets to the lungs).

So let's add ripples to $B(x)$ so the surface area of the solid it generates gets bigger.

%md

Our favorite way to add ripples to a function is by adding one a sinusoidal function.  Consider $s(x)=\sin(2 \pi x)$, a sinusoidal function with period $p=1$.  A slight modification of this function give $s_M(x)=s(Mx)$ which has period $1/M$.  This means that $s_M(x)$ will have $M$ equally spaced maxima and minima on $[0,1]$.

Define the function $$B_1(x)=s_M(x)+B(x).$$  Like $B(x)$, this function passes through $(0,1)$ and $(1,0)$, and will, on average, decrease between these points, having $M$ oscillations along the way.

Below is a plot of both $A(x)$ and $B_1(x)$  with $M=10$.  The plot shows that $B_1(x)$ isn't the function we're looking for because it does not satisfy $0 \leq B(x) \leq A(x)$ for all $x$ in $[0,1]$.  We need to get the oscillations 'under control' so the red graph never crosses the blue graph.


Our favorite way to add ripples to a function is by adding one a sinusoidal function. Consider $s(x)=\sin(2 \pi x)$, a sinusoidal function with period $p=1$. A slight modification of this function give $s_M(x)=s(Mx)$ which has period $1/M$. This means that $s_M(x)$ will have $M$ equally spaced maxima and minima on $[0,1]$.

Define the function $B_1(x)=s_M(x)+B(x).$ Like $B(x)$, this function passes through $(0,1)$ and $(1,0)$, and will, on average, decrease between these points, having $M$ oscillations along the way.

Below is a plot of both $A(x)$ and $B_1(x)$ with $M=10$. The plot shows that $B_1(x)$ isn't the function we're looking for because it does not satisfy $0 \leq B(x) \leq A(x)$ for all $x$ in $[0,1]$. We need to get the oscillations 'under control' so the red graph never crosses the blue graph.

M=10
s=1+x*(x-2)+1/(1+(x-1/2)^2)*sin(M*2*pi*x)
plot1=plot(abs(x-1),(x,0,1),color='blue')
plot2=plot(s,(x,0,1),color='red')

%md

We want to limiting the amplitude of the oscillations so they are small near $x=0$ and $x=1$ and not so big in between that the graphs cross.  We'll do this by multiplying $s_M(x)$ by the function built from $$E(x)=\exp(-x^2),$$ pictured below.

We will narrow the function so its values get closer to zero faster.  Let $$E_K(x)=\exp(-(K x)^2)$$ for some $K>1$.  This $K$ compresses the graph of $E$ horizontally.  We can compress the graph vertically be multiplying its output by a constant.

Below of a plot of $E(x)$ (in blue), $E_2(x)$ (in green), and $\frac{1}{2} E_2(x)$ (in red).


We want to limiting the amplitude of the oscillations so they are small near $x=0$ and $x=1$ and not so big in between that the graphs cross. We'll do this by multiplying $s_M(x)$ by the function built from $E(x)=\exp(-x^2),$ pictured below.

We will narrow the function so its values get closer to zero faster. Let $E_K(x)=\exp(-(K x)^2)$ for some $K>1$. This $K$ compresses the graph of $E$ horizontally. We can compress the graph vertically be multiplying its output by a constant.

Below of a plot of $E(x)$ (in blue), $E_2(x)$ (in green), and $\frac{1}{2} E_2(x)$ (in red).

plot1=plot(exp(-x^2),(x,-3,3),color="blue")
plot2=plot(exp(-(2*x)^2),(x,-3,3),color="green")
plot3=plot(1/2*exp(-(2*x)^2),(x,-3,3),color="red")
(plot1+plot2+plot3).save("graphics-bumps.png")

%md

Now we use $E_K(x)$ to control the amplitude of the sinusoidal function $s_M(x)$ that will give us our ripples.  Before doing that, there one more tweak we need to make.

The function $E_K(x)$ is symmetric with respect to the $y$-axis.  We would like to shift it right so its symmetry occurs somewhere in the middle of the interval $[0,1]$, so we use the function $E_K(x-1/2)$, which is symmetric about $x=1/2$.  Therefore, the modified sinusoidal function is $$s_M(x) \cdot E_K(x-1/2)=\sin(2 M \pi x)\cdot \exp(-(K (x-1/2))^2).$$

A quick plot of $B(x)+s_M(x) \cdot E_K(x-1/2)$ shows the amplitude of our sinusoids is still too great, so we will compress them vertically by multiuplying $E_K(x-1/2)$ by a constant $c$ between 0 and 1.  Guessing a checking suggests $c=1/5$ works.  (We can always make it smaller later, if we need to.)


Now we use $E_K(x)$ to control the amplitude of the sinusoidal function $s_M(x)$ that will give us our ripples. Before doing that, there one more tweak we need to make.

The function $E_K(x)$ is symmetric with respect to the $y$-axis. We would like to shift it right so its symmetry occurs somewhere in the middle of the interval $[0,1]$, so we use the function $E_K(x-1/2)$, which is symmetric about $x=1/2$. Therefore, the modified sinusoidal function is $s_M(x) \cdot E_K(x-1/2)=\sin(2 M \pi x)\cdot \exp(-(K (x-1/2))^2).$

A quick plot of $B(x)+s_M(x) \cdot E_K(x-1/2)$ shows the amplitude of our sinusoids is still too great, so we will compress them vertically by multiuplying $E_K(x-1/2)$ by a constant $c$ between 0 and 1. Guessing a checking suggests $c=1/5$ works. (We can always make it smaller later, if we need to.)

M=10
K=7
c=1/5
s=1+x*(x-2)+sin(M*2*pi*x)*exp(-(K*(x-1/2))^2)*c
plot1=plot(abs(x-1),(x,0,1),color='blue')
plot2=plot(s,(x,0,1),color='red')
(plot1+plot2).save("graphics-rippletry.png")

%md

If you're not immediately convined that our 'rippled' curve generates a solid with a greater surface area than that generated by $A(x)$, you can increase $M$ to add more ripples.  You can even shift $E_K(x)$ to be centered at $x=1/4$ to make the ripples start further away from the axis or rotation.

Here's a plot of a version of $B(x)$ with more ripples that start closer to $x=0$.



If you're not immediately convined that our 'rippled' curve generates a solid with a greater surface area than that generated by $A(x)$, you can increase $M$ to add more ripples. You can even shift $E_K(x)$ to be centered at $x=1/4$ to make the ripples start further away from the axis or rotation.

Here's a plot of a version of $B(x)$ with more ripples that start closer to $x=0$.

M=20
K=7
c=1/6
x0=1/4
s=1+x*(x-2)+sin(M*2*pi*x)*exp(-(K*(x-x0))^2)*c
plot1=plot(abs(x-1),(x,0,1),color='blue')
plot2=plot(s,(x,0,1),color='red')
(plot1+plot2).save("graphics-moreripples.png")

%md

We have created a convincing example of two functions with $0 \leq B(x) \leq A(x)$ that generate solids with surface areas measure in the opposite order.  This shows that it's not possible that the surface area of a solid of revolution can be calculated as the integral of its cross-sectional circumferences.

This counterexample shows that we can't use cross-sectional circumferences to calculate the surface area of a solid of revolution, but it does not explain why this doesn't work.

## Why Does This Fail?

So understand why surface area is not the integral of cross-sectional area, we first need to agree that the definite integral we derived does work.  Surface area of the solid generated by rotating $y=f(x)$ on $[a,b]$ about the $x$-axis is $$SA=\int_a^b 2 \pi f(x) \sqrt{ 1+ f'(x)^2} dx.$$
If it were also true that $$SA=\int_a^b 2 \pi f(x) dx,$$ then we could equate these formula and write
\begin{align*}
0 & = \int_a^b 2 \pi f(x) \sqrt{ 1+ f'(x)^2} dx -\int_a^b 2 \pi f(x) dx \\
& = \int_a^b 2 \pi f(x) (\sqrt{ 1+ f'(x)^2} -1 ) dx
\end{align*}
This means $\sqrt{1+f'(x)^2}=1$ for all $x$.  This can only happen if $f'(x)=0$ for all $x$.  Said another way:  these formula agree only when $f(x)$ is a constant function.  When $f(x)$ is not constant, *i.e.* when the output of $f(x)$ varies, the second formula fails.

We can see that changes in $y$ are important when calculating surface area by writing $f'(x)$ using Leibniz notation.  Notice
\begin{align*}
\sqrt{ 1+ f'(x)^2} dx & = \sqrt{ 1+ \left( \frac{dy}{dx} \right)^2} dx \\
& = \sqrt{ 1+ \left( \frac{dy}{dx} \right)^2(dx)^2 } \\
& = \sqrt{ (dx)^2+ (dy)^2 }. \\
\end{align*}
This makes is clearer that changes in $y$ are important to the surface area calculation, much in the same way they are important to the calculation of arc length.

## Alternate Formula for Arc Length?

What if we approached calculating arc length in a similar manner, but approximating curve segments by horizontal lines instead of secant line segments.  This approach to calculating arc length is illustrated below, where we have an arc (in blue) subdivided into four subarcs.  On each subarc, we approximate the subarc with (1) a secant line (in green) and (2) a horizontal line (in red).



We have created a convincing example of two functions with $0 \leq B(x) \leq A(x)$ that generate solids with surface areas measure in the opposite order. This shows that it's not possible that the surface area of a solid of revolution can be calculated as the integral of its cross-sectional circumferences.

This counterexample shows that we can't use cross-sectional circumferences to calculate the surface area of a solid of revolution, but it does not explain why this doesn't work.

## Why Does This Fail?

So understand why surface area is not the integral of cross-sectional area, we first need to agree that the definite integral we derived does work. Surface area of the solid generated by rotating $y=f(x)$ on $[a,b]$ about the $x$-axis is $SA=\int_a^b 2 \pi f(x) \sqrt{ 1+ f'(x)^2} dx.$ If it were also true that $SA=\int_a^b 2 \pi f(x) dx,$ then we could equate these formula and write

(Share server only supports KaTeX; open in CoCalc to see this formula.)
This means $\sqrt{1+f'(x)^2}=1$ for all $x$. This can only happen if $f'(x)=0$ for all $x$. Said another way: these formula agree only when $f(x)$ is a constant function. When $f(x)$ is not constant, i.e. when the output of $f(x)$ varies, the second formula fails.

We can see that changes in $y$ are important when calculating surface area by writing $f'(x)$ using Leibniz notation. Notice

(Share server only supports KaTeX; open in CoCalc to see this formula.)
This makes is clearer that changes in $y$ are important to the surface area calculation, much in the same way they are important to the calculation of arc length.

## Alternate Formula for Arc Length?

What if we approached calculating arc length in a similar manner, but approximating curve segments by horizontal lines instead of secant line segments. This approach to calculating arc length is illustrated below, where we have an arc (in blue) subdivided into four subarcs. On each subarc, we approximate the subarc with (1) a secant line (in green) and (2) a horizontal line (in red).

f=1+(x-2)^2
piece1=plot(f(1),(x,1,2),color='red')
piece2=plot(f(2),(x,2,3),color='red')
piece3=plot(f(3),(x,3,4),color='red')
piece4=plot(f(4),(x,4,5),color='red')
arc1=plot(f(1)+(f(2)-f(1))*(x-1),(x,1,2),color='green')
arc2=plot(f(2)+(f(3)-f(2))*(x-2),(x,2,3),color='green')
arc3=plot(f(3)+(f(4)-f(3))*(x-3),(x,3,4),color='green')
arc4=plot(f(4)+(f(5)-f(4))*(x-4),(x,4,5),color='green')
plot1=plot(f,(x,1,5),color='blue')
(piece1+piece2+piece3+piece4+arc1+arc2+arc3+arc4+plot1).save("graphics-stepversussecants.png")

%md

In our alternative formulation of approximating the length of a subarc using a horiztonal line segment, only the length of the line segments matter, not their distance from the $x$-axis, so the arc length approximation becomes
\begin{align*}
s & = \lim_{n \rightarrow \infty}\sum_{i=1}^n \Delta x \\
& = \int_a^b dx \\
& = b-a
\end{align*}
This formulation implies that the length of every arc over $[a,b]$ is the length of $[a,b]$, and **this is not true**.  This only works if our function is a constant function!

This shows that it's important to account for how the output of the function $f(x)$ changes.

Something analogous is happening when we calculuate the surface area of a solid of revolution.  We can't assume that surface area is the integral of cross-sectional circumference because that does not take into account how the function is getting closer to or farther from the axis of rotation.  Only a horizontal cylinder has a surface area that equals the integral of its cross-sectional circumference.



In our alternative formulation of approximating the length of a subarc using a horiztonal line segment, only the length of the line segments matter, not their distance from the $x$-axis, so the arc length approximation becomes

(Share server only supports KaTeX; open in CoCalc to see this formula.)
This formulation implies that the length of every arc over $[a,b]$ is the length of $[a,b]$, and this is not true. This only works if our function is a constant function!

This shows that it's important to account for how the output of the function $f(x)$ changes.

Something analogous is happening when we calculuate the surface area of a solid of revolution. We can't assume that surface area is the integral of cross-sectional circumference because that does not take into account how the function is getting closer to or farther from the axis of rotation. Only a horizontal cylinder has a surface area that equals the integral of its cross-sectional circumference.