Вы находитесь на странице: 1из 40

(April 26, 2014) Eduardo Martin-Martinez - Math 217

Block 5

Multivariable intergration

5.1 Introduction to double integrals

The first time one is introduced to the concept of integral, it is common to think about the area below a curve.
The integral of a one variable function f (x) can be understood as the sum of infinitely small area elements
below the plot of the function.

Figure 5.1: The integral as the limit of the sum of infinitely small area elements below the plot of f (x).

Imagine, as shown in Figure 5.1, that we could approximate the area under the plot of f (x) from the point
x = a to the point x = b by dividing the interval in N small segments of length δxi and computing the sum
of the area δAi of all the small rectangles of base δxi and height f (xi )
N
X N
X
A≈ δAi = f (xi )δxi
i i

If we make these rectangles infinitely small, i.e. we take the limit N → ∞ and δx1 → 0 keeping constant the
product of the two N δxi = b − a we get exactly the area between the x axis and the plot of f (x):
N
X Z b
A = lim f (xi )δxi = dx f (x)
δxi →0 a
N →∞ i

We generalize this to the two variable case ‘upgrading’ the concept of ‘Area under the plot’ to ‘volume
under the plot’. We can approximate the volume under the plot of a two-dimensional function f (x, y) over
the rectangle R ≡ [a, b] × [c, d] by dividing the rectangle in small rectangles of sides δxi and δyi (which will
have an area δAi = δxi δyi ), and summing up the volume of all the small parallelepipeds of base Ai and height
f (xi , yi ), as seen in Figure 5.2. This is,

Multivariable Integration 1 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Figure 5.2: The integral as the limit of the sum of infinitely small volume elements below the plot of f (x, y).

N X
X N N X
X N N X
X N
V ≈ δVij = δAij f (xi , yj ) = δxi δyj f (xi , yi )
i j i j i j

in the limit of infinitely many infinitesimally small area elements we obtain the exact volume, which is the
integral of the two variable function:
N X
X N Z ZZ Z b Z d
V = lim = f (xi , yj )δxi = dAi = dxdy f (x, y) = dx dy f (x, y)
δxi →0 R R a c
δyi →0 i j
N →∞

Example 5.1.1. An example of application of the double integral: consider a thin rectangular plate of constant
thickness  and density ρ. Its specific heat capacity (heat capacity per unit mass) Cp . The temperature of the
plate varies as a function of x, y on the plate. What is the total thermal energy on the plate?
We know that the thermal energy will be the product of the temperature times the mass times the
specific heat capacity. However, the temperature varies from point to point on the plane. We can think of
approximating the value of the energy by dividing the plate into infinitesimally small volume elements of
instant temperature and computing the infinitesimal energy in all of them, to finally add them up. For every
single one of these volume elements we would have

δEij = T (xi , yj ) ρ δVij Cp = ρ  Cp T (xi , yi )δxi δj

The total energy can be approximated by the sum of all these small energy contributions
X
E≈ δEij
ij

Being exactly equal in the limit of infinitely many infinitesimally small volume elements
ZZ ZZ
E= dxdy ρ  Cp T (x, y) = ρ  Cp dxdy T (x, y)

5.1.1 Integration contours

In single variable integrals, it is enough with specifying two integration limits. Being the dimension of the
integration region only one, there is no freedom to give any shape to integration contours other than segments

Multivariable Integration 2 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

in the real line. The scenario is different in multidimensional integrals. Already in two-dimensional integrals
one can see that the integration contours can be of varied nature. Actually, one of the trickiest parts of
performing multivariable integrals is to correctly implement the integration contours. In general, we will
consider integrals of two-variable functions over a given region A of the XY plane:
ZZ
I= dx dy f (x, y)
A

To see how this Let us illustrate this with a very simple example:
Example 5.1.2. Compute the integral of the function f (x, y) = x2 + xy 2 over the triangle formed by the
lines y = ax, y = 0, x = 1.
This is a rather simp integration contour, which is shown in Fig 5.3. As we can see, in that triangle
0 ≤ x ≤ 1 and y = ax. the way to proceed, is t perform the integrals with respect to x and y sequentially.

y=ax
x=y/a
x=1

y=0

Figure 5.3: The integration contour showing y(x) and x(y).

• Method 1:Perform the integral over y first.

If we do the integral over y, we need to write y(x) in the integration contour. From Fig. 5.3 we see that the
lower limit on y is y = 0 and the upper limit is y(x) = ax. Fized that x will vary between 0 and 1, so we get:
Z 1 Z ax Z 1 Z ax Z 1 y=ax Z 1
y3x a3 x4
  
2 2 2 3
I= dx dy f (x, y) = dx dy (x + xy ) = dx yx + = dx ax +
0 0 0 0 0 3 y=0 0 3
and now, we can perform the integral over x
Z 1 x=1
a3 x4
  4
a3 x5 a a3

3 ax
I= dx ax + = + = +
0 3 4 15 x=0 4 15

• Method 2: Perform the integral over x first.

If we perform the integral over x first, we need to write x(y) in the integration contour. From Fig. 5.3 we see
that the lower limit on x is x(y) = y/a and the upper limit is x = 1. Fixed that, y will vary between 0 and a,
so we get:
Z a Z 1 Z a Z 1 Z a  3 x=1 Z a 
y 2 x2 1 y2 y3 y4

2 2 x
I= dy dx f (x, y) = dy dx (x + xy ) = dy + = dy + − 3− 2
0 y/a 0 y/a 0 3 2 x= y 0 3 2 3a 2a
a

Multivariable Integration 3 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

And now, we perform the integration over y


Z a  y=a
1 y2 y3 y4 y y3 y4 y5 a a3 a3 a a3
 
a
I = dy + − 3− 2 = + − − = + − − = +
0 3 2 3a 2a 3 6 12a3 10a2 y=0 3 6 12 10 4 15

As we can see, both methods produce the same result, though one of them yields a simpler integral. In
general, we will always expect that. For any contour in the XY plane, we can write
Z x2 Z y2 (x) ! Z !
ZZ y2 Z x2 (y)
I= dx dy f (x, y) = dx dy f (x, y) = dy dx f (x, y)
A x1 y1 (x) y1 x1 (y)

which tells us that it is up to us to decide in which order we integrate, as long as we are careful with expressing
the integration contour correctly.
Let us see another example
Example 5.1.3. Compute ZZ
x
dx dy sin
D y

over the area D defined by the intersection of {x = 0, y = π, y = x}.

y2

x


y= x

Figure 5.4: The integration contour showing y(x) and x(y).

If we try to do the integration over y first we would find a rather difficult integral: from Fig. 5.4 we see

that y would run from y = x to y = π and x would run from x = 0 to x = π 2
Z π2 Z π Z π2 Z π
x
I= dx √ dy f (x, y) = dx √ dy sin
0 x 0 x y
which is definitely not a very easy integral to solve.
On the other hand, if we perform the integral over x first, we get that x would run from x = 0 to x = y 2
and y would run from y = 0 to y = π, and therefore
Z π Z y2 Z π Z y2
x
I= dy dx f (x, y) = dy dx sin
0 0 0 0 y

Multivariable Integration 4 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

The integral over x is immediate

π y2 π x=y2 π π
π2
Z Z Z  Z Z
x
I= dy dx f (x, y) = dy −y cos =− dy (y cos y − y) = − dy y cos y
0 0 0 y x=0 0 2 0

the integral which is left is one of the simplest by-parts integrals: by applying
Z Z
dv u = uv − du v

choosing
u = y ⇒ du = dy, dv = cos y dy ⇒ v = sin y
we get Z π Z π
dy y cos y = [y sin y]π0 − dy sin y = cos π − cos 0 = −2
0 0

substituting in the main integral we finally get


π
π2 π2
Z
I= − dy y cos y = +2
2 0 2

This is a good example of a case where one way the integral is very difficult but integrating the other
variable first it becomes easy.
Let us go through another example that we will see is artificially involved:

Example 5.1.4. Compute the area of the disc of radius R. The integral we have to solve is
ZZ
dx dy
D

where D is the unit disk x2 + y 2 ≤ R2 . We will see a much better way to solve this integral when we study
multidimensional change of variables, but for the sake of practice, let us use the brute-force approach we have
learned so far. we will do the integral over y first (there is no advantage of choosing one or the other in this

!
y= R2 − x2

!
y = − R2 − x2

Figure 5.5: The integration contour y(x) on it.

Multivariable Integration 5 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

case, both the function and the


√ contour are completely
√ symmetric under swapping of x and y). As seen in
Fig. 5.5, y varies from y = − R − x and y = R − x2 , whereas x varies from x = −R to x = R:
2 2 2


Z R Z R2 −x2 Z R p Z R p
I= dx dy = 2 2 2
dx R − x = 4 dx R 2 − x2

−R − R2 −x2 −R 0

where in the last step we used that the integrand is an even function of x. Now, this is the typical example
where a trigonometric change of variables does the trick:

x = R sin t ⇒ dx = R cos t dt

and the integrations limits transform as x = 0 →t=0, x = R → t = π/2, therefore


π π π
Z R Z Z Z
1
p 2
q 2 2
I=4 dx R2 − x2 = 4 dt R cos t R2 (1 − sin2 t) = 4 dt R2 cos2 t = 4R dt (1 + cos 2t)
0 0 0 0 2

which immediately yields


 π
2 1 2 π
I = 2R t + sin 2t = 2R2 = πR2
2 0 2
which is the well known expression for the area of a disc of radius R.

As said above, we will see a much simpler way of doing this integral when we study multidimensional
changes of variables.

5.2 Introduction to triple integrals

Although no longer easy to picture as an ‘area’ or as a ‘volume’, it is trivial to extend the concept of multiple
integral to many variables. In particular, we can think of the integration of a tridimensional function f (x, y, z)
(whose plot lives in a 4-dimensional space) over an infinitesimally small volume element dV = dx, dy, dz. In
a similar fashion as two-variable integrals. It can be understood as the sum of the values of a function in an
infinitesimally small region of space over some volume V , it is usually denoted as
ZZZ ZZZ
dV f (x, y, z) = dx dy dz f (x, y, z)
V V

Let us illustrate this idea with an example

Example 5.2.1. The density of an object is given by ρ(x, y, z) and we know that the object has tridimensional
shape W . What is the total mass of the object?

If we divide the space W , containing the object, in infinitesimal parts dV , the mass of every single one of
these small parts will be ρ(x, y, z)dV . Summing up all the infinite infinitesimally small parts we obtain the
total mass, given by the volume integral:
ZZZ
M= dx dy dz ρ(x, y, z)
W

Multivariable Integration 6 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

When it comes to setting up the integration contours, this time it is trickier than in the two-dimensional
case: There are, in principle, 6 different ways to split the domain of integration
ZZZ Z z2 Z y2 (z) Z x2 (y,z) Z x2 Z z2 (x) Z y2 (x,z)
dV f (x, y, z) = dz dy dx f (x, y, z) = dx dz dy f (x, y, z) = . . .
V z1 y1 (z) x1 (y,z) x1 z1 (x) y1 (x,z)

So, same as before, and even more so when we integrate over a larger number of variables, paying attention
to the integration contour is crucial to solve these integrals. Let us first compute a very simple example and
then we will tackle some more involved examples.

Example 5.2.2. Integrate the function f (x, y, z) = x2 + y 2 + z 2 over the cube V = [0, 1] × [0, 1] × [0, 1]
In this simple case, the integration contours have no complication
1 1 1 1 1 1
x3
ZZZ Z Z Z Z Z 
2 2 22 2
I= dV f (x, y, z) = dz dy dx (x + y + z ) = dz dy + xy + xz
V 0 0 0 0 0 3 0
Z 1 Z 1   Z 1  3
1 Z 1  1
2z + z 3

1 2 2 y y 2 1 1 2
= dz dy +y +z = dz + + yz = dz + +z = =1
0 0 3 0 3 3 0 0 3 3 3 0

Example 5.2.3. Calculate the volume of the tetrahedron of vertices (0, 0, 0), (a, 0, 0), (0, b, 0), (0, 0, c).

Figure 5.6: The tetrahedron of vertices (0, 0, 0), (a, 0, 0), (0, b, 0), (0, 0, c).

This tetrahedron is depicted in Fig. 5.6. Since we are going to need the integration contour, we need to
characterize the volume of integration as a surface or as the intersection of several surfaces. In particular, in
this case, the tetrahedron is clearly the volume enclosed into 4 intersecting planes:

• The XY plane

• The YZ plane

• The XZ plane
x y z
• The plane with intersects on a, b, c respectively for the z, y, z axes. This is P ≡ + + =1
a b c

We will integrate with respect to x first. We obtain the integration limits with respect to x by looking at the
figure: the domain of x starts from zero and increases up to the point where it touches the plane P . This is,
it goes from 0 to a − ay az
b − c (which is the value of x on that plane, obtained solving for x in the equation of
the plane).

Multivariable Integration 7 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Now, once the limits of integration on x are set up, we need to set up the integration limits for y. We
see that the lower limit of y is zero, and the upper limit is, again, the plane P . However, we have already
accounted for the variation of x on that plane when we integrated over x, therefore, we only need to find
what’s the variation of y on that plane projected onto the Y Z plane. We see that on that plane, (where x = 0)
the relationship between z and y on the plane P is y = b − bzc , which sets the upper integration limit for y,
therefore, the integral we have to compute becomes
ZZZ Z c Z b− bz Z a− ay − az Z c Z b− bz
c b c
 ay az  c
I= dV = dz dy dy a −
dx = − dz
V 0 0 0 0 0 b c
bz Z " 2 # Z c 
b− c
a b − bzc bz
Z c  c

ay 2 ayz az b − abz 2 abz ab
   
bz c
= dz ay − − = dz − +a b− − = dz − +
0 2b c 0 0 2b c c 0 2c2 c 2
c
abz 3 abz 2 abz
 
abc abc abc abc
= − + = − + =
6c2 2c 2 0 6 2 2 6
which is the well known formula of the volume of the tetrahedron.
Example 5.2.4. What is the thermal energy stored in a piece of material with the shape of a tetrahedron,
constant density ρ and specific heat capacity Cp but where it’s temperature increases with the heigh of the
tetrahedron as follows T (x, y, z) = Tmin + z.
we know that
ZZZ  ZZZ ZZZ 
E= dV ρ Cp T (x, y, z) = ρ  Cp t Tmin dV + zdV
Z c Z b− bz Z a− ay − az ! Z c " Z b− bz Z a− ay − az #!
abc c b c abc c b c
= ρ  Cp Tmin + dz dy dx z = ρ  Cp Tmin + dz z dy dx
6 0 0 0 6 0 0 0

from the previous example, we know the content of the innermost bracket:
Z b− bz Z a− ay − az
abz 2 abz ab
 
c b c
dy dx = − +
0 0 2c2 c 2
so substituting this we arrive at
c
abz 3 abz 2 abz
 Z  
abc
E = ρ  Cp Tmin + dz z − +
6 0 2c2 c 2
since
c
abz 3 abz 2 abz abc2 abc2 abc2 abc2
Z  
dz − + = − + =
0 2c2 c 2 8 3 4 24
we substitute in E to finally get  
abc 1
E = ρ  Cp Tmin + c
6 4

Let us see another example.


Example 5.2.5. Calculate the volume of a sphere of radius R.
We need to compute the integral
ZZZ ZZZ
I= dV = dxdydz
S S

Multivariable Integration 8 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Where S is the volume inside the sphere of radius R: x2 + y 2 + z 2 ≤ R2 . Same as with the area of the disc,
the volume of the sphere will be much easier to compute once we see how to make multidimensional changes
of variable, but let us keeping all cartesian for sake of practice. The tricky part is, as usual, to set up the
integration contour. Let us first look at one of the cartesian coordinates, given the symmetry of the problem
we would get the same kind of expressions no matter which variable we decide to integrate first.

Suppose that the order of integration


p will be z, y,
px, so our first integration variable is z. As shown in Figs.
5.8 and 5.7, z will vary from − R2 − x2 − y 2 to R2 − x2 − y 2 . Once the variation of z is accounted for,
let us take y for the next integration variable. Since we already integrated with respect to z, we are adding
up (infinitesimally) small rectangular regions containing all the sums over z already. The value of y then
can
√ be found solving
√ in the equation of the sphere x2 + y 2 + z 2 = R when z = 0 therefore, y will vary from
− R2 − x2 to R2 − x2 . Finally, after integrating over z and y, we have gotten an infinite number of small
discs of different radiuses which when added together will fill in the whole area of the sphere. There are such
discs from x = −R to x = R, which are the integration limits. Again, if you don’t see it, you can solve for x
in the equation of the sphere as suing y = 0 and z = 0.

Figure 5.7: Differential volume elements in the x coordinate which sum up to the volume of the sphere.

Figure 5.8: Cross-section (slice) of a sphere at constant x

The volume integral we are looking for is then

Z R Z √
R2 −x2 Z √R2 −x2 −y2 Z R Z √
R2 −x2 Z √R2 −x2 −y2 Z R Z √
R2 −x2 p
I= dx √ dy √ dz = 2 dx √ dy dz = 2 dx √ dy R2 −x2 −y 2
−R − R2 −x2 − R2 −x2 −y 2 −R − R2 −x2 0 −R − R2 −x2

where we have made use of the fact that the integrand is even in z. The new integrand is also even in y, so

Multivariable Integration 9 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

we can write √
Z R Z R2 −x2 p
I=4 dx dy R2 −x2 −y 2
−R 0

this integrand is suggesting a trigonometric change of variables


p p
y = R2 − x2 sin t ⇒ dy = R2 − x2 cos t dt

under this change of variables, the integration limits transform as


p π
y = 0 ⇒ t = 0, y = R 2 − x2 ⇒ t =
2
and the integrand transforms as
p q p
R − x − y = (R2 − x2 )(1 − sin2 t) = (R2 − x2 ) cos t
2 2 2

So, substituting all this, the integral over y can be easily done
π
Z R Z
2
2 2
I=4 dx(R − x ) dt cos2 t
−R 0

o and we know that Z π Z π


2 1 2 π
dt cos2 t = dt (1 − cos 2t) =
0 2 0 4
therefore, substituting
R R R
x3 2R3
Z Z   
2 2 2 2 2 4
I=π dx (R − x ) = 2π dx (R − x ) = 2π R x − = 2π = πR3
−R 0 3 0 3 3

which is the well known formula for the volume of the sphere.

A note on multivariable integrals

Now that you know how to compute double and triple integrals, the extension to quadruple and higher level
integrals is straightforward. The difficulties will come from the characterization of the integration boundary,
and the same techniques learnt for two and three variable integrals most certainly work with many-variable
ones.

5.3 Changes of variable in multidimensional spaces:


The Jacobian determinant

5.3.1 Intro: Changing variables and the Jacobian determinant

In single variable integration, we are very much used to changes of variable. Consider, for example, the integral
Z
I = dx f (x)

Multivariable Integration 10 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

We know that when we change the variable x to a variable t such that x = x(t), the integral has to be
consistently changed to
Z Z
dx
dx f (x) = dt f [x(t)]
dt
this is to say, not only the function changes from

f (x) → f [x(t)]

The differential element also changes from


dx
dx → dt
dt

In the case of a multivariable function, the effect of the change of variables on the differential element is
not as simple as this. If the change of variables mixes more than one variable at a time, the change of the
differential has to account for the deformation of the volume or surface element.

Let us consider that we have a n variables (x1 , . . . , xn ), and we apply a map to a new whole set of n
variables (u1 , . . . un ) such that

x1 = x1 (u1 , . . . , un )
x2 = x2 (u1 , . . . , un )
..
.
xn = xn (u1 , . . . , un )

We define the Jacobian matrix of the change of variables as the n × n matrix made of the following matrix
elements  
∂xi
{Jij } =
∂uj
in other words
 ∂x ∂x1 ∂x1 ∂x1 
1
...
 ∂u1 ∂u2 ∂u3 ∂un 
 
 ∂x2 ∂x2 ∂x2 ∂x2 
 ... 
J=
 ∂u1 ∂u2 ∂u3 ∂un 
 .. .. .. .. ..

 . . . . .


 ∂x ∂xn ∂xn ∂xn 
n
...
∂u1 ∂u2 ∂u3 ∂un
We define the Jacobian determinant |J| (or simply, Jacobian) as the absolute value of determinant of the
Jacobian matrix
∂x ∂x1 ∂x1 ∂x1
1
...

∂u1 ∂u2 ∂u3 ∂un



∂x2 ∂x2 ∂x2 ∂x2
...
|J| = Abs ∂u1 ∂u2 ∂u3 ∂un
.. .. .. .. ..

. . . . .


∂x ∂x ∂x ∂xn
n n n
...


∂u1 ∂u2 ∂u3 ∂un

Multivariable Integration 11 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

After this definition, we can state that under a change of variables

x1 = x1 (u1 , . . . , un )
x2 = x2 (u1 , . . . , un )
..
.
xn = xn (u1 , . . . , un )

any function of x transforms as f [x1 (u1 , . . . , un ), . . . , xn (u1 , . . . , un )], and the differential elements transform
with the Jacobian
dx1 dx2 . . . dxn → du1 du2 . . . dun |J|

For example, let us consider the very simple case of the integral
ZZ
I= dS (xy 2 + x)
D

where D is the area [0, 1] × [0, 3]. We could easily solve this integral
Z 1 Z 3 Z 1
2
I= dx dy (xy + x) = dx 12x = 6
0 0 0

Alternatvely, we could do the following change of variables


u
u = xy, v=x ⇒ x = v, y=
v
the integrand transforms as
u2
xy 2 + x = +v
v
the integration limits transform as

x = 0 ⇒ v = 0, x = 1 ⇒ v = 1, y = 0 ⇒ u = 0, y = 3 ⇒ u = 3v

The differential element will transform with the Jacobian dxdy = dudv|J|, therefore
Z 1 Z 3v
I= dv du |J|(u2 + v)
0 0

The determinant of the Jacobian matrix in this case is



∂x ∂x 0
1
∂u ∂v 1 1
det J = = = − ⇒ |J| =

∂y ∂y 1 −u v v
v v2

∂u ∂v

therefore, the integral we have to solve is


Z 1 Z 3v  Z 1 3v Z 1
1 u2 1 u3
 
I= dv du +v = dv + vu = dv 12v = 6
0 0 v v 0 v 3v 0 0

5.3.2 Important changes of variables

We are going to see a series of rather remarkable changes of variables

Multivariable Integration 12 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Polar coordinates

This is the following change of variables between cartesian coordinates (x, y) to polar coordinates (r, θ)

x = r cos θ
y = r sin θ

These curvilinear coordinates are very well suited for integration of functions with some degree of radial
symmetry, angular symmetry or integration contours with radial symmetry. It can be seen very easily, directly
from Figure 5.9 that the sides of the area element in polar coordinates are r dr and dθ, therefore the surface
element is

Figure 5.9: Polar coordinates and surface elements in polar coordinates.

dS = r dr dθ
Therefore we can do the change of coordinates in an integral as follows
ZZ ZZ
dx dy f (x, y) = dr dθ r f [x(r, θ), y(r, θ)]
S S

However, a more systematic approach is to compute the Jacobian of the transformation The determinant
of the Jacobian matrix in this case is

∂x ∂x
∂r ∂θ cos θ −r sin θ

det J = =
= r(cos2 θ + sin2 θ) ⇒ |J| = r
∂y ∂y sin θ r cos θ

∂r ∂θ

Therefore we know that


dS = dx dy = dr dθ|J| = dr dθ r

Leading to the same result


ZZ ZZ
dx dy f (x, y) = dr dθ r f [x(r, θ), y(r, θ)]
S S

Multivariable Integration 13 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Example 5.3.1. Let us revisit an old problem: Compute the area of the disc of radius R.
The problem is obviously very well suited for polar coordinates. In these ordinates, the equation of the
circle is as simple as r = R. Therefore the integration limits will be 0 ≤ r ≤ R and 0 ≤ θ ≤ 2π. The integral
then will be Z R Z 2π Z R
R2
S= dr dθ r = 2π dr r = 2π = πR2
0 0 0 2
Example 5.3.2. Find the integral of f (x, y) = xy in the first quarter of the unit circle
In polar coordinates f (r, θ) = r2 sin θ cos θ, and in the unit circle, r goes from 0 to 1 and, in the first
quarter, θ only runs half its domain from 0 to π/2
The problem is obviously very well suited for polar coordinates. In the second quadrant, the quarter of
circle will be defined by 0 ≤ r ≤ R and 0 ≤ θ ≤ π/2. The integral then will be
Z 1 Z π Z R π
1 1
 Z
3 1 1
2 2
3 2
I= dr dθ r sin θ cos θ = dr r sin θ = dr r3 =
0 0 0 2 0 2 0 8
Example 5.3.3. Find the area of the ellipse of semiaxes a and b. It’s equation is
x2 y 2
+ 2 =1
a2 a
In this case, the change of variables that simplifies the integration contour is slightly different from the usual
polar change. Let us propose the following change

x = ar cos θ
y = br sin θ

The equation of the ellipse in these polar coordinates is simply (by substituting int he equation)

r=1

So the integral we want to do is simply Z 1 Z 2π


S= dr dθ|J|
0 0
The jacobian in this case is

∂x ∂x
a cos θ −a r sin θ
∂r ∂θ = a b r(cos2 θ + sin2 θ) ⇒ |J| = r a b

det J = =
∂y ∂y
b sin θ b r cos θ
∂r ∂θ

therefore, the are oaf the ellipse will be


Z 1 Z 2π Z 1
S= dr dθ r a b = 2π dr r a b = π a b
0 0 0

Exercise: Solve this integral without the change of coordinates!


Note that the variable r in the elliptical change of coordinates no longer notates the distance to the origin,
as it was the case with polar coordinates. Instead, r is a ‘weighted’ distance to the origin where the distance
in the x coordinate and y coordinate have different contributions.

Multivariable Integration 14 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Cylindrical coordinates

This is the following change of variables between cartesian coordinates (x, y, z) to polar cylyndrical coordinates
(r, θ, z)

x = r cos θ
y = r sin θ
z=z

These curvilinear coordinates are very well suited for integration of functions with some degree of cylindrical
symmetry, angular symmetry in sections of constant z or integration contours with cylindrical symmetry. It
can be seen very easily, directly from Figure 5.10 that the sides of the volume element in polar coordinates
are r dr, dθ and dz, therefore the volume element is

dV = r dr dθ dz

Figure 5.10: Cylindrical coordinates and volume element in cylindrical coordinates.

Therefore we can do the change of coordinates in an integral as follows


ZZZ ZZZ
dx dy dz f (x, y, z) = dr dθ dz r f [x(r, θ), y(r, θ), z]
V V

However, a more systematic approach is to compute the Jacobian of the transformation. The determinant
of the Jacobian matrix in this case is
∂x ∂x ∂x

∂r ∂θ ∂z cos θ −r sin θ 0


∂y ∂y ∂y
det J = = sin θ r cos θ 0 = r(cos2 θ + sin2 θ) ⇒ |J| = r

∂r ∂θ ∂z


∂z ∂z ∂z 0 0 1


∂r ∂θ ∂z

Multivariable Integration 15 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Therefore we know that


dV = dx dy dz = dr dθ dz |J| = dr dθ dz r

Leading to the same result


ZZZ ZZZ
dx dy dz f (x, y) = dr dθ dz r f [x(r, θ), y(r, θ), z]
V V

Example 5.3.4. Evaluate the integral


ZZZ
I= dV (x4 + 2x2 y 2 + y 4 )
U

over the region U enclosed by the surface x2 + y 2 = 1 and the planes z = 0 and z = 1
Writing the integrand in cylindrical coordinates is trivial If one quickly realizes that

x4 + 2x2 y 2 + y 4 = (x2 + y 2 )2 = r4
| {z }
r2

therefore ZZZ ZZZ


4
I= dr dθ dz, |J|r = dr dθ dz r5
U U

Figure 5.11: The integration region within the surfaces x2 + y 2 = 1, z = 0 and z = 1

The integration region is rather simple in this case, as shown in figure 5.11. r goes from 0 to 1, θ goes
from 0 to 2π and z goes from 0 to 1, therefore
Z 1 Z 2π Z 1 Z 1 1
5 5 r6 π
I= dr r dθ dz = 2π dr r = 2π =
0 0 0 0 6 0 3

Example 5.3.5. A bit more challenging: Find the integral of the function f (x, y, z) = x2 + y 2 in the volume
U contained inside the paraboloid x2 + y 2 = 3z and the plane z = 3
Given the symmetry of the integrand, it seems cylindrical coordinates may simplify the integral quite a
bit. Thus, we want to compute the integral
ZZZ ZZZ ZZZ
2 2 2
I= dV (x + y ) = dr dθ dz |J| r = dr dθ dz r3
U U U

Multivariable Integration 16 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Figure 5.12: The integration region within the surfaces x2 + y 2 = 1, z = 0 and z = 1

Now to set up the integration contours we can take a look at Figure 5.12.
To get the integration contours we need to know the form of the surface of the paraboloid, which is
x2 + y 2 = 3z, in cylindrical coordinates: the equation of the paraboloid is

x2 + y 2 = 3z ⇒ r2 cos2 θ + r2 sin2 θ = 3z ⇒ r2 = 3z

Now, we can integrate deciding which variable is better to integrate first. Since I prefer to avoid square roots
if possible, I am going to integrate first with respect to z. According to Fig. 5.12, the z coordinate rums from
the surface of the paraboloid to the plane z = 3, therefore, it runs from r2 /3 to 3. Then r runs from 0 to 3
and θ runs over all its range:
Z 3 2π 3 Z 3 1 Z 3 3
r2
 4
r6
Z Z Z    
3 3 3 3r 4 3 81π
I = dr r dθ dz = 2π dr r dz = 2π dr r 3 − = 2π − =3 π −1 =
0 0 r2
0 r2
0 3 4 18 0 2 2
3 3

p
Example 5.3.6. Find the integral of the function f (x, y, z) = x2 + y 2 in the volume U bounded by the
paraboloid z = 4 − x2 − y 2 , the cylinder x2 + y 2 = 4 and the planes z = 0, y = 0.
Again, cylindrical coordinates seem appropriate to solve this integral:
ZZZ p ZZZ ZZZ
I= 2
dV x + y = 2 dr dθ dz |J| r = dr dθ dz r2
U U U

Now to set up the integration contours we can take a look at Figure 5.13.

Figure 5.13: The integration region within the surfaces z = 4 − x2 − y 2 , x2 + y 2 = 4, z = 0 and y = 0

Multivariable Integration 17 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

To get the integration contours we need to know the form of the surface of the paraboloid, which is
z = 4 − x2 − y 2 , in cylindrical coordinates: the equation of the paraboloid is

z = 4 − x2 − y 2 ⇒ z = 4 − r 2

From the figure we see it’s most convenient to integrate over z first. z goes from z = 0 to the surface of the
paraboloid, therefore the limits on z will be from z = 0 to z = 4 − r2 . We see that once z is integrated, r goes
from r = 0 to r = 2, and finally, θ has to cover half the complete circle, therefore θ goes from 0 to π:
Z 2 Z π Z 4−r2 Z 2 4−r2 Z 3  3 2
r5
Z  
2 2 2 2
 4r 5 1 1 64π
I = dr r dθ dz = π dr r dz = π dr r 4 − r = π − =2 π − =
0 0 0 0 0 0 3 5 0 3 5 15

Example 5.3.7. Find the integral of the function f (x, y, z) = y in the volume U bounded by the planes
z = x + 1, z = 0 and between the cylindrical surfaces x2 + y 2 = 1 and x2 + y 2 = 4
Once again, cylindrical coordinates seem appropriate to solve this integral:
ZZZ ZZZ ZZZ
I= dV y = dr dθ dz |J| r sin θ = dr dθ dz r2 sin θ
U U U

Now to set up the integration contours we can take a look at Figure 5.14.

Figure 5.14: The integration region within the surfaces z = x + 1, z = 0, x2 + y 2 = 1 and x2 + y 2 = 4

To get the integration contours we need to know the form of the integration boundaries in cylindrical
coordinates:

• z = x + 1 ⇔ z = r cos θ + 1

• z=0

• x2 + y 2 = 1 ⇔ r = 1

• x2 + y 2 = 4 ⇔ r = 2

Multivariable Integration 18 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

From the figure we see it’s most convenient to integrate over z first. z goes from z = 0 to the plane z = x + 1,
or in cylindrical coordinates z = r cos θ + 1, therefore the limits on z will be from z = 0 to z = r cos θ + 1.
We see that once z is integrated, r goes from r = 1 to r = 2, and finally, θ has to cover the complete circle,
therefore θ goes from 0 to 2π:
Z 2 Z 2π Z r cos θ+1 Z 2 Z π Z 2 Z π Z 2 Z π
2 2 3 2
I = dr r dθ sin θ dz = dr r dθ sin θ(r cos θ+1) = dr r dθ sin θ cos θ+ dr r dθ sin θ
0 0 0 0 0 0 0 0 0

We need to integrate no more: the integrals over theta are directly zero
Z 2π 2π Z π
1 2

dθ sin θ cos θ = sin θ = 0, dθ sin θ = − cos θ = 0

0 2 0 0 0

Although need not integrate them! those are integrals of odd functions over a symmetric interval! Thus, they
are directly zero, therefore.
I=0
This result could have been easily predicted beforehand: the whole integration contour is symmetric with
respect to the y = 0 plane and f (x, y, z) = y is an odd function.

Spherical coordinates

Another way to characterize a point in a three-dimensional space by giving its distance to the origin, the polar
angle and the azimuthal angle, as depicted in Fig. 5.15. The following is the change of variables between
cartesian coordinates (x, y, z) to polar cylindrical coordinates (r, θ, z)
x = r sin θ cos φ
y = r sin θ sin φ
z = r cos θ
These curvilinear coordinates are very well suited for integration of functions with some degree of spherical
symmetry, equatorial or azimuthal symmetry or integration contours with spherical symmetry. It can be seen
very easily, directly from Figure 5.15 that the sides of the volume element in spherical coordinates are dr, r dθ
and r sin θ dφ, therefore the volume element is
dV = r2 sin θ dr dθ dφ

Therefore we can do the change of coordinates in an integral as follows


ZZZ ZZZ
dx dy dz f (x, y, z) = dr dθ dφ r2 sin θf [x(r, θ, z), y(r, θ, z), y(r, θ, z)]
V V

However, a more systematic approach is to compute the Jacobian of the transformation. The determinant
of the Jacobian matrix in this case is

∂x ∂x ∂x

∂r ∂θ ∂φ sin θ cos φ r cos θ cos φ −r sin θ sin φ

∂y ∂y ∂y
det J = = sin θ sin φ r cos θ sin φ r sin θ cos φ

∂r ∂θ ∂φ



∂z ∂z ∂z

cos θ
−r sin θ 0
∂r ∂θ ∂φ

Multivariable Integration 19 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Figure 5.15: Spherical coordinates and volume element in spherical coordinates.

Computing the determinant using the adjoints method with the third row

det J = r2 cos θ cos2 φ sin θ cos θ + sin2 φ sin θ cos θ +r2 sin θ sin2 θ cos2 φ + sin2 θ sin2 φ
 
| {z } | {z }
sin θ cos θ sin2 θ

Yielding
det J = r2 sin θ(cos2 θ + sin2 θ) = r2 sin θ
Therefore we know that
dV = dx dy dz = dr dθ dφ |J| = dr dθ dφ r2 sin θ

Leading to the same result


ZZZ ZZZ
dx dy dzf (x, y, z) = dr dθ dφ r2 sin θf [x(r, θ, φ), y(r, θ, φ), z(r, θ, φ)]
V V

Example 5.3.8. Revisiting and old friend: compute the volume of the sphere of radius R.
We would like to integrate the volume element
ZZZ
V = dV
Sphere

over the sphere of radius R. We already did that in cartesian coordinates, and was long and tedious. How
about writing the volume and the contour in spherical coordinates. The contour is rather easy: r goes from
r = 0 to r = R. The polar angle runs over all its possible values θ = 0 to θ = π and the azimuthal angle runs
over the whole domain too, φ = 0 to φ = 2π, therefore
ZZZ ZZZ Z R Z π Z 2π Z R Z π
2 2 2
V = dV = dr dθ dφ r sin θ = dr r dθ sin θ dφ = 2π dr r dθ sin θ
Sphere Sphere 0 0 0 0 0

Multivariable Integration 20 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

the two integrals left to compute are trivial:


Z R π
R3
Z π
dr r2 = , dθ sin θ = − cos θ = 2

0 3 0 0

substituting one immediately gets


R3 4
· 2 = πR3
V = 2π ·
3 3
Example 5.3.9. The density of a given material is given by the function

ρ(x, y, z) = (x2 + y 2 + z 2 )2

Calculate the mass of an object of the shape of an eight of a sphere of radius 1 made of that material.
The function is totally symmetric with respect to sign changes in any of the coordinates, this means it
does not matter in which octant we place the quarter of sphere. Let us place it in the first octant as shown in
Figure 5.17

Figure 5.16: The integration region: The first octant

The integration region is again rather simple in this case, as shown in figure 5.17. r goes from 0 to 1, θ
goes through half its range (from the pole to the equator) from 0 to π/2 and φ goes through a quarter of its
range, from 0 to π/2, therefore
Z 1 Z π Z π
2 2
M= dr dθ dφ r2 sin θ ρ[x(r, θ, φ), y(r, θ, φ), z(r, θ, φ)]
0 0 0

The integrand ρ(z, y, z) has a very simple expression in spherical coordinates, since x2 + y 2 + z 2 = r2 ,

ρ(r, θ, φ) = r4

hence π π 1 h
1
r7 iπ π
Z Z Z 
6
2 2 2 π
M= dr r dθ sin θ dφ = − cos θ =
0 0 0 7 0 0 2 14
Example 5.3.10. Find the volume of an ellipsoid of semiaxes a, b, c, depicted in Fig. 5.17
The equation of an ellipsoid of semiaxes a, b and c is
x2 y 2 z 2
+ 2 + 2 =1
a2 b c

Multivariable Integration 21 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Figure 5.17: ellipsoid of semiaxes a, bb and c

In this occasion, it is convenient to cook up our own change of coordinates to simplify the problem. Much in
the same fashion as in the case of elliptical coordinates, we can define now ellipsoidal coordinates that capture
the symmetries of the elliptical contour

x = a r sin θ cos φ
y = b r sin θ sin φ
z = c r cos θ

Being a bit clever, we don’t need to go over the whole Jacobian calculation again. If we observe that the
Jacobian determinant will be almost identical to the spherical coordinates case, only that each row is going
to be multiplied by a, b and c respectively

∂x0 ∂x0 ∂x0




a a a
∂r ∂θ ∂φ

∂y 0 ∂y 0 ∂y 0

det J = b b b


∂r ∂θ ∂φ

∂z 0 ∂z 0 ∂z 0
c c c
∂r ∂θ ∂φ

where the partial derivatives of x0 , y 0 , z 0 here correspond to the spherical coordinates derivatives . Using the
properties of determinants

∂x0 ∂x0 ∂x0 ∂x0 ∂x0 ∂x0




a a a
∂r ∂θ ∂φ ∂r ∂θ ∂φ

∂y 0 ∂y 0 ∂y 0 ∂y 0 ∂y 0 ∂y 0

det J = b b b = abc = abc r2 sin θ

∂r ∂θ ∂φ ∂r ∂θ ∂φ

∂z 0 ∂z 0 ∂z 0 ∂z 0 ∂z 0 ∂z 0
c c c
∂r ∂θ ∂φ ∂r ∂θ ∂φ

Therefore, whet we have to integrate now is


ZZZ ZZZ
V = dV = abc dr dθ dz r2 sin θ
Ellipsoid Ellipsoid

Multivariable Integration 22 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Notice that these coordinates are not the same as Spherical coordinates and as such, r, for instance, does
not represent the usual isotropic radial coordinate. We need to rewrite the equation of the ellipsoid in these
elliptical coordinates, it is straightforward to see that this equation is simply
r=1
therefore
ZZZ Z 1 Z π Z 2π Z 1 Z π
2 2 2
V = abc dr dθ dφ r sin θ = abc dr r dθ sin θ dφ = 2π dr r dθ sin θ
Ellipsoid 0 0 0 0 0

the two integrals left to compute are trivial:


Z 1 Z π
1 π
dr r2 = , dθ sin θ = − cos θ = 2

0 3 0 0

substituting one immediately gets


4
V = πabc
3
Example 5.3.11. Find the integral of the function f (x, y, z) = xyz in the volume enclosed by the sphere
x2 + y 2 + z 2 = R2 in the octant x ≤ 0, y ≤ 0, z ≤ 0
Again, given the shape of the integration contour, spherical coordinates seem appropriate to solve this
integral. This octant in spherical coordinates is defined by r ∈ [0, 1], θ ∈ [π/2, π] and φ ∈ [π, 3π/2] The
integrand in spherical coordinates is
xyz = r3 sin2 θ cos θ sin φ cos φ
therefore the integral, considering the integration boundaries, results
Z R Z π Z 3π
2
5 3
I= dr r dθ sin θ cos θ dφ sin φ cos φ
π
0 2
π

All the integrals are trivial ones


R π
π 3π 3π
R6 sin4 θ sin2 φ 2
Z Z Z
5 3 1 2 1
dr r = , dθ sin θ cos θ = =− , dφ sin φ cos φ = =
0 6 π 4 π 4 π 2 π 2
2 2

Substituting we get
R6 R6
 
1 1
I= · − · =−
6 4 2 48

5.4 Vector fields

A vector field is a vector function of many variables. I.e. A vector whose magnitude and orientation depends
on the point of space
F(x) ≡ F(x1 , . . . , xn )
These vector functions map vectors in Rn to vectors in Rm . For example, commonly we could have maps from
R2 to R2 or R3 to R3  
Fx (x, y, z)
F(x, y, z) =  Fy (x, y, z) 
Fz (x, y, z)

Multivariable Integration 23 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

when a vector field depends on space, or maps from R4 to R3 when the vector field depends on time
 
Fx (x, y, z, t)
F(x, y, z, t) =  Fy (x, y, z, t) 
Fz (x, y, z, t)

Examples of vector fields in Physics are the gravitational or electrostatic field (see for instance Fig. 5.18), or
the velocity of a fluid (see for instance Fig. 5.19) or any force field.

Figure 5.18: Gravitational field created by a mass at the origin and electrostatic field created by a positive
charge

5.4.1 Divergence and Curl of a vector field

Divergence

The divergence of a vector field F(x, y, z) is defined as the dot product of the nabla operator with the vector
field
∂Fx ∂Fy ∂Fz
∇·F = + +
∂x ∂y ∂z

It represents the amount of ‘density’ of the generators of the vector field (density of fluid, density of mass,
density of charge....) which enters or exists a differential region of space per unit volume.

Example 5.4.1. Compute the divergence of the vector field

F = x2 y i + xz 2 j + zx k

The divergence will be


∇ · F = 2xy + 0 + x = x(1 + 2y)

Multivariable Integration 24 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Figure 5.19: Velocity field in a fluid flowing uniformly in a given direction and moving around a vortex

It is convenient to find expressions for the divergence in cylindrical and spherical coordinates. To do that
we express the canonical vectors in cylindrical (êr , êθ , k) and spherical (êr , êθ , êφ ) in terms of the canonical
vectors in cartesian coordinates (i, j, k), and taking into account that, contrary to cartesian canonical vectors,
the point to different directions depending of their position in space, we have to carefully compute all the
nested derivatives. The result is as follows.

For a vector field expressed in cylindrical coordinates

 
Fr
F(r, θ, z) =  Fθ 
Fz

the divergence is
1 ∂ 1 ∂Fθ ∂Fz
∇·F= (rFr ) + +
r ∂r r ∂θ ∂z

For a vector field expressed in spherical coordinates

 
Fr
F(r, θ, φ) =  Fθ 

the divergence is
 
1 ∂ 2 1 ∂ ∂Fφ
∇·F= (r Fr ) + (sin θFθ ) +
r2 ∂r r sin θ ∂θ ∂φ

Multivariable Integration 25 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Curl

The divergence of a vector field F(x, y, z) is defined as the cross product of the nabla operator with the vector
field
i j k
     
∂ ∂ ∂ ∂Fz ∂Fy ∂Fx ∂Fz ∂Fy ∂Fx
∇×F = = − i + − j + − k

∂x ∂y ∂z ∂y ∂z ∂z ∂x ∂x ∂y


F Fy Fz
x

It is the vector characterizing the amount and direction of rotation of a vector field in an infinitesimally small
region.

Same as before, it is useful to provide expressions for the curl in cylindrical and spherical coordinates.
They are obtained following the same procedure as with the divergence.

For a vector field expressed in cylindrical coordinates



Fr
F(r, θ, z) =  Fθ 
Fz

the curl will be


     
1 ∂Fz ∂Fθ ∂Fr ∂Fz 1 ∂ ∂Fr
∇×F = − êr + − êθ + (rFθ ) − k
r ∂θ ∂z ∂z ∂r r ∂r ∂θ

For a vector field expressed in spherical coordinates



Fr
F(r, θ, φ) =  Fθ 

the curl will be


     
1 ∂ ∂Fθ 1 1 ∂Fr ∂ 1 ∂ ∂Fr
∇×F = (sin θFφ ) − êr + − (rFφ ) êθ + (rFθ ) − k
r sin θ ∂θ ∂φ r sin θ ∂φ ∂r r ∂r ∂θ

5.4.2 Vector calculus identities

There are a few important identities which are very easy to prove and they are extremely useful in math and
physics

Curl of the gradient

The curl of the gradient of any scalar field (function) V (x, y, z) is always zero

∇ × (∇V ) = 0

Multivariable Integration 26 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Divergence of the curl

The divergence of the curl of any vector field A(x, y, z) is always zero

∇ · (∇ × A) = 0

Curl of the curl

The curl of the curl of any vector field A(x, y, z) can be expressed in terms of the gradient of its divergence
and its Laplacian
∇ × (∇ × A) = ∇(∇ · A) − ∇2 A
where
∂2 ∂2 ∂2
∇2 = ∇ · ∇ = 2
+ 2+ 2
∂x ∂y ∂z

5.5 Line Integral of a vector field

A line integral, sometimes called path integral, curve integral or curvilinear integral, is an integral of a vector
function along a curve in space. It can be seen as the sum of all the infinitesimal projections of the vector
field along the infinitesimally small line tangent to the curve at every point.
Consider the parametric curve C defined by
 
x(t)
rC (t) =  y(t) 
 
z(t)

drC
Given that the tangent vector to the curve rC (t) is the velocity vector v = , the projection of the vector
dt
field F(x, y, z) onto the tangent to the curve will be the dot product of F(r) (evaluated on the curve) with the
velocity vector
drC
F(rC ) ·
dt
if we want to sum up all the infinitesimal projections alongside the curve from the points where t = a to t = b
(this is, r(a), r(b)) in infinitesimally small increments dt we get
Z
drC
I= F[rC (t)] · dt
C dt
which is the line integral of F alongside the curve. The usual notation, which is of course self-consistent, is
Z Z r(b) Z b
drC
I= F(r) · dr = F (r) · dr = F[rC (t)] · dt
C r(a) a dt
Example 5.5.1. Consider the vector field
 
xyz
F(x, y, z) =  y 2 
 
z

Multivariable Integration 27 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

and the curve  


t
t
r(t) =  
t
for 0 ≤ t ≤ 1. Calculate the integral of he vector field along the curve r(t).
We need to compute
Z r(b) Z 1
F · dr = F · v(t) dt
r(a) 0

First we need to compute F · v(t). Since x(t) = t, y(t) = t, z(t) = t we get that
 3  
t 1
 t2  dr(t)  
F(x, y, z) =   , v(t) = =1
dt
t 1

Therefore
F · v = t3 + t2 + t
Substituting in the line integral
Z b Z 1 Z 1
1 1 1 13
F · dr = F · v(t) dt = (t3 + t2 + t) dt = + + =
a 0 0 4 3 2 12

Application: Work

Imagine that we want to compute the work done when moving a mass through a given force field F. We know
that for constant forces and displacements
W = F · ∆r
But what if the force field varies at every single point of space? What if the displacement is not a uniform
trajectory (think of the gravitational field, for example). We need to sum all the small elements of work along
the movement of the particle, describing a curve r(t).
The work done against (or by) a force field to move a mass along a curve C from a point r(a) to r(b) will
be given by
Z Z b
dr
W = F(r) · dr = F[r(t)] · dt
C a dt
Example 5.5.2. Prove that the work done by any force field F(x, y, z) going on an arbitrary trajectory r(t)
between the times t = a and t = b is equal to the change of kinetic energy between these two times:
1
∆EK = m [v(b)]2 − [v(a)]2

2

We know that Z Z Z
dr
W = F(r) · dr = F· dt = F · v dt
C C dt C
Now, from Newton’s second Law F = m a:
Z Z
dv
W =m a · v dt = m · v dt
C C dt

Multivariable Integration 28 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

But now the integral is immediate!: since


dv 1d 1 d(v2 )
·v = (v · v) =
dt 2 dt 2 dt
we can substitute in the expression for the work and get
Z b
1 d(v2 ) 1
dt = m [v(b)]2 − [v(a)]2 ] = ∆EK

W = m
2 a dt 2
which is what we wanted to prove.

5.5.1 Line integrals of gradient fields: Path independence

An extremely interesting remark: What if the vector field F is the gradient of a scalar field (a scalar function):
F(x, y, z) = ∇V (x, y, z)
Consider that we want to integrate this gradient field along a curve r(t) from t = a to t = b. This will be
Z r(b) Z b
dr
I= F(r) · dr = ∇V (r) · dt
r(a) a dt
Let us first make the following observation, If we compute the total derivative of V (x, y, z) along the curve
r(t) with respect to t we get
dV [r(t)] dV [x(t), y(t), z(t)] ∂V dx ∂V dy ∂V dz dr
= = + + = ∇V ·
dt dt ∂x dt ∂y dt ∂z dt dt
dr dV [r(t)]
therefore, we can substitute ∇V · by in the line integral, yielding
dt dt
Z b
dV [r(t)]
I= dt = V [r(b)] − V [r(a)]
a dt
So, the line integral of a gradient field only cares about the starting point r(t = a) and the ending point
r(t = b), and does not care about the different trajectories that we use to connect these two points.
We call these fields that satisfy that F = ∇V gradient fields or conservative fields.
As an observation, the gravitational field or the electrostatic fields are conservative fields, so the work done
when moving subjected to these forces is independent of the path, only depends on the value of the potential
V at the beginning and the end of the path.
Example 5.5.3. Consider the potential V (x, y, z) = x2 + y 2 + z and the force field
 
2x
F = ∇V =  2y 
1
Compute the work done to move a mass from the point (0, 0, 0) to the point (1, 2, 4), first using the fact that
this is a conservative field (F = ∇V ), and then performing the line integral over these two different paths
  1 
t 2t
r =  2t  , and r= t 
4t t2

Multivariable Integration 29 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Since we are integrating a conservative field, we know that the line integral in this case will be just the
difference between the value of the potential at the end of the trajectory and at the starting point
Z
I= F · dr = V [r(b)] − V [r(a)] = V (1, 2, 4) − V (0, 0, 0) = 9 − 0 = 9
C

And this is independent of the trajectory we choose to go from one place to the other.
Now, let us compute it explicitly for the two trajectories given. For the first one
 
t
r =  2t 
4t

we obtain that the extremes (0, 0, 0) and (1, 2, 4) correspond respectively to t = 0 and t = 1, therefore
Z 1 Z 1
dr(t)
I= F · dr = F· dt
0 0 dt

the vector field evaluated along the curve is



  
2x(t) 2t
F =  2y(t)  =  4t 
1 1

and the velocity vector of the parametric curve is


 
1
dr(t)  
= 2
dt
4

Substituting in the integral we get


Z 1 Z 1
dr(t) h i1
I= F· dt = (2t + 8t + 4) dt = 5t2 + 4t = 9
0 dt 0 0

Which, of course, coincide with the potential evaluation we did in the first place.
Now, for the second trajectory
1
 
2t
r= t 
t2
we obtain that the extremes (0, 0, 0) and (1, 2, 4) correspond respectively to t = 0 and t = 2, therefore
Z 2 Z 1
dr(t)
I= F · dr = F· dt
0 0 dt

the vector field evaluated along the curve is



  
2x(t) t
F =  2y(t)  =  2t 
1 1

Multivariable Integration 30 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

and the velocity vector of the parametric curve is


1
 
2
dr(t)  
= 1 
dt  
2t

Substituting in the integral we get


2 1 2
9t2
Z Z  
dr(t) 1
I= F· dt = t + 2t + 2t dt = =9
0 dt 0 2 4 0

Which, of course, coincide with the potential evaluation we did in the first place and the previous result.

5.5.2 Circulation of a vector field (Line integral over a closed loop)

If the integration path is a closed loop, the starting and end points coincide r(a) = r(b). We call the line
integrals over closed loops circulations, and we use a special notation for them
I
F · dr
C

The convention is that the integration in this case is done counterclockwise, i.e. the interior of the loop is
always on the left when looking in the direction of the tangent vector to the curve, as shown in Figure 5.20

Figure 5.20: Circulation of a vector field F. T̂ represents the tangent vector to the curve at each point.

From the previous result, we know that the circulation of any conservative field (F = ∇V ) is zero, since it
will be the difference between the potential evaluated at the beginning and end of the trajectory, and in the
case of a circulation, both points coincide.
Intuitively, we can also say that if the vector field does not change of direction, the circulation will also
be zero, since we will be adding up as much of positive components (one way trip) as negative components
(return trip)
Example 5.5.4. Consider the circular trajectory
! !
R cos t dr −R sin t
r= ⇒ =
R sin t dt R cos t

Multivariable Integration 31 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Compute the circulation of the following vector fields along the circular trajectory

F1 = K i
K
F2 = K êr = p (x i + y j)
x + y2
2

F3 = K(−y i + x j)

• First case

We can anticipate this circulation will be zero since the vector field is constant, graphically it is easy to see
from Fig. 5.21 it is very easy to compute the circulation

Figure 5.21: Vector field F1 = K i and circular integration path r(t).

I I Z 2π
I= F1 · dr = F1 · v dt = −KR dt sin t = 0
C C 0

• Second case

We can anticipate this circulation will also be zero since the vector field is always perpendicular to the
integration path, graphically it is easy to see from Fig. 5.22 it is very easy realize that since F2 only has
radial component and the tangent to the trajectory always points in the direction of êθ , since er · eθ = 0, then
F2 · v = 0. it is also trivial to see if one doesn’t realize of this and does the brute force calculation. Therefore
I I
I= F2 · dr = F2 · v dt = 0
C C

• Third case

Multivariable Integration 32 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

K
Figure 5.22: Vector field F2 = √ (x i + y j) and circular integration path r(t).
x2 +y 2

Figure 5.23: Vector field F3 = K(−y i + x j) and circular integration path r(t).

Multivariable Integration 33 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

We can anticipate this circulation will not be zero since the vector field varies non equally along the trajectory,
as shown in Fig. 5.23 The vector field along the trajectory is

F3 = K(−y(t) i + x(t) j) = KR(− sin t i + cos t j) ⇒ F3 · v = KR2 (sin2 t + cos2 t) = KR2

therefore I I Z 2π
I= F3 · dr = F3 · v dt = KR2 dt = 2πKR2
C C 0

5.6 Surface integrals of a vector field (Flux integrals)

A surface (or flux) integral of a vector field F across a surface S is the sum of all the infinitesimally components
perpendicular to the surface element dS of the vector field F, summed over the whole surface S.
In other words, the integral accounts for the flux of F that crosses the surface S. Obviously, if the vector
field is parallel to the surface, there is no flux going across it. The flux will be maximal when the surface is
perpendicular to the vector field.
We define the oriented area element as follows

dS = n̂ dS

where n̂ is a unit vector orthogonal to the surface. The differential flux of a vector field F which crosses the
differential surface element dS is the projection of F along the direction orthogonal to the surface, therefore

dΦ = F · dS = F · n̂ dS

The total flux will be the integral over the whole surface S of these differential flux elements
ZZ ZZ
Φ= F · dS = F · n̂ dS
S S

Similar to line integrals, if the surface of integration is closed, we notate the flux integral as
ZZ
Φ = F · dS
S

If F represents, for instance, the velocity field of a fluid, the flux integral tells us how much fluid per unit
time goes through a given surface (membrane, pipe, etc...).
Notice that the surface element dS is oftentimes notated also as dA.

Example 5.6.1. Evaluate the flux of the field F given by


 
x
F= y
z

through the sphere of radius R.

Multivariable Integration 34 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

The vector orthogonal to the surface of the sphere is n = x i + y j + z k, we need to normalize it to 1:


 
x
1 y
n̂ = p
x2 + y 2 + z 2 z
Therefore, the differential flux element is
x2 + y 2 + z 2 p
dΦ = F · dS = F · n̂ dS = p dS = x2 + y 2 + z 2 dS
x2 + y 2 + z 2
we could
p integrate this knowing that dS = dx dy and that we can write z on the surface of the sphere as
z = R2 − x2 + y 2 , but the symmetry of this problem is asking for spherical coordinates. The surface element
on a sphere in spherical coordinates is (see Fig. 5.24)

Figure 5.24: Element of surface on a sphere of radius r. Notice that r here is a constant, and not a variable
(we are moving on the sphere of constant radius)

dS = R2 sin θ dθ dφ
The surface integral is then written as
ZZ ZZ p ZZ Z 2π Z π
2 3
Φ = F · dS = 2 2 2
x + y + z dS = dθ dφ R R sin θ = R dφ dθ sin θ = 4πR3
Sphere Sphere Sphere 0 0

5.7 Stokes and Gauss Theorems

5.7.1 Stokes theorem

This theorem (formulated by Lord Kelvin) relates the surface integral of the curl of a vector field F over a
surface S to the line integral of the vector field along its boundary ∂S. Concretely
ZZ I
∇ × F · dS = F · dr
S ∂S

Multivariable Integration 35 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

This result is most interesting, since this is telling us that if we have a rotational field A = ∇ × F, the flux
of A through surface only depends on the boundary of the surface. There is an infinite number of different
surfaces which have the same boundary, for example, check for example Figure 5.25

Figure 5.25: The flux of the field v in this figure is the same through the surface S1 and the surface S2 , which
share the same boundary.

Example 5.7.1. Compute the circulation of the vector field

F (x, y, z) = y i + z j + x k

along the quarter-of-a-circle trajectory depicted in Figure 5.26. We can indeed compute the line integral easily

Figure 5.26: trajectory .

enough, in this case, dividing the integration path in three intervals as shown in Figure 5.26
I Z Z Z
F · dr = F · dr + F · dr + F · dr
1
4
Circle C1 C2 C3

We compute first C1 . We parametrize it by

dr1
r1 (t) = t k, 0≤t≤1 ⇒ v1 (t) = =k
dt

Multivariable Integration 36 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Now F along this curve gives a vector orthogonal to v1 (t):

F[r1 (t)] = F(0, 0, t) = t j

therefore
F[r1 (t)] · v1 = 0
we now that the first line integral is zero
Z
F[r1 (t)] · dr = 0
C1

Similarly, we can do the same calculation for C3 , which we parametrize by

dr1
r3 = t j, 0≤t≤1 ⇒ v3 (t) = =j
dt
F along this curve gives
F[r3 (t)] = F(0, t, 0) = t i
therefore
F[r3 (t)] · v3 = 0
we now that the third line integral is zero
Z
F[r3 (t)] · dr = 0
C3

Finally, the line integral along C2 will not be zero. We can parametrize the curve

dr1
r2 = sin t j + cos t k, 0 ≤ t ≤ π/2 ⇒ v2 (t) = = cos t j − sin t k
dt
F along this curve gives
F[r2 (t)] = F(0, sin t, cos t) = sin t i + cos t j
therefore
F[r2 (t)] · v2 = cos2 t
and the line integral through the surface defined by the quarter of circle z 2 + y 2 ≤ 1 with y ≥ 0 and z ≥ 0.
Z Z Z π Z π
2
2 1 2 π
F · dr = F · v2 dt = dt cos t = dt (1 + cos 2t) =
C2 C2 0 2 0 4

Therefore we know that the circulation is I


π
F · dr =
1
Circle 4
4

We can now compute the same thing using Stokes theorem, we can compute this line integral as a surface
integral whose boundaries are defined by the quarter of a circle line

I ZZ
F · dr = ∇ × F · dS
1
4
Circle

Multivariable Integration 37 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

The curl of F is simply


A = ∇ × F = −i − j − k
and the surface of integration (the quarter disc) has a normal vector in the direction of x, pointing towards
negative x, therefore n̂ = −i this means that

A · dS = A · n̂ dS = dS

the flux integral is then simply ZZ


Φ= dS
1
4
Circle

which we can express in polar coordinates for y and z: y = r cos θ, z = r sin θ, therefore
π 1
1
π r2
ZZ Z Z
2 π
Φ= r dr dθ = dr r dθ = =
1
Circle 0 0 2 2 0 4
4

which is of course the same result as before.

5.7.2 Gauss theorem

Gauss theorem, also known as divergence theorem was first formulated by Lagrange and rediscovered by Gauss
50 years after. It relates the flux of a vector field through a surface with the behaviour of the vector field
inside the space bounded by the surface:
ZZZ ZZ
(∇ · F) dV = F · dS (5.7.1)
V ∂V

Example 5.7.2. Suppose that we wish to evaluate the flux of a vector field F = x i + y j + z k through the
unit sphere. We can indeed do the surface integral
ZZ ZZ
Φ = F · dS = F · n̂ dS
S S

we know that the normal vector to the sphere is a vector point in in the radial direction
1
n̂ = p (x i + y j + z k)
x2 + y 2 + z 2

The product of the vector field and the normal function to the sphere gives

x2 + y 2 + z 2 p
F · n̂ = p = x2 + y 2 + z 2
x2 + y 2 + z 2

We want to evaluate this on the surface of the unit sphere, but this quantity is constant on that sphere whose
equation is x2 + y 2 + z 2 = 1, so, on the sphere

F · n̂ =
˙ 1

And we remember that the surface element of a sphere of radius R was dS = R2 sin θ dθ dφ therefore, for the
sphere of radius 1,
dS = sin θ dθ dφ

Multivariable Integration 38 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

and the resulting flux integral is


ZZ Z π Z 2π
Φ = F · n̂ dS = dθ sin θ dφ = 4π
S 0 0

We could have computed this flux using Gauss theorem in a simpler way. We know from gauss theorem
that ZZZ
Φ= (∇ · F) dV
V

and the divergence of F is simply


∇·F=3
therefore we can do the volume integral rather easily
ZZZ
Φ=3 dV
V

4
But we already know that the volume of the sphere is V = πR3 , for the sphere of radius 1 this means that
3
4
Φ = 3 π = 4π
3
Obviously the same result as before.

Derivative switch trick

Imagine that we want to solve the following triple integral


ZZZ Z ∞ Z ∞ Z ∞
dV ψ1 (x)∇ψ2 (x) = dx dy dz ψ1 (x)∇ψ2 (x)
R3 −∞ −∞ −∞

and that we know that the gradient of ψ2 (x, y, z) is a complicated function but the gradient of ψ( x, y, z) is a
simple function. Can we just write the following?
ZZZ ZZZ
dV ψ1 (x)∇ψ2 (x) = − dV [∇ψ1 (x)]ψ2 (x)
R3 R3

It definitely does not seem legit.


1
But what if I tell you that both functions are such that they decay faster than , which it is indeed
|x|
necessary for this volume integral to converge.
We are going to see that if this is fulfilled, we can safely switch the gradients, since the two integrals are
only different by a boundary term.
Let us consider the following vector field F(x) =  ψ1 (x)ψ2 (x), where  is a constant vector field. The
chain rule tells us that
 
∇· [ψ1 (x)ψ2 (x)] =  · [∇ψ1 (x)]ψ2 (x) + ψ1 (x)[∇ψ2 (x)]

Multivariable Integration 39 Eduardo Martı́n-Martı́nez


(April 26, 2014) Eduardo Martin-Martinez - Math 217

Since Gauss theorem (5.7.1) tells us that


ZZZ I
dV ∇· [ψ1 (x)ψ2 (x)] = · dS·ψ1 (x)ψ2 (x)
R3 ∂R3

we can substitute the obtained using the chain rule to get


ZZZ ZZZ I
· dV ψ1 (x)∇ψ2 (x) = −· dV [∇ψ1 (x)]ψ2 (x) + · dS·ψ1 (x)ψ2 (x)
R3 R3 ∂R3

So the two integrals only differ in a surface term. The surface is, in this case, the sphere (or cube) of infinite
radius (or side), if my functions decay rapidly enough when x, y, z → ∞, the function will have a value of zero
at this infinite boundary, so the surface term is zero and we obtain
ZZZ ZZZ
· dV ψ1 (x)∇ψ2 (x) = −· dV [∇ψ1 (x)]ψ2 (x)
R3 R3

since this has to be true for any constant , we conclude


ZZZ ZZZ
dV ψ1 (x)∇ψ2 (x) = − dV [∇ψ1 (x)]ψ2 (x)
R3 R3

So we see that switching the gradient only introduces a minus sign.

Multivariable Integration 40 Eduardo Martı́n-Martı́nez

Вам также может понравиться