Maths 267 Lab 2
Fall 2002 - Stankewitz
Stankewitz's solutions
The principal goal of this project is to compute multi-variate integrals in
various coordinate systems.
Initial directions
To send Mathematica a command, place the cursor anywhere on the command line, then hold the <shift> key and press the
<enter> key.
To open a group of cells, double-click on the outermost bracket.
Integration basics
You can use the template to send multivariate integration commands such as
this one.
2x
à à y E âx ây
2 x 2
E
y
-----------4
Whereas single integrals compute the accumulating sum as a variable x varies through an interval, double integrals accumulate a
sum as a variable (x, y ) varies through a planar region. When this region is rectangular, the integral is easy to compute. For
Π
example, the integral of sin(x y) on the rectangle {(x,y) : 0£ x £Π, 0£ y £ 2 } can be calculated by the following command
IntegrateBSin@x yD, 8x, 0, Π<, :y, 0,
Π
2
>F
2
Pi
Pi
EulerGamma - CosIntegral[---]
-- + Log[--]
- + Log[Pi]
2
2
Mathematica computes integrals symbolically if at all possible. For this reason, confusing responses can at times arise from the
Integrate command. A numerical form of the previous output will be returned by the N[%] command which numerically
evaluates %, where % is always the last item that Mathematica has outputted. The NIntegrate command can approximate
the value of any integral, including those which cannot be symbolically solved.
N@%D
2.36687
2
math267-2-me-09.nb
NIntegrateBSin@x yD, 8x, 0, Π<, :y, 0,
Π
2
>F
2.36687
Limits of integration need not be constants. Triangular and disk regions can
also be integrated:
à à
2
0
x
y
ây âx
x+y
0
2 - 2 Log[2]
à
1
-1
à
-
1-x2
1 ây âx
1-x2
Pi
à
1
-1
à
-
1-x2
3 y^2 ây âx
1-x2
3 Pi
-----4
When the Integrate command is used for multi-variate integrals, integration intervals should be listed in order from
outer to inner.
That is, the integral Ùa Ùc f Hx, yL â y â x should be written as Integrate[f[x,y],
b d
{x,a,b},{y,c,d}]. You may find it simpler to copy and paste one of the above forms, modifying the integrand and limits of
integration.
math267-2-me-09.nb
3
Questions
1.1 Explain geometrically why Ù-1 Ù
1
1-x2
1-x2
1 ây âx = Π .
As x goes from -1 to 1,y goes from -Sqrt[1-x^2] to +Sqrt[1-x^2] which is the bottom of
the unit circle to the top of the unit circle. Since we integrate the function 1 we are
getting the area of this region which is Πr^2=Π.
1.2 Integrate (using Mathematica) the function z=x+y over the part of the unit square (i.e., 0 £x£
1, 0£y£ 1)above the diagonal y=x.
à
1
0
à
1
Hx + yL â y â x
x
1
2
1.3 A chocolate drop whose upper surface has the equation z= 4 - (x^2+y^2) sits
atop a flat cookie represented by the xy-plane. Determine the volume of the chocolate using
Cartesian coordinates.
à
2
-2
à
4-x2
H4 - Hx ^ 2 + y ^ 2LL â y â x
4-x2
-
8Π
N@%D
25.1327
Double integrals using polar coordinates
In addition to the rectangular coordinate system used above, one can describe regions using polar coordinates. When the region
is circular or partly circular, polar coordinates often provide a more efficient means to describe the region. You know that when
coordinate systems are exchanged, the differential dA=dx dy = r dr dΘ. (Greek letters are available on the Basic Input palette,
but it is probably easier for you to just copy and paste them when needed.) Notice the extra r factor before the dr dΘ; when you
direct Mathematica to solve an integral with polar coordinates, you must include the r factor as part of the integrand. For
example.
à
1
-1
à
1
H3 * r ^ 2L r â r â Θ
0
3
2
Questions
4
math267-2-me-09.nb
Questions
2.1 Compute the area of a circle of radius 8 by a double integral which
spans the circle and has an integrand of 1. Then change your integrand to y
and integrate in the same way. How would you explain what results?
à
2Π
0
à
8
1 r âr âΘ
0
64 Pi
à
2Π
0
à
8
r Sin@ΘD r â r â Θ
0
0
Which makes sense since you are integrating the function z = y which is
positive just as much as it is negative over the domain of the double integral,
i.e., the disk of radius 8. This means that the "positive" volume above the xy
- plane will be offset by the "negative" volume below the xy - plane.
2.2 Imagine a tent built by placing it on a pole of height 10 at the
center of a circle of radius 4 and pulling the edges of the tent down to the
edges of the circle. In all directions, the tent slopes linearly from the
center pole to the circle's edge. Use a double integral to compute the
volume inside the tent. How would you describe the resulting solid region?
à
2Π
0
à
4
0
160 Pi
---------3
N@%D
167.552
H10 - 5 r 2L r â r â Θ
math267-2-me-09.nb
5
Since the tent is actually an inverted cone we did a calculation to determine that this
cone is given in cylidrical coordinates as z = 10 - 5 r/2. Note that when z = 10, we get
r = 0 (just a point) and when z = 0 we get r = 4 (the circle of radius 4 in the xy - plane).
2.3 A slightly different tent also has a center pole of height 10, but the edges are
instead pulled down to a square base whose side length is 5. Use a double
integral to compute the volume inside the tent. How would you describe this
solid region?
Hint: Arrange the square so that the corners are on the axes. Restrict your attention to the first quadrant and note that the
square's edge lies on a line of the form x + y =k, for some constant k. Develop a function which describes the height of the tent
above an arbitrary point (x,y) inside the square. In this case, don't use polar coordinates.
The tent is a pyramid. We will find the volume of 1/4 of this pyramid (the part which
lies above in the xy - plane) and then multiply by 4.
The plane which contains the one face of this pyramid is z = -2 Sqrt[2] x - 2 Sqrt[2] y +
10.
You can get this by considering the slope in the x - direction which is: -10/(5/Sqrt[2])
= -2 Sqrt[2] and then considering the slope in the y - direction which is also - 2 Sqrt[2].
The intersection of this plane with the xy - plane is the line
y = 5/Sqrt[2] - x. After one draws a picture of the domain in the xy - plane over which
we are integrating (this region is just the triangle under the line y = 5/Sqrt[2] - x in the
first quadrant) we get the bounds for the following integral.
4à
5Sqrt@2D
0
à
5Sqrt@2D-x
H-2 Sqrt@2D x - 2 Sqrt@2D y + 10L â y â x
0
250
---3
N@%D
83.3333
Volumes, using spherical coordinates
When integrating using spherical coordinates, remember that the differential dV =Ρ2 sin Φ dΡ dΘ dΦ. When using Mathematica to
compute integrals in spherical coordinates, be sure to
include Ρ2 sin Φ as part of the integrand. For example the volume of the sphere of radius 3 would be
6
math267-2-me-09.nb
à à
Pi
0
à
2 Pi
0
3
Ρ ^ 2 Sin@ΦD â Ρ â Θ â Φ
0
36 Pi
Questions
3.1
(A) Compute the volume of the sphere of radius 3, using polar coordinates and a double
integral (using Mathematica). Then compare the volume using spherical coordinates and a
triple integral with integrand 1 (done above).
The equation of the sphere is x^2 + y^2 + z^2 = 9, i.e., r^2 + z^2 = 9 which helps us
determine the integrand for the following integral.
à
2Π
0
à
3
2 * H9 - r ^ 2L ^ H1 2L r â r â Θ
0
36 Pi
(B) Then compute the volume of the unit sphere using cylindrical coordinates and a triple
integral with integrand 1.
à
2Π
0
à à
4 Pi
-----3
1
0
H1-r^2L^H12L
-H1-r^2L^H12L
1 * r âz âr âΘ
math267-2-me-09.nb
3.2 Use spherical coordinates to find the volume of the ice cream cone with ice cream on
top (pictured below by executing the follwoing ParametricPlot3D command) given by the solid
bounded by x^2+y^2+(z-3)^2=9 and z=Sqrt[x^2+y^2].
In[20]:=
ParametricPlot3D@
88v * Cos@uD, v * Sin@uD, v<, 8v * Cos@uD, v * Sin@uD, Sqrt@9 - v ^ 2D + 3<<, 8u, 0, 2 Π<, 8v, 0, 3<D
0
-2
2
6
4
Out[20]=
2
2
0
0
-2
The cone converts into Φ =
Pi 4 and the sphere converts into Ρ = 6 Cos@ΦD. So we have the following integral.
à
à
Pi4
0
0
à
2 Pi
6 Cos@ΦD
Ρ ^ 2 Sin@ΦD â Ρ â Θ â Φ
0
27 Pi
3.3 Use spherical coordinates to find the triple integral of the function f(x,y,z)=xyz
integrated over the solid (ice cream cone) bounded by x^2+y^2+(z-3)^2=9 and z=Sqrt[x^2+y^2].
Is this what you expected to get? Why?
We use the same bounds, and include xyz = ( Ρ Sin[Φ] Cos [Θ]) ( Ρ Sin[Φ] Sin [Θ]) ( Ρ Cos [Φ]) as the
intgrand.
7
8
math267-2-me-09.nb
à
0
à
Pi4
0
à
2 Pi
6 Cos@ΦD
H Ρ Sin@ΦD Cos @ΘDL H Ρ Sin@ΦD Sin @ΘDL H Ρ Cos @ΦDL Ρ ^ 2 Sin@ΦD â Ρ â Θ â Φ
0
0
We expected to get zero since the function f(x, y, z) = xyz is positive exactly as often as it is
negative on this ice cream cone because the ice cream cone is symmtric in the x and y
variables.
© Copyright 2026 Paperzz