Chapter 6 Applications of the IntegralEvaluating integrals can be tedious and difficult. Mathematica makes this work relatively easy. For example, when computingthe area of a region the corresponding integral can be difficult to set up because the limits of integration are not known. Mathemat-ica, with its powerful plotting capability, can turn this job into a very doable one. We will examine several applications thatdemonstrate this.
ü 6.1 Area Between Curves
Students should read Section 6.1 of Rogawski's Calculus [1] for a detailed discussion of the material presented in thissection.
Let us consider the problem of finding the area between two curves.
Example 6.1. Determine the area of the region bounded between the curves f x = sin x and gx = csc2 x on p 4, 3 p 4.Solution: To find the area here, we first plot the graphs of f and g.
Clearf, gfx_ : Sinxgx_ : Cscx^2
Plotfx, gx, x, 4, 3 4,PlotStyle Red, Blue, PlotRange .5, 2.5,Filling 1 2
Looking at the plot above and recalling that csc x is always greater than or equal to 1 on this interval, it follows that csc2 x isalways greater than or equal to sin x, which is less than or equal to 1 on the same interval. Hence, calculating the area betweenthese two curves between x = p 4 and x = 3 p 4 is straightforward:
4
3 4
gx fx x
2 2
N0.585786
Example 6.2. Determine the area of the region enclosed between the curves f x = xx2 - 3 x + 3 and gx = x2.
Solution: To find the area between these two curves, we will need to see if they intersect and if so where by plotting their graphs.
Clearf, g, xfx_ : x x2 3 x 3gx_ : x2
Plotfx, gx, x, 2, 4,
PlotStyle Red, Blue, PlotRange 2, 11,Filling 1 2
Notice that f x is graphed in red, while gx is graphed in blue. Also, the "Filling" option in the Plot command fills in theregion between the two graphs (functions 1 and 2 in the Filling command) in gray. The bounded region between the two curvesseems to lie between x = 0 and x = 3. To ascertain this, we solve for the intersection points:
Solve fx gx, xx 0, x 1, x 3
Hence, the intersection points are at x = 0, 1, and 3. Noting that f x is greater than gx on [0, 1] and gx is greater than f xon [1, 3], we need two integrals to calculate the (physical) area between the two curves since areas are always calculated by
subtracting the smaller function from the larger one. In particular, on 0, 1 the area is given by 0
1 f x - gx „ x and on 1, 3the area is given by 1
3gx - f x „ x.
0
1
fx gx x 1
3
gx fx x
37
12
N3.08333
Example 6.3. Determine the area of the region bounded between the curves f x = x and gx = cos x on -p 2, p 2.Solution: To find the area here, we first plot the graphs of f and g.
Clearf, g
2 Chapter 6.nb
fx_ : Absxgx_ : CosxPlotfx, gx, x, 2, 2,
PlotStyle Red, Blue, PlotRange 1, 2,
Filling 1 2
From the picture above, we will need to consider the total area as a sum of three separate regions. To this end, we first find the
intersection points of these two curves in order to obtain the limits of integration. Make note of the fact that the Solve command
does not work here because it is only able to solve algebraic equations. Instead, we use the FindRoot command to solve theequation f x - gx = 0 using an initial guess of x = 0.75 (based on the plot above):
FindRootfx gx, x, 0.75x 0.739085
Thus our root is approximately x = 0.739085. By symmetry we see there is another root at x = -0.739085. Hence, the areabetween these two curves is the sum of the three integrals:
2
0.739085
fx gx x 0.739085
0.739085
gx fx x 0.739085
2
fx gx x
2.06936
Hence the area of our bounded region is 2.06936.
NOTE: Observe that our region is symmetric about the y-axis and thus the same answer could have been found by computing thearea of only half the region (the right half, say) and doubling the result.
ü Exercises
1. Find the area between the curves y = sin x and y = sin 2 x between x = 0 and x = p.
2. Find the area between the graphs of x = sin y and x = 1 - cos y between y = 0 and y = p 2.
3. Find the area above y = 1 - x p and below y = sin x.
ü 6.2 Average Value
Students should read Sections 6.2 and 6.3 of Rogawski's Calculus [1] for a detailed discussion of the material presented inthis section.
Chapter 6.nb 3
Remember that the average value of a function f x on a, b is defined as
fave =1
b-a a
bf x „ x.
Related to this notion is the Mean Value Theorem for Integrals (MVTI), which states that for any continuous function f x ona, b there exists a value c œ a, b such that
f c = fave.
Example 6.4. Let f x = 2 cos x - x.a) Find the only positive root a of f .b) Calculate the average value of f on 0, a.c) Determine a value c that satisfies the Mean Value Theorem for Integrals on 0, a.Solution:
a) To calculate a, we first plot the graph of f and then use the FindRoot command with x = 1 as our initial guess:
Clearffx_ : 2 Cosx x
Plotfx, x, ,
-3 -2 -1 1 2 3
-5
-4
-3
-2
-1
1
2
root FindRootfx, x, 1x 1.02987
Therefore, a = 1.02987 accurate to 5 decimal places.
b) We next calculate the average value of f on 0, a: root1, 21.02987
fave 1
0
0
fx x
1.14981
Thus, the average value is approximately fave = 1.14981.
c) By MVTI, there exists a value c œ 0, a such that f c = fave. To find c, we solve this equation for c, or equivalently,
f c - fave = 0.
4 Chapter 6.nb
FindRootfc fave, c, .5c 0.55256
ü Exercises
1. Which of f x = x sin2 x and gx = x2 sin2 x has a larger average value over 0, 2? Over 2, 4?2. Let fave denote the average value of f x = x3 + x2 + 5 on 0, 4. Find a value for c inside 0, 4 such that f c = fave.
ü 6.3 Volume of Solids of Revolution
Students should read Sections 6.2-6.4 of Rogawski's Calculus [1] for a detailed discussion of the material presented in thissection.
We recall that a definite integral can be evaluated by employing the definition
a
bf x „ x = lim
nØ+¶i=1
n f xi*D xi.
Another application of the definite integral involves finding the volume of a solid of revolution, that is, a solid obtained byrevolving a region in the plane about one of the coordinate axes.
ü 6.3.1 The Method of Discs
Let S be a solid of revolution obtained by revolving the region bounded by the graphs of y = f x, y = 0, and the vertical linesx = a and x = b, about the x-axis. To obtain the volume of S, we can approximate S by discs, i.e., cylinders obtained by revolv-ing each rectangle, constructed by a Riemann sum of f relative to a partition P = x0, x1, x2, .... , xn of a, b, about the x-axis.Using the fact that the volume of a cylinder with radius R and height h is given by
V = p R2 h,
it follows that the volume of the ith cylinder (corresponding to the ith rectangle) is Vi = p f xi*2 D x. Hence, an approximation
to the volume of S is given by the Riemann sum
VolS ºi=1n Vi = pi=1
n f xi*2 D x.
In the limit as nض, we obtain the exact volume of S:
VolS = p limnضi=1n f xi
*2 D x = p a
b f x2 „ x.
NOTE: If the region is revolved about the y-axis, then the volume of S is given by
VolS = p cd f y2 „ y.
Example 6.5. Find the volume of the solid of revolution obtained by rotating the region bounded by the graph of f x = x , thex-axis, and the vertical line x = 3.
Solution: We define f x in Mathematica and illustrate both the region and rectangles that are rotated to obtain the solid anddiscs, respectively. For this, we recall our program from Chapter 5 of this manual that was used to draw these rectangles.
Chapter 6.nb 5
LEPTf_, a_, b_, n_ : Moduledx, k, xstar, lrect, plot,dx Nb a n;xstar Tablea i dx, i, 0, n;
lrect TableLinexstari, 0, xstari, fxstari ,xstari 1, fxstari , xstari 1, 0, i, 1, n;
plot Plotfx, x, a, b, Filling Axis;Showplot, GraphicsGreen, lrect
fx_ : x
plot LEPTf, 0, 3, 20
The plot above shows our region shaded in gray and our rectangles outlined in green. We now rotate this shaded region about
the x-axis to obtain a solid of revolution called a paraboloid. This is achieved in Mathematica using the Revolution-
Plot3D[{f,x},{x,a,b}] command, which generates a surface of revolution having radius f at height x. This means that the verticalaxis shown in the plot below is actually the x-axis.
6 Chapter 6.nb
S RevolutionPlot3D x , x, x, 0, 3
The exact volume of the paraboloid is then given by
V 0
3
fx2 x
9
2
ü 6.3.2 The Method of Washers
For a solid of revolution S generated by revolving a region bounded between two curves f x and gx on a, b about the x-axis,we employ washers (rings) instead of discs. Refer to your calculus textbook for a detailed treatment. The corresponding volumeof S is given by (let's assume gx ¥ f x)
VolS = p a
bgx2 - f x2 „ x.
Example 6.6. Find the volume of the solid generated by revolving about the x-axis the region enclosed by the parabola y = x2 + 1and the straight line y = x + 3.
Solution: Our initial goal is to find the points of intersection and secure the limits of integration.
Clearf, g, xfx_ : x2 1
gx_ : x 3
Chapter 6.nb 7
Plotfx, gx, x, 2, 4, PlotStyle Red, Blue,
PlotRange 2, 8, Filling 1 2
We notice that f x is graphed in red, while gx is graphed in blue. The following command solves for their intersection points:
Solvefx gx, xx 1, x 2
One can easily verify that the intersection points are -1, 2 and 2, 5. Thus, our limits of integration are x = -1 and x = 2.
Let P and Q denote the solids of revolution by revolving each of the regions lying under f and g, respectively, along the interval-1, 2. Our solid S, obtained by rotating the region between f and g on -1, 2 about the x-axis, can then be viewed as thedifference of Q and P, i.e., the solid Q with the solid P removed from it. Following are surface plots of the three solids P, Q, andS. Again, note that the vertical axis shown in each of the plots below is actually the x-axis.
8 Chapter 6.nb
P RevolutionPlot3Dfx, x, x, 1, 2, AspectRatio AutomaticQ RevolutionPlot3Dgx, x, x, 1, 2, AspectRatio Automatic
Chapter 6.nb 9
S ShowP, Q
Since the curve y = f x = x + 3 is lower than the curve y = gx = x2 + 1, it follows that the volume of S is given by
V 1
2
gx2 fx2 x
117
5
Observe that in the above discussion, the methods for calculating volumes of solids of revolution were via discs and washers. Inother words, the element of volume is obtained by taking the rectangular element of area whose height is perpendicular to theaxis of revolution and revolving it to construct a disc or washer.
ü 6.3.3 The Method of Cylindrical Shells
Students should read Section 6.4 of Rogawski's Calculus [1] for a detailed discussion of the material presented in thissection.
Another approach to finding the volume of a solid of revolution is to approximate it using cylindrical shells in contrast to discs(or washers). Recall that a cylindrical shell element is one that is obtained by revolving a rectangular element of area whoseheight is parallel to the axis of revolution.
A cylindrical shell is by definition a solid contained between two concentric cylinders having the same axis of rotation. Supposea cylindrical shell has inner radius r1, outer radius r2, and altitude h, then its volume V is given by
V = p r22 h - p r1
2 h = 2 p h r2+r1
2 r2 - r1 = 2 p r hD x,
where r = r2 + r1 2 is the average radius and D x =r2 - r1.
Let S denote denote the solid obtained by revolving the region bounded between a function f x, the x-axis, x = a, and x = b,about the y-axis. The volume of the ith shell corresponding to the ith rectangle is defined to be Vi = 2 p xi
* f xi*D x, where
xi* = xi + xi-1 2. Hence, an approximation to the volume of S is given by the Riemann sum
10 Chapter 6.nb
VolS ºi=1n Vi = 2 pi=1
n xi* f xi
*D x.
In the limit as nض, we obtain the exact volume of S:
VolS = 2 p limnضi=1n xi
* f xi*D x = 2 p a
bx f x „ x.
NOTE: If the region is revolved about the x-axis using cylindrical shells, then the volume of S is given by
VolS = 2 p c
dy f y „ y.
Example 6.7. Consider the region bounded by the curve y = x2, the x-axis, and the line x = 2. Find the volume of the solidgenerated by revolving this region about the y-axis using the method of cylindrical shells.
Solution: Let us first plot the region bounded by the given curves (shaded in the plot below):
fx_ x^2;
Plotfx, x, 0, 2, Filling Axis
We then revolve this shaded region about the y-axis to obtain our solid S (parabolic bowl). This can be seen in the three plotsfollowing, which illustrate S as the difference of the solids Q (cylinder) and P (paraboloid), that is, Q with P removed from it.
Chapter 6.nb 11
P RevolutionPlot3Dfx , x, 0, 2Q RevolutionPlot3D2, y , y, 0, 4
12 Chapter 6.nb
S ShowP, Q
The volume of S is given by
V 2 0
2
x fx x
8
NOTE: The volume in this example can also be calculated using the washer method. However, one would first have to solve the
equation y = x2 for x, yielding x = y . Moreover, the limits of integration (with respect to y) would have to be determined,which in this case would be y = 0 and y = 4 corresponding to x = 0 and x = 2, respectively. Hence,
V 0
4
22 y 2
y
8
The two answers from both methods agree as they should.
Example 6.8. Sketch the ellipse x2
a2+
y2
b2= 1 and find the volume of the solid obtained by revolving the region enclosed by the
ellipse about the x-axis.
Solution: We will use the ContourPlot command to plot the ellipse for a = 2 and b = 3. The reader should experiment withother values of a and b.
Chapter 6.nb 13
a 2;
b 3;
ContourPlot x2
a2
y2
b2 1, x, a 1, a 1, y, b 1, b 1,
AspectRatio Automatic, Axes True, Frame False
-3 -2 -1 1 2 3
-4
-2
2
4
To plot the corresponding solid of revolution (ellipsoid), we first solve x2
a2+
y2
b2= 1 for y.
Cleara, b
sol Solve x2
a2
y2
b2 1, y
y b a2 x2
a, y
b a2 x2
a
The positive and negative solutions above correspond to the upper half and lower half, respectively, of the ellipse. We shallconsider the upper half in plotting the ellipsoid and computing its volume by defining
f x = b2 - b2 x2
a2= b 1 - x2
a2.
fx_ sol2, 1, 2
b a2 x2
a
Here is a plot of S (rotated 90 degrees about the x-axis).
14 Chapter 6.nb
a 2;
b 3;RevolutionPlot3Dfx, x , x, a, a
To find the volume of the ellipsoid, we can employ either method, disc or shell, but in this case the disc method is preferable
from a computational standard. This is because the disc formula for volume contains the square term f x2, which lets us avoidhaving to deal with radical terms if the shell method were used. Since the ellipsoid is defined along the integral -a, a, itsvolume based on the disc method is therefore
V a
a
fx2 x
24
More generally, the volume of the ellipsoid for arbitrary positive values of a and b is given by
Cleara, bV
a
a
fx2 x
4
3a b2
Thus, V = 4
3p a b2.
NOTE: If we let a = b, then the ellipsoid becomes a sphere and the formula above reduces to the classic formula V = 4
3p a3,
where a is the radius of the sphere.
ü Exercises
1. Plot the solid of revolution obtained by rotating the region enclosed by the graphs about the given axis and calculate itsvolume.
Chapter 6.nb 15
a) y = 9
x2, y = 10 - x2 about the x-axis
b) y = 16 - x4, y = 0, x = 2, x = 3 about the y -axis
2. Plot the hypocycloid x23 + y23 = 1 and find the volume of the solid obtained by revolving the region enclosed by the hypocy-cloid about the y-axis. Is the volume of the solid obtained by revolving the same region about the x-axis the same? Justify your
answer. (Hint: Use the ContourPlot command.)
3. Use the Shell Method to find the volume of the solid obtained by rotating the region enclosed by the graphs in each part belowabout the y-axis.a) y = x2, y = 8 - x2, and x = 0
b) y = 1
2x2and y = sinx2
4. The solid generated by revolving the region between the two branches of the hyperbola y2 - x2 = 1 from x = -a to x = a aboutthe x-axis is called a hyperboloid. Find the volume of the hyperboloid for a = 2 and then for any arbitrary value of a.
16 Chapter 6.nb