Triple Integrals

Amy Zhao & Christine Tsu

Learning Objective: The goal of this lesson is to learn and explore triple integrals. We will first look at triple integrals in rectangular coordinates before applying the concept to cylindrical and polar coordinates.

Concept: Triple Integrals in Rectangular Coordinates

Double Integral Review

We already know how to use double integrals to find the area of a region. This can be represented as the following equation for area A, where R is the two-dimensional domain and dA = dxdy or dydx:

Style[TraditionalForm[HoldForm["A =(Underscript[∫∫, R])\[DifferentialD]A"==Integrate["",{y,c,d},{x,HoldForm[Subscript[h,1]"(y)"],HoldForm[Subscript[h,2]"(y)"]}]]],FontFamily->"Times",20]

We can think of this as “sweeping” out an area in two directions, one for dx, and one for dy. As a simple example, if we’d like our region to be the rectangle R = [0,3] x [0,2], we can write our integral as the following:

Style[TraditionalForm[HoldForm["A "==Integrate["",{y,0,2},{x,0,3}]== Integrate["",{x,0,3},{y,0,2}]]],FontFamily->"Times",20]

The Manipulate below demonstrates how this area is swept out in both directions.

Manipulate[
RegionPlot[0<=x<=i&&0<=y<=j,{x,0,4},{y,0,3},PlotPoints->50,MaxRecursion->3,Frame->False,Axes->True,AxesLabel->{x,y},PlotLabel->Style[TraditionalForm[HoldForm[Integrate[" ",{y,0,2},{x,0,3}]]],FontFamily->"Times",20]]
,
{{i,0.01,"x direction"},0.01,3},
{{j,0.01,"y direction"},0.01,2}]

Triple Integral Introduction

Triple integrals extend this concept to three dimensions. “Sweeping” in the dx, dy, and dz directions allows us to find volume. If E is our three-dimensional domain, we can represent this as:

Style[TraditionalForm[HoldForm["V =\!\(\*FormBox[RowBox[{UnderscriptBox[RowBox[{"∫", RowBox[{"∫", RowBox[{"∫", " "}]}]}], "E"], " ", RowBox[{"\[DifferentialD]", StyleBox["V",FontSlant->"Italic"]}]}],TraditionalForm]\)"==Integrate["",{x,a,b},{y,HoldForm[Subscript[h,1]"(y)"],HoldForm[Subscript[h,2]"(y)"]},{z,HoldForm[Subscript[g,1]"(x, y)"],HoldForm[Subscript[g,2]"(x, y)"]}]]],FontFamily->"Times",20]

Using our previous example, we can add a third dimension by extending the rectangle to a box E = [0,3] x [0,2] x [0,1]. The following TabView depicts this idea. The “xy-plane,” “yz-plane,” and “xz-plane” tabs show projections of the solid onto those respective planes.

TabView[{
"xyz-space"->Manipulate[
RegionPlot3D[0<=x<=i&&0<=y<=j&&0<=z<=k,{x,0,4},{y,0,3},{z,0,2},Mesh->All,PlotPoints->30,AxesEdge->{-1,-1},Boxed->False,AxesLabel->{x,y,z},RotationAction->"Clip",PlotLabel->Style[TraditionalForm[HoldForm[Integrate[" ",{z,0,1},{y,0,2},{x,0,3}]]],FontFamily->"Times",20]],
{{i,0.01, "x direction"},0.01,3},
{{j,0.01, "y direction"},0.01,2},
{{k,0.01,"z direction"},0.01,1}
],
"xy-plane"->RegionPlot[0<=x<=3&&0<=y<=2,{x,0,4},{y,0,3},PlotPoints->30,MaxRecursion->2,Frame->False,Axes->True,AxesLabel->{x,y},PlotStyle->Directive[Red,Opacity[0.3]],BoundaryStyle->Gray],
"yz-plane"->RegionPlot[0<=y<=2&&0<=z<=1,{y,0,4},{z,0,3},PlotPoints->30,MaxRecursion->2,Frame->False,Axes->True,AxesLabel->{y,z},PlotStyle->Directive[Orange,Opacity[0.3]],BoundaryStyle->Gray],
"xz-plane"->RegionPlot[0<=x<=3&&0<=z<=1,{x,0,4},{z,0,3},PlotPoints->30,MaxRecursion->2,Frame->False,Axes->True,AxesLabel->{x,z},PlotStyle->Directive[Yellow,Opacity[0.3]],BoundaryStyle->Gray]}]

Changing the Order of Integration

Recall that with double integrals, we can choose to integrate dxdy or dydx. In rectangular coordinates, there is a total of six possible orders of integration: dxdydz, dxdzdy, dydzdx, dydxdz, dzdydx, and dzdxdy. In the above example, we chose dxdydz, but we could just as easily have chosen any of the other orders of integration and adjusted the bounds to fit the new order.

Solving Triple Integrals

We solve triple integrals in the same way we would solve double integrals — by solving the inner integral and working our way out. For instance, in our box example, we would first integrate dx, then dy, and finally dz as follows:

Style[TraditionalForm[HoldForm[Integrate[" ",{z,0,1},{y,0,2},{x,0,3}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[x*Grid[{{3},{0}},Dividers->{{True,False},False}],{z,0,1},{y,0,2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[3,{z,0,1},{y,0,2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[3y * Grid[{{2},{0}},Dividers->{{True,False},False}],{z,0,1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[6,{z,0,1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==6z * Grid[{{1},{0}},Dividers->{{True,False},False}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==6]],FontFamily->"Times",20]

Because our example was so simple, we can easily check our work. The volume should be 3(2)(1) = 6, which is the answer we arrived at using the triple integral.

Density

We can use a function w = f(x, y, z) to represent the value of a certain quantity w at the point (x, y, z). This quantity w adds a fourth dimension and could represent, for instance, density or temperature, both of which might vary at every point in 3-space. If we say that the function f(x, y, z) represents density ρ, then using it as the integrand of a triple integral will allow us to calculate mass m, as we are essentially multiplying the density by the volume:

Style[TraditionalForm[HoldForm["m"=="\!\(\*FormBox[RowBox[{UnderscriptBox[RowBox[{"∫", RowBox[{"∫", RowBox[{"∫", " "}]}]}], "E"], " ", RowBox[{"ρ", "(", RowBox[{"x", ",", "y", ",", "z"}], ")"}], RowBox[{"\[DifferentialD]", StyleBox["V",FontSlant->"Italic"]}]}],TraditionalForm]\)"]],FontFamily->"Times",20]

Suppose that ρ(x, y, z) = x*y*z. Then, for example, the density at point (2, 3, 1) is ρ(2, 3, 1)=2+3+1=6 . We can create a plot of the density as follows:

DensityPlot3D[x*y*z,{x,-2,2},{y,-2,2},{z,-2,2},AxesEdge->{-1,-1},Boxed->False,AxesLabel->{x,y,z},RotationAction->"Clip",PlotLabel->Style[TraditionalForm[HoldForm[Style["\!\(TraditionalForm\`\(\(ρ(x, y, z)\)\(\\ \)\)\)",Italic]==x + y + z]],FontFamily->"Times",20]]

Let’s say we want to use this density function to calculate the mass of the box in our previous example. Our triple integral will be:

Style[TraditionalForm[HoldForm[Integrate["x + y + z",{z,0,1},{y,0,2},{x,0,3}]]],FontFamily->"Times",20]

Solving this out, we arrive at our answer of 18.

Examples: Triple Integrals in Rectangular Coordinates

Example 1

Problem: Rewrite the following integral  using the order dxdydz. Sketch.

Style[TraditionalForm[HoldForm[Integrate["",{x,0,2},{y,2x,4},{z,0,Sqrt[y^2-4x^2]}]]],FontFamily->"Times",20]

The TabView below plots the specified region in xyz-space so that we can see what the solid looks like. When switching the order of integration, considering the solid’s projections onto the coordinate planes will help us visualize and solve the problem.

TabView[{
"xyz-space"->
RegionPlot3D[ 2x<=y<=4&&0<=x<=2&&0<=z<=Sqrt[y^2-4x^2],{x,0,2},{y,0,4},{z,0,4},AxesEdge->{-1,-1},Boxed->False,AxesLabel->{x,y,z},PlotStyle->Directive[Purple,Opacity[0.3]],RotationAction->"Clip",AspectRatio->Automatic,PlotPoints->100,PlotRange->{{0,4},{0,4},{0,4}},Mesh->None]
,
"xy-plane"->RegionPlot[0<=x<=2&&2x<=y<=4,{x,0,4},{y,0,4},PlotPoints->30,MaxRecursion->2,Frame->False,Axes->True,AxesLabel->{x,y},PlotStyle->Directive[Red,Opacity[0.3]],BoundaryStyle->Gray,PlotRange->{{0,4},{0,4}}],
"yz-plane"->RegionPlot[0<=y<=4&&0<=z<=Sqrt[y^2],{y,0,4},{z,0,4},PlotPoints->30,MaxRecursion->2,Frame->False,Axes->True,AxesLabel->{y,z},PlotStyle->Directive[Orange,Opacity[0.3]],BoundaryStyle->Gray,PlotRange->{{0,4},{0,4}}],
"xz-plane"->RegionPlot[0<=z<=Sqrt[16-4x^2]&&0<=x<=2,{x,0,2},{z,0,4},PlotPoints->30,MaxRecursion->2,Frame->False,Axes->True,AxesLabel->{x,z},PlotStyle->Directive[Yellow,Opacity[0.3]],BoundaryStyle->Gray,PlotRange->{{0,4},{0,4}}]}]

From the visualizations, we can see that the solid is part of an elliptic cone that lies on the y-axis. Let’s first find an equation for it using the upper z bound.

Setting z equal to the upper bound:

Style[TraditionalForm[HoldForm[z==Sqrt[y^2-4x^2]]],FontFamily->"Times",20]

Squaring both sides:

Style[TraditionalForm[HoldForm[z^2==y^2-4x^2]],FontFamily->"Times",20]

Rearranging to get the final equation:

Style[TraditionalForm[HoldForm[z^2+4x^2-y^2==0]],FontFamily->"Times",20]

Because the problem asks for the order dxdydz, we first want to find the x bounds for integration. If we orient the solid so that the yz-plane lies horizontal at the bottom, we can think of the solid as a room, with the floor on the yz-plane, one wall on the xy-plane, and a ceiling formed by the elliptic cone. The x bounds will span the floor-to-ceiling height, so the bottom bound will be x = 0, and the top bound will be the elliptic cone written in terms of y and z.

Writing the elliptic cone’s equation in terms of y and z:

Style[TraditionalForm[HoldForm[4x^2==y^2-z^2]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[x==1/2Sqrt[y^2-z^2]]],FontFamily->"Times",20]

We can now move on to the y and z bounds. Since we have already specified the “height” using the x bounds, we can focus on the yz-plane, which, in our room analogy, will give us the floor.

Manipulate[
Show[
RegionPlot[z<=y<=4&&0<=z<=4,{y,0,4},{z,0,4},PlotPoints->50,MaxRecursion->3,Frame->False,AxesLabel->{y,z},Axes->True],
Graphics[{Red,Thickness[0.01],Arrowheads[0.07],Arrow[{{i,i},{4,i}}]}]]
,
{{i,0.01,"z direction"},0.01,4}]

Since dy appears before dz, we need to first define our y bounds in terms of z. In the Manipulate above, the left end of the arrow is the lower y bound, and the right end of the arrow is the upper y bound. Therefore, the line that forms the hypotenuse of the right triangle, or z = y, will be the lower bound, while y = 4 will be the upper bound. Finally, the z bounds will just be 0 to 4, as shown by the arrow’s movement in the z direction.

Putting it all together, our final answer for the integral using the order dxdydz is:

Style[TraditionalForm[HoldForm[Integrate["",{z,0,4},{y,z,4},{x,0,1/2Sqrt[y^2-z^2]}]]],FontFamily->"Times",20]

Example 2

Problem: Use a triple integral to calculate the volume of the solid bounded by the graphs of x + 2y + z = 2, x = 2y, x = 0, z = 0.

The TabView below shows the region bounded by the planes x + 2y + z = 2, x = 0, and z = 0 in light purple. The darker purple region results from the additional constraint of the x = 2y plane, so this is the solid whose volume we will be calculating. The other tab also includes the solid’s projection onto the xy-plane, which is a triangle.

TabView[{
"xyz-space"->
Show[{RegionPlot3D[0<=z<=2-x-2y && x/2<=y<=1-(x/2),{x,0,2},{y,0,2},{z,0,3},AxesEdge->{-1,-1},Boxed->False,AxesLabel->{x,y,z},PlotStyle->Directive[Purple,Opacity[0.3]],RotationAction->"Clip",AspectRatio->Automatic,PlotPoints->100,Mesh->None],
RegionPlot3D[0<=z<=2-x-2y ,{x,0,2},{y,0,2},{z,0,3},AxesEdge->{-1,-1},Boxed->False,AxesLabel->{x,y,z},PlotStyle->Directive[Purple,Opacity[0.2]],RotationAction->"Clip",AspectRatio->Automatic,PlotPoints->100,Mesh->None]}]
,
"xy-plane"->RegionPlot[x/2<=y<=1-(x/2),{x,0,2},{y,0,2},PlotPoints->30,MaxRecursion->2,Frame->False,Axes->True,AxesLabel->{x,y},PlotStyle->Directive[Red,Opacity[0.3]],BoundaryStyle->Gray]}]

Let’s use the order of integration dzdydx for this problem. We could choose another order, but this approach seems like it would be pretty straightforward. We can again think of the solid as a room, with the floor being the xy-plane. The ceiling would then be the plane x + 2y + z = 2. To find the z bounds, we will need to rearrange this equation for z in terms of x and y:

Style[TraditionalForm[HoldForm[x+2y+z==2]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[z==2-x-2y]],FontFamily->"Times",20]

Next, we need the y and x bounds. We can find these by looking at the solid’s projection onto the xy-plane, which is replicated below.

Manipulate[
Show[
RegionPlot[x/2<=y<=1-(x/2),{x,0,2},{y,0,2},PlotPoints->50,MaxRecursion->3,Frame->False,AxesLabel->{x,y},PlotStyle->Directive[Red,Opacity[0.3]],Axes->True],
Graphics[{Red,Thickness[0.01],Arrowheads[0.07],Arrow[{{i,i/2},{i,1-i/2}}]}]]
,
{{i,0.01,"x direction"},0.01,1}]

We will first find the y bounds. As seen above, the lower y bound is the intersection of the plane x = 2y with the xy-plane. Its equation is therefore just the line x = 2y, or y = (x/2). The upper bound is the intersection of the plane x + 2y + z = 2 with the xy-plane. To find the line’s equation, we can set z = 0 and rearrange for y in terms of x:

Style[TraditionalForm[HoldForm[x+2y==2]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[2y==2-x]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[y==1-x/2]],FontFamily->"Times",20]

Finally, we need the x bounds. As shown in the Manipulate above, the arrow simply goes from x = 0 to x = 1.

Our triple integral will then be:

Style[TraditionalForm[HoldForm[Integrate["",{x,0,1},{y,x/2,1-x/2},{z,0,2-x-2y}]]],FontFamily->"Times",20]

Solving the triple integral:

Style[TraditionalForm[HoldForm[Integrate[z * Grid[{{2-x-2y},{"0              "}},Dividers->{{True,False},False}],{x,0,1},{y,x/2,1-x/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[2-x-2y,{x,0,1},{y,x/2,1-x/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[(2y-xy-y^2) * Grid[{{1-x/2},{"(x/2)      "}},Dividers->{{True,False},False}],{x,0,1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[1-2x+x^2,{x,0,1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==(x-x^2+1/3x^3 )* Grid[{{1},{0}},Dividers->{{True,False},False}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==1/3]],FontFamily->"Times",20]

Exercises: Triple Integrals in Rectangular Coordinates

Exercise 1

Evaluate the iterated integral.

Style[TraditionalForm[HoldForm[Integrate[6xz,{z,0,1},{x,0,z},{y,0,x+z}]]],FontFamily->"Times",20]

Exercise 2

Evaluate the triple integral.

Style[TraditionalForm[HoldForm["\!\(\*FormBox[RowBox[{UnderscriptBox[RowBox[{"∫", RowBox[{"∫", RowBox[{"∫", " "}]}]}], "E"], "2", "x", RowBox[{"\[DifferentialD]", StyleBox["V",FontSlant->"Italic"]}]}],TraditionalForm]\), where E"=={"(x, y, z)"|0<=y<=2,0<=x<=Sqrt[4-y^2],0<=z<=y}]],FontFamily->"Times",20]

Exercise 3

Use a triple integral to find the volume of the tetrahedron enclosed by the coordinate planes and the plane 2x + y + z = 4.

Answers to Exercises

1. 1
2. 4
3. (16/3)

Concept: Triple Integrals in Cylindrical Coordinates

Reviewing Cylindrical/Polar Coordinates

Polar coordinates are typically written as (r, θ), with r being the radius or magnitude of the vector and θ as the angle between the positive x axis and the vector. As such the r value for the vector below is 1 and θ is (π/2). We will be using this format frequently in solving triple integrals with cylindrical coordinates.

Graphics[{
Arrow[{{0,0},{1,1}}],
Style[Text["r",{0.5,0.6}],FontFamily->"Times",FontSize->20],
Style[Text["θ",{0.25,0.1}],FontFamily->"Times",FontSize->20]
},Axes->True,PlotRange->1.5,AxesLabel->{x,y}]

Setting Up Bounds

The same concept of triple integrals applies in cylindrical as well, in the ways that we bound them and solve them (from inside out).

Using the same concept as rectangular coordinates to find the bounds, we can convert rectangular problems to cylindrical or spherical to make them easier to solve. This is the conversion table for x, y, z, and dV.

Style[TraditionalForm[Grid[{{"rectangular","cylindrical","spherical"},
{x,"rcosθ","ρsinΦcosθ"},
{y,"rsinθ","ρsinΦsinθ"},
{z,"z","ρcosΦ"},
{"\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x","r\[DifferentialD]r\[DifferentialD]θ","(ρ^2)sinΦ\[DifferentialD]ρ\[DifferentialD]Φ\[DifferentialD]θ"}
},Frame->All]],FontFamily->"Times",20]

This TabView shows a sector of a hollowed out cylinder. Looking at the xy-plane, we see that our region is the area in between two concentric circles when x is bounded by 0 and 1. Since the projection is a circle, cylindrical coordinates are going to be much easier to work with than rectangular. Based on our knowledge of r and θ as well as the manipulate, r extends from 0.5 to 1 while θ extends from 0 to (π/2). Looking at the xyz-space tab, the z values extend from -1 to 0.

TabView[{
"3D solid"->RegionPlot3D[1>=x^2+y^2 && .3<=x^2+y^2,{x,0,2},{y,0,2},{z,-1,0},PlotPoints->50,Mesh->None,PlotStyle->Directive[Darker@Red,Specularity[1]],PlotRange->1.5,ViewPoint->{-1.5,-1.5,1},Axes->True,AxesLabel->{x,y,z},AxesEdge->{-1,-1},Boxed->False],
"xy-plane"->Manipulate[Show[
PolarPlot[1,{t,0,Pi/2},PlotRange->1.5,Axes->True,AxesLabel->{x,y}],PolarPlot[.5,{t,0,Pi/2},PlotRange->1.5,Axes->True,AxesLabel->{x,y}],
Graphics[{
Hue[0.9, 1,1,.8],Thick,Arrow[{{0,0.5},{0,radius}}],
Hue[0.15, 1,1,1],Thick,GeometricTransformation[Arrow[{{0.5,0},{1,0}}],RotationTransform[theta]],
Frame->True}]],
{{radius,1},0.5,1},
{{theta,0},0,Pi/2}],
"xyz-space"->Manipulate[Show[
RegionPlot3D[1>=x^2+y^2 && .3<=x^2+y^2,{x,0,2},{y,0,2},{z,-1,0},Mesh->None,PlotStyle->Directive[Darker@Red,Specularity[1],Opacity[.5]],PlotRange->1.5,ViewPoint->{-1.5,-1.5,1},Axes->True,AxesLabel->{x,y,"z"},AxesEdge->{-1,-1},Boxed->False],
Graphics3D[{
Hue[0.6, 1,1,1],Thick,Arrowheads[0.04],Arrow[{{0.5,0.5,-1},{0.5,0.5,z}}],Frame->True}]],
{{z,-1},-1,0}
]}]

Solving Triple Integrals in Cylindrical Coordinates

Referring to the conversion table above, dV will become rdrdθ. Now that we have the bounds of the region, we can set up the integral for the problem and evaluate.

Style[TraditionalForm[HoldForm[Integrate[r,{θ,0,Pi/2},{r,1/2,1},{z,-1,"" 0}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate["r z"* Grid[{{0},{-1}},Dividers->{{True,False},False}],{θ,0,Pi/2},{r,1/2,1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[r,{θ,0,Pi/2},{r,1/2,1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[((r^2)/2)* Grid[{{1},{1/2}},Dividers->{{True,False},False}],{θ,0,Pi/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[3/8,{θ,0,Pi/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[""==Integrate[r,{θ,0,Pi/2},{r,1/2,1},{z,-1,"" 0}]],FontFamily->"Times",20]

Examples: Triple Integrals in Cylindrical Coordinates

Example 1

Problem: Convert to cylindrical and solve:

Style[TraditionalForm[HoldForm[Integrate[Sqrt[x^2+y^2+z^2],{x,0,1},{y,0,Sqrt[1-x^2]},{z,0,Sqrt[1-x^2-y^2]}]]],FontFamily->"Times",20]

First, we can try to visualize the specified region in 3D by rearranging the equation for the upper z bound.

Style[TraditionalForm[HoldForm[z==Sqrt[1-x^2-y^2]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[z^2==1-x^2-y^2]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[x^2+y^2+z^2==1]],FontFamily->"Times",20]

From this equation, we can clearly see that our region is a section of the sphere of radius 1 centered at the origin. More specifically, it will be a quarter sphere in the first octant. The TabView below shows the sphere, along with the projections onto the xy-plane and the rz-plane.

TabView[{
"sphere in 3D"->Graphics3D[{
{Darker@Red,Specularity[1],Opacity[0.3],Sphere[{0,0,0},1]},
{Darker@Red,Specularity[1],Opacity[0.3],Cylinder[{{0,0,0},{0,0,0.01}},1]},
{Hue[0.6, 1,1,1],Thick,Arrowheads[0.04],Arrow[{{0,0,0},{0,0,1}}]}
},AxesLabel->{x,y,z},PlotRange->1.5,AxesOrigin->{0,0,0},Axes->True,Boxed->False,AxesEdge->{-1,-1}],
"xy-plane"->Show[{
RegionPlot[y^2<=1-x^2,{x,0,1},{y,0,1},PlotRange->2,Axes->True,Frame->False,AxesLabel->{x,y}],
Graphics[{
Style[Text["r",{1/4,1/2}],FontFamily->"Times",15],
Style[Text["θ",{0.25,0.1}],FontFamily->"Times",FontSize->20],
Arrow[{{0,0},{Sqrt[2]/2,Sqrt[2]/2}}]}]}],
"rz-plane"->Show[{
RegionPlot[y^2<=1-x^2,{x,0,1},{y,0,1},PlotRange->2,Axes->True,Frame->False,AxesLabel->{r,z}],
Graphics[{Arrow[{{1/2,0},{1/2,0.87}}]}]}]
}]

We know that (x^2) + (y^2) = (r^2), so we can convert the integrand as follows:

Style[TraditionalForm[HoldForm[Sqrt[x^2+y^2+z^2]==Sqrt[r^2+z^2]]],FontFamily->"Times",20]

Now, let’s move on to the bounds. For cylindrical coordinates, we want to convert our rectangular x and y bounds to r and θ bounds, which is essentially polar coordinates. We can use the above graph of the xy-plane to complete this task. We have a quarter circle of radius 1 in the first quadrant, so this corresponds to r bounds of 0 to 1 and θ bounds of 0 to (π/2).

Finally, we need the z bounds. If we look at the RegionPlot3D of the sphere, we can see the circle in the xy-plane that we have already covered. The blue arrow represents the z bounds that we need to find. Let’s look at the graph of the rz-plane. This represents the area that must be “swept” out through the angle θ to cover the entire volume. The black arrow represents the z bounds.

The original lower z bound in rectangular was 0, and it will also be 0 for cylindrical coordinates. The upper z bound can be converted from rectangular to cylindrical in a simple step, using the fact that (x^2) + (y^2) = (r^2):

Style[TraditionalForm[HoldForm[z==Sqrt[1-x^2-y^2]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[z==Sqrt[1-r^2]]],FontFamily->"Times",20]

Combining all of our previous work, we can write the integral.

Style[TraditionalForm[HoldForm[Integrate[Sqrt[r^2+z^2] r,{θ,0,Pi/2},{r,0,1},{z,0,Sqrt[1-r^2]}]]],FontFamily->"Times",20]

To make this integral easier to solve, we can change the order of integration from rdzdrdθ to rdrdzdθ. This will allow us to use a simple u-substitution. Using the same rz-plane visualization, we see that, in order to cover the same area, r will simply go from 0 to (Sqrt[1-(z^2)]) while z goes from 0 to 1.

Style[TraditionalForm[HoldForm[Integrate[Sqrt[r^2+z^2] r,{θ,0,Pi/2},{z,0,1},{r,0,Sqrt[1-z^2]}]]],FontFamily->"Times",20]

U-substitution:

Column[{Style[TraditionalForm[HoldForm[u==r^2+z^2]],FontFamily->"Times",20],Style[TraditionalForm[HoldForm[\[DifferentialD]u==2r\[DifferentialD]r]],FontFamily->"Times",20]},Spacings->1]

Style[TraditionalForm[HoldForm[Integrate[1/2 Sqrt[u] ,{θ,0,Pi/2},{z,0,1},{u,z^2,1}]]],FontFamily->"Times",20]

Solving out the integral:

Style[TraditionalForm[HoldForm[""==Integrate[""HoldForm[1 /3 * u^(3/2) ]Grid[{{1},{z^2}},Dividers->{{True,False},False},Alignment->Left],{θ,0,Pi/2},{z,0,1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==1/3Integrate[1-z^3 ,{θ,0,Pi/2},{z,0,1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==1/3Integrate[""HoldForm[z-1 /4 z^4 ]Grid[{{1},{0}},Dividers->{{True,False},False},Alignment->Left],{θ,0,Pi/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[""== (π/8)] ,FontFamily->"Times",20]

Example 2

Problem: Use a triple integral to evaluate the volume of the circular paraboloid 4-(x^2)-(y^2)=z from 0 ≤ z ≤ 4.

The TabView shows the circular paraboloid bounded by the planes z = 0 and z = 4, which is the volume that will be calculated from this triple integral.

TabView[{
"3D solid"->RegionPlot3D[z<=-(x^2+y^2)+4,{x,-10,10},{y,-10,10},{z,0,4},PlotPoints->150,Mesh->None,PlotStyle->Directive[Darker@Red,Specularity[1]],PlotRange->{{-2.5,2.5},{-2.5,2.5},{-1,4.5}},ViewPoint->{4,-4,2},Axes->True,AxesLabel->{x,y,z},Boxed->False,AxesEdge->{-1,-1}],
"xy-plane"->Manipulate[Show[
PolarPlot[2,{t,0,2Pi},PlotRange->3,Axes->True,AxesLabel->{x,y}],
Graphics[{
Hue[0.9, 1,1,.8],Thick,Arrow[{{0,0},{0,radius}}],
Hue[0.15, 1,1,1],Thick,GeometricTransformation[Arrow[{{0,0},{2,0}}],RotationTransform[theta]]
,Frame->True}]],
{{radius,0.1},0.1,2},
{{theta,0},0,2Pi}],
"xyz-space"->Manipulate[Show[
RegionPlot3D[z<=-(x^2+y^2)+4,{x,-10,10},{y,-10,10},{z,0,4},PlotPoints->50,Mesh->None,PlotStyle->Directive[Darker@Red,Specularity[1],Opacity[.5]],PlotRange->4.5,ViewPoint->{4,-4,2},Axes->True,AxesLabel->{x,y,"z"},Boxed->False,AxesEdge->{-1,-1}],
Graphics3D[{
Hue[0.6, 1,1,1],Cylinder[{{0,0,4-z-0.05},{0,0,4-z}},Sqrt[Abs[z]]],Frame->True}]],
{{z,0},0,4}
]}]

Let’s use rdrdθ for this problem, but since this is in 3D, dV = rdzdrdθ. Looking at the xy-plane (z = 0), we see a circle in which r extends from 0 to 2 and θ extends from 0 to 2π. In order to find the bounds for the z direction, we are going to use the z = 0 plane and solve for z in terms of r. Since (x^2) + (y^2) = (r^2), we can rearrange the paraboloid equation for 4-(r^2)=z as the top bound; the bounds for z are 0 to 4-(r^2).  Now to construct our triple integral:

Style[TraditionalForm[HoldForm[Integrate[r,{θ,0,2Pi},{r,0,2},{z,0,"" 4-r^2}]]],FontFamily->"Times",20]

We solve this integral the same way we would solve a triple integral in rectangular:

Style[TraditionalForm[HoldForm[Integrate["r z"* Grid[{{4-r^2},{0}},Dividers->{{True,False},False},Alignment->Left],{θ,0,""2Pi},{r,0,""2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[4r-r^3,{θ,0,2Pi},{r,0,"" 2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[(2(r^2)- r^4/4)* Grid[{{2},{0}},Dividers->{{True,False},False}],{θ,0,"" 2Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[4,{θ,0,"" 2Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==4 θ* Grid[{{2Pi},{0}},Dividers->{{True,False},False}]]],FontFamily->"Times",20]

Style[TraditionalForm[""==Integrate[r,{θ,0,2Pi},{r,0,2},{z,0, 4-r^2}]],FontFamily->"Times",20]

Exercises: Triple Integrals in Cylindrical Coordinates

Exercise 1

Evaluate the triple integral.

Style[TraditionalForm[HoldForm[Integrate[(r^3),{θ,0,""2Pi},{r,0,""2},{z,r,""2}]]],FontFamily->"Times",20]

Exercise 2

Evaluate the triple integral by converting to cylindrical.

Style[TraditionalForm[HoldForm[Integrate[(xz),{y,-2,""2},{x,-Sqrt[4- y^2],""Sqrt[4- y^2]},{z,Sqrt[x^2 + y^2],""2}]]],FontFamily->"Times",20]

Exercise 3

Evaluate (Underscript[∫∫, E])∫(x^2)dV where E is enclosed by the planes z = 0, z = x + y + 5, and by the cylinders (x^2)+(y^2)= 4  and (x^2)+(y^2)= 9.

Answers to Exercises

1. ((16 π)/5)
2. 0
3. ((65 π)/4)

Concept: Triple Integrals in Spherical Coordinates

Reviewing Spherical Coordinates

Here is the same conversion table for x, y, z, and dV that we used for cylindrical coordinates.

Style[TraditionalForm[Grid[{{"rectangular","cylindrical","spherical"},
{x,"rcosθ","ρsinΦcosθ"},
{y,"rsinθ","ρsinΦsinθ"},
{z,"z","ρcosΦ"},
{"\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x","r\[DifferentialD]r\[DifferentialD]θ","(ρ^2)sinΦ\[DifferentialD]ρ\[DifferentialD]Φ\[DifferentialD]θ"}
},Frame->All]],FontFamily->"Times",20]

Let’s switch to the spherical coordinates tab. Evidently, ρ is the distance in xyz-space from the origin to the point, Φ is the angle between the positive z-axis and ρ, and θ is the angle from the positive x-axis to the xy-projection of ρ.

Graphics3D[{
Darker@Red,Specularity[1],Opacity[0.3],Sphere[{0,0,0},1],
Arrowheads[0.03],Arrow[{{0,0,0},{0,0,1}}],Arrow[{{0,0,0},{0,1,0}}],Arrow[{{0,0,0},{1,0,0}}],
Text["x",{1.05,0,0}],Text["y",{0,1.05,0}],Text["z",{0,0,1.05}],
Hue[0.6,1,1,1],Thick,Rotate[Arrow[{{0,0,0},{.5,.5,.5}}],Pi/4,{1,1,1}],
Thin,Line[{{0.5,0.5,0},{0.5,0.5,0.5}}],Line[{{0,0,0},{0.5,0.5,0}}],
Hue[0.9,1,1,1],Text["ρ",{0.55,0.55,0.55}],Text["Φ",{0.05,0.05,0.15}],Text["θ",{0.1,0.05,0}]
},Boxed->False,Axes->True,AxesEdge->{-1,-1},AxesLabel->{x,y,z}]

Setting Up Bounds

These graphics show a sphere, the ideal solid to work with in spherical coordinates. Since this is a sphere, it is easier to see the bounds in 3D.

TabView[{
"sphere in 3D"->Graphics3D[{
Darker@Red,Specularity[1],Sphere[{0,0,0},1]
},AxesLabel->{x,y,z},PlotRange->1.5,Axes->True,Boxed->False,AxesEdge->{-1,-1},ViewPoint->{-1.5,-1.5,1}],
"labeled in 3D"->Graphics3D[{
Darker@Red,Specularity[1],Opacity[0.3],Sphere[{0,0,0},1],
Arrowheads[0.03],Arrow[{{0,0,0},{0,0,1}}],Arrow[{{0,0,0},{0,1,0}}],Arrow[{{0,0,0},{1,0,0}}],
Text["x",{1.05,0,0}],Text["y",{0,1.05,0}],Text["z",{0,0,1.05}],
Hue[0.6,1,1,1],Thick,Rotate[Arrow[{{0,0,0},{.5,.5,.5}}],Pi/4,{1,1,1}],
Thin,Line[{{0.5,0.5,0},{0.5,0.5,0.5}}],Line[{{0,0,0},{0.5,0.5,0}}],
Hue[0.9,1,1,1],Text["ρ",{0.55,0.55,0.55}],Text["Φ",{0.05,0.05,0.15}],Text["θ",{0.1,0.05,0}]
},AxesLabel->{x,y,z},PlotRange->1.5,Boxed->False,AxesEdge->{-1,-1},Axes->True,ViewPoint->{-1.5,-1.5,1}]
}]

We see that our region is the volume bounded by the sphere with a ρ that extends from 0 to 1. Based on our knowledge of Φ and θ, Φ extends from 0 to π while θ extends from 0 to 2π. It is important to note that if θ extends from 0 to 2π,  then Φ only needs to extend from 0 to π  since Φ will be the area of the right half of a circle, so θ will circulate around the entire sphere for the full volume.

Solving Triple Integrals in Spherical Coordinates

Referring to the conversion table above, dV will become (ρ^2)sinΦdρdΦdθ. Now that we have the bounds of the region, we can set up the integral for the problem and evaluate.

Style[TraditionalForm[HoldForm[Integrate[(ρ^2)  sinΦ,{θ,0,"" 2Pi},{Φ,0,""Pi},{ρ,0,""1}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate["(1/3)"(ρ^3)sinΦ* Grid[{{1},{0}},Dividers->{{True,False},False}],{θ,0,"" 2Pi},{Φ,0,""Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate["(1/3)"  sinΦ,{θ,0,"" 2Pi},{Φ,0,""Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[(((-1)/3)  cosΦ)* Grid[{{Pi},{0}},Dividers->{{True,False},False}],{θ,0,Pi/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[2/3,{θ,0,"" 2Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[""==Integrate[(ρ^2) Sin[Φ],{θ,0,2Pi},{Φ,0,Pi},{ρ,0,1}]],FontFamily->"Times",20]

Examples: Triple Integrals in Spherical Coordinates

Example 1

Problem: Find the volume given by

Style[TraditionalForm[HoldForm[Integrate[(ρ^2)  sinΦ,{θ,0,"" 2Pi},{Φ,0,""Pi},{ρ,2,""5}]]],FontFamily->"Times",20]

From this TabView, the volume is in between the yellow and blue sphere (cut out for visualization purposes). In the spherical coordinates tab, we can see that ρ  will extend from the exterior of the inside sphere to the edge of the outside sphere.

TabView[{
"3D solid"->SphericalPlot3D[{2,5},{θ,0,Pi},{ϕ,0,3Pi/2},PlotLabels->Automatic,Boxed->False,AxesLabel->{x,y,z},AxesEdge->{-1,-1}],
"spherical coordinates"->Graphics3D[{
Yellow,Specularity[1],Opacity[0.5],Sphere[{0,0,0},1],
Black,Arrowheads[0.03],Arrow[{{0.5,0.5,0.5},{0.5,0.5,1}}],Arrow[{{0.5,0.5,0.5},{0.5,1,0.5}}],Arrow[{{0.5,0.5,0.5},{1,0.5,0.5}}],
Text["x",{1.05,0.5,0.5}],Text["y",{0.5,1.05,0.5}],Text["z",{0.5,0.5,1.05}],
Hue[0.6,1,1,1],Thick,Rotate[Arrow[{{0.5,0.5,0.5},{1,1,1}}],Pi/4,{1,1,1}],
Thin,Line[{{1,1,0.5},{0.5,0.5,0.5}}],Line[{{0.5,0.5,0.5},{1,1,0.5}}],
Hue[0.9,1,1,1],Text["ρ",{.75,.75,.85}],Text["Φ",{0.55,0.55,0.65}],Text["θ",{0.6,0.55,0.5}]
},AxesLabel->{x,y,z},PlotRange->{{0,1},{0,1}},Axes->True,Boxed->False,AxesEdge->{-1,-1}]
}]

Now we can evaluate the integral.

Style[TraditionalForm[HoldForm[Integrate[(ρ^2)  sinΦ,{θ,0,"" 2Pi},{Φ,0,""Pi},{ρ,2,""5}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate["(1/3)"(ρ^3)sinΦ* Grid[{{5},{2}},Dividers->{{True,False},False}],{θ,0,"" 2Pi},{Φ,0,""Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate["(117/3)" sinΦ,{θ,0,"" 2Pi},{Φ,0,""Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate["-39"  cosΦ* Grid[{{Pi},{0}},Dividers->{{True,False},False}],{θ,0,""2Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[78,{θ,0,"" 2Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[""==Integrate[(ρ^2)  Sin[Φ],{θ,0,2Pi},{Φ,0,Pi},{ρ,2,5}]],FontFamily->"Times",20]

Example 2

Problem: Convert to Spherical Coordinates and solve.

Style[TraditionalForm[HoldForm[Integrate[Sqrt[x^2 + y^2 + z^2],{x,0,1},{y,0,""Sqrt[1-x^2]},{z,0,Sqrt[1-x^2-y^2]}]]],FontFamily->"Times",20]

This TabView shows the projections of the solid in 3D as well as the 3 planes.

TabView[{
"3D bound"->Graphics3D[{
Darker@Red,Specularity[1],Sphere[{0,0,0},1]
},AxesLabel->{x,y,z},Boxed->False,AxesEdge->{-1,-1},PlotRange->{{0,1},{0,1},{0,1}},Axes->True,ViewPoint->{-1.5,-1.5,1}],
"xy plane" ->
Graphics[{
Darker@Red,Opacity[0.3],Specularity[1],Disk[{0,0},1,{0, Pi/2}]
},AxesLabel->{x,y},PlotRange->{{0,1},{0,1}},Axes->True],
"yz plane" ->
Graphics[{
Darker@Red,Opacity[0.3],Specularity[1],Disk[{0,0},1,{0, Pi/2}]
},AxesLabel->{y,z},PlotRange->{{0,1},{0,1}},Axes->True],
"xz plane" ->
Graphics[{
Darker@Red,Opacity[0.3],Specularity[1],Disk[{0,0},1,{0, Pi/2}]
},AxesLabel->{x,z},PlotRange->{{0,1},{0,1}},Axes->True]
}]

From the bounds, we can see that the region is bounded by a sphere by setting z = (Sqrt[1-(x^2)-(y^2)]), which becomes  the top half (positive half)  of the sphere, 1=(x^2)+(y^2) + (z^2). Setting y =(Sqrt[1-(x^2)]) becomes the top half (positive half) of the circle 1 = (x^2) + (y^2). Since x extends from 0 to 1, the quarter of a sphere has a ρ from 0 to 1. Knowing that the region is of a sphere in the first octant, we can determine that ρ extends from 0 to 1, Φ extends from 0 to (π/2) and θ extends from extends from 0 to (π/2). From the conversion table, dV = (ρ^2)sinΦdρdΦdθ. Let’s use (x^2)+(y^2)+ (z^2)= (ρ^2) to conclude that (Sqrt[(x^2)+(y^2)+(z^2)])= (Sqrt[(ρ^2)])= ρ. Now to construct our triple integral:

Style[TraditionalForm[HoldForm[Integrate[(ρ^3)  sinΦ,{θ,0,"" Pi/2},{Φ,0,""Pi/2},{ρ,0,""1}]]],FontFamily->"Times",20]

We solve this integral the same way we would solve a triple integral in rectangular coordinates:

Style[TraditionalForm[HoldForm[Integrate["((ρ^4)/4)sinΦ"* Grid[{{1},{0}},Dividers->{{True,False},False}],{θ,0,"" Pi/2},{Φ,0,""Pi/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[(1/4)  sinΦ,{θ,0,"" Pi/2},{Φ,0,""Pi/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[(((-1)/4)  cosΦ)* Grid[{{Pi/2},{0}},Dividers->{{True,False},False}],{θ,0,Pi/2}]]],FontFamily->"Times",20]

Style[TraditionalForm[HoldForm[""==Integrate[1/4,{θ,0,"" 2Pi}]]],FontFamily->"Times",20]

Style[TraditionalForm[""==Integrate[(ρ^3)  Sin[Φ],{θ,0,Pi/2},{Φ,0,Pi/2},{ρ,0,1}]],FontFamily->"Times",20]

Note: This is essentially the same problem as Example 1 of Triple Integrals in Cylindrical Coordinates, which is why the answers are the same. We can choose rectangular, cylindrical, or spherical coordinates to solve a single problem. In this case, we were working with a quarter sphere, so spherical coordinates was the easiest and most intuitive option. Choosing the coordinate system that best fits the specified region can make problems a lot more simple and straightforward to solve.

Exercises: Triple Integrals in Spherical Coordinates

Exercise 1

Evaluate the triple integral.

Style[TraditionalForm[HoldForm[Integrate[((ρ^2) sinΦ),{Φ,0,""Pi/6},{θ,0,""Pi/2},{ρ,0,""3}]]],FontFamily->"Times",20]

Exercise 2

Evaluate the triple integral by converting to spherical.

Style[TraditionalForm[HoldForm[Integrate[(xy),{x,0,""1},{y,0,""Sqrt[1-x^2]},{z,""Sqrt[x^2 + y^2],"" Sqrt[2-x^2 - y^2]}]]],FontFamily->"Times",20]

Exercise 3

Evaluate (Underscript[∫∫, B])∫((((x^2)+(y^2)+(z^2)))^2)dV where B is the ball with a center at the origin and a radius of 5.

Answers to Exercises

1. ((9π)/4)(2-(Sqrt[3]))
2. (1/15)(4(Sqrt[2])- 5)
3. ((312500 π)/7)

Response to Peer Review

We received a suggestion to include an example of integrating density in 3D, so we added a section on density in Concept: Triple Integrals in Rectangular Coordinates. This helped our project more accurately and fully explain triple integrals, as density is an important and interesting extension of the topic. It has physical applications and also introduces the idea of a fourth dimension. Based on other feedback, we additionally further developed/completed our examples in cylindrical and spherical coordinates.

Resources & Credits

All of the examples are from Ms. Brown’s Calculus D course notes for Chapter 15, and the course notes were also referenced for the writing of all of the Concept sections: http://www.abbymath.com/Classes/CalculusD/Chapter15.pdf
All of the exercises are from Calculus: Early Transcendentals by James Stewart, Sixth Edition (15.6 Exercises 3, 9, 19; 15.7 Example 4, Exercises 20, 27; 15.8 Exercises 17, 21, 39)
Triple integral introduction referenced for the writing of Concept: Triple Integrals in Rectangular Coordinates: https://tutorial.math.lamar.edu/classes/calciii/tripleintegrals.aspx