Chapter  8	Further Applications of Integration

8.1  Arc Length and Surface Area

Students should read Section 8.1 of Rogawski's Calculus [1] for a detailed discussion of the material presented in this section.

8.1.1 Arc Length

The integrals for calculating arc length and surface area are generally difficult to do by hand.  Thus, Mathematica is the appropriate tool for evaluating these integrals.

If y is a function of x, that is, y = f(x), and f'(x) exists and is continuous on [a,b], then the arc length of the graph of f(x) over the interval [a,b] is

L=(∫_a^b)(Sqrt[1 + f'(((x))^2)])dx

If x is a function of y, that is, x = g(y), and g'(y) exists and is continuous on [c,d], then the arc length of the graph of g(y) over the interval [c,d] is

L=(∫_c^d)(Sqrt[f'(((y))^2) +1])dy

Example 8.1.  Estimate the arc length of  y=(1/x) over the interval [1,2].

Solution: Finding the arc length of this simple rational function by hand is virtually impossible.  This is because f'(x)=-(1/(x^2)) and thus the arc length integral is L=(∫_1^2)(Sqrt[1+ (1/(x^4))])dx, which cannot be evaluated in terms of elementary functions, as the following answer illustrates.

(∫_1^2)(Sqrt[1 + (1/(x^4))])\[DifferentialD]x

However, there are numerical techniques that we can use.  For example, the Mathematica command NIntegrate uses sophisticated algorithms to gives us a good estimate for this definite integral:

NIntegrate[(Sqrt[1 + (1/(x^4))]), {x,1,2}]

A more elementary method of estimating this arc length is Simpson's Rule as shown in Section 7.1 of this text.

Clear[f, a,b,n]
SIMP[a_,b_,n_,f_] := (1/3)Sum[f[a + (2 i -2)(b-a)/n] + 4 f[a + (2i-1)(b-a)/n] + f[a + 2i (b-a)/n],{i, 1, n/2}] (b-a)/n

f[x_]:= (Sqrt[1 + (1/(x^4))])
TableForm[Table[{n,N[SIMP[1,2,n,f]]},{n,10,100,10}],TableHeadings->{{},{"n", "(Subscript[S, n])"}} ]

Thus, we see that Simpson's Rule gives us as accurate an estimate of the arc length, as does the NIntegrate command for n as small as 20.

Example 8.2.  Consider the the ellipse whose equation is given by

((x^2)/(a^2))+((y^2)/(b^2))=1

Assume that a>b. Find the arc length of the upper half of the ellipse.

Solution: To plot the ellipse for various values of a and b, we define a plotting command plot[a,b] as follows.

Clear[a,b,x,y,eq,plot]
eq[x_,y_,a_,b_]:=((x^2)/(a^2))+((y^2)/(b^2))-1 
plot[a_,b_]:=ContourPlot[eq[x,y,a,b]==0, {x, -a,a}, {y, -b,b},
AspectRatio->Automatic, Axes->True, Frame->False]

Here is a plot of the ellipse for a=2 and b=3.

plot[2,3]

On the upper half of the ellipse, we have y≥0. Thus, we can solve for y and and take the positive solution. We will denote this positive solution as a function of x, a, and b.

sol=Solve[((x^2)/(a^2))+((y^2)/(b^2))==1, y];
f[x_,a_,b_]=sol[[2,1,2]]

Clearly, the domain of f is [-a, a]. The natural thing to do would be to evaluate the integral (∫_(-a)^a)(Sqrt[1+(((f'(x)))^2)])dx.  Try this yourself, but be prepared to wait awhile.  Moreover, Mathematica will give the following output:

If[Im[a]==0&&(a Im[(1/(Sqrt[-(a^2)+(b^2)]))]≥1||1+a Im[(1/(Sqrt[-(a^2)+(b^2)]))]≤0||a Im[(1/(Sqrt[-(a^2)+(b^2)]))]==0||a Re[(1/(Sqrt[-(a^2)+(b^2)]))]≠0),((2 (((-a))^(3/2)) (Sqrt[(b^2)]) EllipticE[1-((b^2)/(a^2))] Sign[a])/(Sqrt[-a (b^2)])),Integrate[(Sqrt[1+(((b^2) (x^2))/((a^4)-(a^2) (x^2)))]),{x,-a,a},Assumptions->(Re[b]==0&&Re[a]≠0&&Im[a]==0&&Im[b]≠0)||Im[a]<0||Im[a]>0]]

To understand this output, let us make a change of variable x=a sin  t. Then the integral becomes (verify this)

(∫_(-a)^a)(Sqrt[1+(((f'(x)))^2)])dx=a(∫_(-π/2)^(π/2))(Sqrt[1+(((b^2)(sin^2)t)/((a^2)(cos^2)t))])cos t d t

The latter integral can be expressed as

2a(∫_0^(π/2))(Sqrt[1+(((b^2)(sin^2)t)/((a^2)(cos^2)t))])cos t d t =2a(∫_0^(π/2))(Sqrt[(cos^2)t+((b^2)/(a^2))(sin^2)t]) d t =2a (∫_0^(π/2))(Sqrt[1-(c^2) (sin^2)t]) d t ,

where  c=(Sqrt[1-(((b/a))^2)])and we have used the identity (cos^2)t=1-(sin^2)t.

To simplify our notation, let us define the integrand in the preceding far left integral as

g[t_, a_,b_]=(Sqrt[1-(1-(((b/a))^2))(((Sin[t]))^2)])

Here are some values of the arc length of the upper half of the ellipse.

TableForm[Table[2a(∫_0^(π/2))g[t,a,b] \[DifferentialD]t,{a,1,3},{b,1,3}],
TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"} }]

Observe that we obtain exact values for the arc length when a=b.  Can you explain why?

The approximate values of the numbers appearing in the preceding table are as follows:

TableForm[N[Table[2a(∫_0^(π/2))g[t,a,b] \[DifferentialD]t,{a,1,3},{b,1,3}],10],
 TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"} }]

NOTE: The integral ∫(Sqrt[1-(c^2)(sin^2)t])dt is known as an elliptic integral.  It is very useful in mathematics and has many applications. In Mathematica, it is denoted by Elliptic[t,c^2].  The command Elliptic[x,m] gives (∫_0^x)(Sqrt[1-m (sin^2)t])dt, while Elliptic[m] gives  (∫_0^(π/2))(Sqrt[1-m (sin^2)t])dt.

8.1.2 Surface Area

If f'(x) exists and is continuous on [a,b], then the surface area of revolution obtained by rotating the graph of f(x) about the x-axis for a ≤ x ≤ b is

S=2π(∫_a^b)f(x)(Sqrt[1 + (([f'(x)])^2)])dx

Similarly, if x=g(y) and g'(y) exists and is continuous on [c,d], then the surface area of revolution obtained by rotating g(y) about the y-axis for c ≤ y ≤ d is

S=2π(∫_c^d)g(y)(Sqrt[(([g'(y)])^2)+ 1])dy

Again, evaluating these complicated integrals is what Mathematica does best, as the following examples illustrate.

Example 8.3.  Determine the surface area of revolution obtained by rotating the region under y=(e^(-x)) along the interval [0,2] about the x-axis.

Solution: We calculate

Clear[f,x]
f[x_] := (E^(-x))
S= 2π(∫_0^2)f[x](Sqrt[1+ ((f'[x])^2)])\[DifferentialD]x

N[%]

Here is the corresponding surface of revolution (rotated 90° about the y-axis):

RevolutionPlot3D[(E^(-x)), {x,0,2}]

NOTE: Observe that in this case Mathematica was able to find an anti-derivative of the integrand.  However, not all integrals of this form can be evaluated analytically as the next example illustrates.

Example 8.4.  Determine the surface area of revolution obtained by rotating the region under y=tan x along the interval [0,(π/4)] about the x-axis.

Solution: As in the previous example, we evaluate

Clear[f,x]
f[x_] := Tan[x]
NIntegrate[2π f[x](Sqrt[1+ ((f'[x])^2)]), {x,0,Pi/4}]

To appreciate the complexity of the integral and understand why we used the command NIntegrate, we advise the reader to define the anti-derivative F[t] below and evaluate F[π/4] (be prepared to wait awhile).

F[t_]:=Integrate[f[x](Sqrt[1+ ((f'[x])^2)]),{x,0,t}]

Here is the corresponding surface of revolution:

RevolutionPlot3D[Tan[x],{x,0, Pi/4}]

Exercises

In Exercises 1 and 2, calculate the arc length of the given function over the given interval:
1.  y=(x^4),  over [1,2]         2.  y=sin x,  over [0,(π/2)]

3.  Calculate the arc length of the astroid  (x^(2/3)) + (y^(2/3))=1.  Below is a plot of its graph.  Hint: By symmetry it suffices to calculate only the portion in the first quadrant.

ContourPlot[(x^2)^(1/3)+(y^2)^(1/3)==1,{x,-1,1},{y,-1,1}]

4.  Show that the circumference of the unit circle is 2π by calculating its arc length. Use the fact that the equation of the unit circle is given by   (x^2) + (y^2)=1.

In Exercises 5 through 7, compute the surface area of the given functions rotated about the x-axis over the given intervals:
5.  y=(x^3)+(1/x),  over [1,4]      	6.  y=(((4-(x^(2/3))))^(2/3)) over [0,8]   	 7.  y=cos x, over [0,π]

8.  Show that the surface area of the unit sphere is 4π by rotating the top half of the unit circle  (x^2)+(y^2)=1 about the x-axis.

8.2  Center of Mass

Students should read Section 8.3 of Rogawski's Calculus [1] for a detailed discussion of the material presented in this section.

A lamina is a thin plate whose mass is distributed throughout a region in the plane. Suppose a lamina has a constant density ρ and that the lamina occupies a region in the plane under the graph of a continuous function f over the interval [a,b], where f(x)≥0 for all x.

The mass of the lamina is given by

M=ρ(∫_a^b)f(x)dx

Then the moments of the lamina with respect to x-axis and y-axis are denoted by (Subscript[M, x]) and (Subscript[M, y]) and are defined by

(Subscript[M, x])=(1/2)ρ(∫_a^b)(([f(x)])^2)dx

(Subscript[M, y])=ρ(∫_a^b)x f(x)dx

The center of mass (also called the centroid) of the lamina is defined to be ((OverBar[x]),(OverBar[y])), where

(OverBar[x])=((Subscript[M, y])/M) and (OverBar[y])=((Subscript[M, x])/M)

NOTE:  If the lamina described above as a density ρ that continuously depends on x, that is, if ρ=ρ(x) for x in the interval [a,b], then the moments, the total mass, and the center of mass are given by

M=(∫_a^b)ρ(x)f(x)dx

(Subscript[M, x])=(1/2) (∫_a^b)((ρ(x)[f(x)])^2)dx

(Subscript[M, y])= (∫_a^b)x ρ(x)f(x)dx

(OverBar[x])=((Subscript[M, y])/M) and (OverBar[y])=((Subscript[M, x])/M)

Example 8.5.  Suppose a lamina lies underneath the graph of y=16-(x^2) and over the interval [-4,4].

a)  Assume the density of the lamina is ρ=3. Find the mass, moments, and the center of mass of the lamina. 
b)  Assume the density of the lamina is ρ=(x/2)+2. Find the mass, moments, and the center of mass of the lamina.

Solution:

a) We use the above formulas with ρ=3:

f[x_]=16-(x^2)

The mass is given by

M=3(∫_(-4)^4)f[x]\[DifferentialD]x

The moment with respect to the x-axis is

Mx=(3/2)(∫_(-4)^4)(((f[x]))^2)\[DifferentialD]x

The moment with respect to the y-axis is

My=3(∫_(-4)^4)x f[x]\[DifferentialD]x

The coordinates for the center of mass are

xbar=My/M
ybar=Mx/M

Observe that the region of the lamina is symmetric with respect to the y-axis. Hence, the fact that (OverBar[x])=0 is also clear from the fact that the density is a constant.

Below is the plot of the lamina and its center of mass:

plot1=Plot[f[x], {x, -4,4} ,Filling->Axis];
plot2=ListPlot[{{xbar,ybar}},PlotStyle->{PointSize[0.02],Red}];
Show[plot1,plot2]

b) Here, ρ=x+4. With the above notation we have

f[x_]=16-(x^2)
ρ[x_]=(x/2)+2

The mass is

Mv=(∫_(-4)^4)ρ[x] f[x]\[DifferentialD]x

The moment with respect to the x-axis is

Mxv=(1/2)(∫_(-4)^4)ρ[x] (((f[x]))^2)\[DifferentialD]x

The moment with respect to the y-axis is

Myv=(∫_(-4)^4)ρ[x] x f[x]\[DifferentialD]x

The coordinates for the center of mass are

xbarv=Myv/M
ybarv=Mxv/M

Here is a plot of the lamina showing the center of masses with the uniform density of ρ=3 and variable density of ρ=(x/2)+2  represented by the red and green dots, respectively.

plot3=ListPlot[{{ xbarv,ybarv}}, PlotStyle->{Green,PointSize[.02]}];
 Show[plot1,plot2,plot3]

NOTE: Observe that the center of mass with variable density (green dot) is shifted to the right, as expected, since the density is more weighted to the right.

Example 8.6.  Suppose a lamina covers the top half of the ellipse

((x^2)/(a^2))+((y^2)/(b^2))=1

a) Assume the density of the lamina is ρ=1. Find the mass, moments and the center of mass of the lamina. 
b) Assume the density of the lamina is ρ=(e^(-x)). Find the mass, moments and the center of mass of the lamina.

Solution:  To distinguish between the uniform and variable density cases in parts a) and b), respectively, we attach the letter u and v to the notation in this solution. Thus, Mu will be the mass corresponding to the uniform density while Mv is the mass corresponding the variable density.

a) We solve the equation of the ellipse for y:

Clear[a,b,x,y]
sol=Solve[((x^2)/(a^2))+((y^2)/(b^2))==1,y]

In the top half of the ellipse , we have y≥0. Thus, we take the second solution, simplify, and define it as a function of x, a, and b

fa[x_,a_,b_]:=b (Sqrt[1-((x^2)/(a^2))])

Let the mass, the moment with respect to the x-axis, the moment with respect to the y-axis , and the center of mass be denoted by M(a,b), (Subscript[M, x])(a,b), (Subscript[M, y])(a,b), and ((OverBar[x])(a,b), (OverBar[y])(a,b)), respectively.  We now compute these quantities assuming ρ=1.

Clear[a,b,Mua,Mxua,Myua,xbaru,ybaru]
Mua[a_,b_]=(∫_(-a)^a)fa[x,a,b]\[DifferentialD]x
Mxua[a_,b_]=(1/2)(∫_(-a)^a)(((fa[x,a,b]))^2)\[DifferentialD]x
Myua[a_,b_]=(∫_(-a)^a)x fa[x,a,b]\[DifferentialD]x

xbarua[a_,b_]=((Myua[a,b])/(Mua[a,b]))
ybarua[a_,b_]=((Mxua[a,b])/(Mua[a,b]))

That  (OverBar[x])=0 is also clear from the fact that the density is a constant and the upper half of the ellipse is symmetric with respect to the y-axis.

The mass of the lamina, the moments of the lamina with respect to the x- and y-axis for various values of a and b are as follows:

umassa=TableForm[Table[Mua[a,b],{a,1,3},{b,1,3}],
TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"}}];
uxmomenta=TableForm[ Table[Mxua[a,b]  ,{a,1,3},{b,1,3}] ,
TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"}}];
uymomenta=TableForm[ Table[Myua[a,b]  ,{a,1,3},{b,1,3}]  ,
TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"}}];
TableForm[{umassa,uxmomenta,uymomenta},TableHeadings->{{"Mass","x-moment","y-moment"},{}}]

The corresponding y-coordinate of the center of mass in each case is (recall that (OverBar[x])=0 for all cases)

centermassua=Table[((Mxua[a,b])/(Mua[a,b])),{a,1,3},{b,1,3}];
TableForm[centermassua,
TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"}}]

The following animation shows how the center of mass changes as a and b varies.

plot4a[a_,b_]:=Plot[f[x,a,b],{x,-a,a},PlotRange->{{-5,5},{-15,15}},Filling->Axis];
plot5a[a_,b_]:=ListPlot[{{((Myua[a,b])/(Mua[a,b])),((Mxua[a,b])/(Mua[a,b]))}},PlotStyle->{Red,PointSize[0.02]}]
plotua[a_,b_]:=Show[plot4a[a,b],plot5a[a,b]]

Important Note:: If you are reading the printed version of this publication, then you will not be able to view any of the animations generated from the Animate command in this chapter.  If you are reading the electronic version of this publication formatted as a Mathematica Notebook, then evaluate each Animate command to view the corresponding animation.  Just click on the arrow button to start the animation.  To control the animation just click at various points on the sliding bar or else manually drag the bar.

Animate[plotua[a,b],{a,1,8},{b,1,10}]

b) Here, ρ=(e^(-x)). With the above notations modified to reflect variable density,  we have

Clear[a,b,Mv,Mxv,Myv,xbarv,ybarv]
 ρ[x_]=(E^(-x))
Mvb[a_,b_]=(∫_(-a)^a)ρ[x] fa[x,a,b]\[DifferentialD]x
Mxvb[a_,b_]=(1/2)(∫_(-a)^a)ρ[x] (((fa[x,a,b]))^2)\[DifferentialD]x
Myvb[a_,b_] =(∫_(-a)^a)ρ[x]  x fa[x,a,b]\[DifferentialD]x

xbarvb[a_,b_]=((Myvb[a,b])/(Mvb[a,b]))
ybarv[a_,b_]=((Mxvb[a,b])/(Mvb[a,b]))

Observe that the formulas for the mass and moments of the lamina are no longer elementary.  Here is a table of numerical values for these quantities assuming various choices for a and b:

umassb=TableForm[Table[Mvb[a,b],{a,1,3},{b,1,3}],
TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"}}];
uxmomentb=TableForm[ Table[Mxvb[a,b]  ,{a,1,3},{b,1,3}] ,
TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"}}];
uymomentb=TableForm[ Table[Myvb[a,b]  ,{a,1,3},{b,1,3}]  ,
TableHeadings->{{"a=1","a=2","a=3"},{"b=1","b=2","b=3"}}];
TableForm[N[{umassb,uxmomentb,uymomentb}],TableHeadings->{{"Mass","x-moment","y-moment"},{}}]

The coordinates for the center of mass are

centermassvb=N[Table[{((Myvb[a,b])/(Mvb[a,b])),((Mxvb[a,b])/(Mvb[a,b]))},{a,1,3},{b,1,3}]]

Here is a plot showing the two centers of mass with for uniform and variable density.

plot4b[a_,b_]:=Plot[f[x,a,b],{x,-a,a},PlotRange->{{-8,8},{-1,8}},AspectRatio->Automatic,Filling->Axis];
plot5b[a_,b_]:=ListPlot[{{((Myvb[a,b])/(Mvb[a,b])),((Mxvb[a,b])/(Mvb[a,b]))}},PlotStyle->{Green,PointSize[0.02]}]
plotvb[a_,b_]:=Show[plot4b[a,b],plot5b[a,b]]

Important Note:  If you are reading the printed version of this publication, then you will not be able to view any of the animations generated from the Animate command in this chapter.  If you are reading the electronic version of this publication formatted as a Mathematica Notebook, then evaluate each Animate command to view the corresponding animation.  Just click on the arrow button to start the animation.  To control the animation just click at various points on the sliding bar or else manually drag the bar.

Animate[plotvb[a,b],{a,1,8},{b,1,8}]

Exercises

1.  Suppose a lamina is lying underneath the graph of y=1+(x^2) over the interval [0,2] .
a) Assume the density of the lamina is ρ=3. Find the mass, moments, and the center of mass of the lamina. 
b) Assume the density of the lamina is ρ=2x. Find the mass, moments, and the center of mass of the lamina. 
c) Plot the lamina and the center of mass on the same axes for both parts a) and b) above.

2.  Suppose a lamina of constant density ρ=2 is in the shape of the astroid  (x^(2/3)) + (y^(2/3))=1.  Find its mass, moments, and center of mass.  Plot the lamina with its center of mass.