Figure 21:The polar and Cartesian coordinate systems.
Coordinate systems in R3
There are three standard coordinate systems which are used to describe points in
3-dimensional space. These coordinate systems are
   • the Cartesian coordinate system (which we normally use), in which we
     characterize points by three coordinates (x, y, z) and
   • the cylindrical coordinate system: this coordinate system is a sort of gen-
     eralization of polar coordinates in two dimensions. In cylindrical coordinates
     a point in 3-dimensional space is characterized by coordinates (r, θ, z), which
     are defined as shown in figure 22 (they are the same as in polar coordinates
     plus one extra coordinate describing the height in the z direction),
   • the spherical coordinate system, in which a point in 3-dimensional space
     is characterized by the distance to the origin r and the angles θ, φ defined in
     figure 23,
                                        59
            Figure 22:The cylindrical and Cartesian coordinate systems.
            Figure 23:The spherical and Cartesian coordinate systems.
The relation between cylindrical and spherical coordinates and Cartesian coordi-
nates is given in the figures 21 and 23. For cylindrical coordinates we have
                      x = r cos θ,    y = r sin θ,           z = z,       (2.306)
with 0 ≤ θ ≤ 2π or equivalently
                     p                           ³y´
                 r = x2 + y 2 ,      θ = tan−1           ,       z = z.   (2.307)
                                                     x
                                        60
For spherical coordinates we have
               x = r cos θ sin φ,      y = r sin θ sin φ,   z = r cos φ,       (2.308)
with 0 ≤ θ ≤ 2π and 0 ≤ φ ≤ π or equivalently
                                                              Ãp         !
       p                                ³y´                     x 2 + y2
  r=     x2 + y 2 + z 2 ,   θ = tan−1          ,    φ = tan−1              .   (2.309)
                                          x                        z
Note: When is it convenient to use polar, cylindrical or spherical co-
ordinates instead of Cartesian coordinates? Essentially it depends on the
characteristics of the integration region they are asking us to consider. For exam-
ple, suppose we are asked to solve the following problem: compute the volume
of a sphere of radius 3, characterized by the equation
                                    x2 + y 2 + z 2 = 9.                        (2.310)
We can try to solve the problem in the same way we have seen in the previous
examples. We must sketch the region of integration (see figure 23), then determine
the integration region in x, y and z and compute the integral
                                  Z Z Z
                                          dxdydz.                           (2.311)
                                           R
                   Figure 24:The integration region of our problem.
In terms of the coordinates x, y and z, the integration region is relatively compli-
cated. In fact it is given by
                     n                         √               √
               R = (x, y, z) : −3 ≤ x ≤ 3, − 9 − x2 ≤ y ≤ 9 − x2 ,
                                   p                    p             o
                                 − 9 − x2 − y 2 ≤ z ≤ 9 − x2 − y 2 .         (2.312)
                                              61
If we now try to compute the integral we will soon see that it becomes rather
complicated
                      Z x=3    Z x=√9−x2    Z z=√9−x2 −y2
                  V =       dx     √
                                         dy     √         dz.         (2.313)
                                   x=−3        y=− 9−x2          z=−   9−x2 −y 2
The first integral gives
                 Z √   z=   9−x2 −y 2               √           p
                                                      9−x2 −y 2
                            √               dz = [z] √ 2 2 = 2 9 − x2 − y 2 .        (2.314)
                     z=−        9−x2 −y 2          −    9−x −y
Inserting this result into the integral in y we have
                             Z x=√9−x2 p
                                  √
                                         2 9 − x2 − y 2 dy.                          (2.315)
                                       y=− 9−x2
This integral is not completely trivial to do. The best way to do it is to change
coordinates as
                     √                           √
                 y = 9 − x2 cos α ⇒ dy = − 9 − x2 sin αdα,                 (2.316)
with π ≤ α ≤ 0. Changing coordinates that way, the integral (2.315) becomes
        Z α=0                       Z α=π
                     2    2
      −       2(9 − x )sin (α)dα =        (9 − x2 )(1 − cos(2α))dα
         α=π                          α=0
                                            ·              ¸π
                                          2        sin(2α)
                                 = (9 − x ) α −               = (9 − x2 )π.(2.317)
                                                      2     0
Finally, integrating in x we obtain the volume
                             Z x=3               ·        ¸3
                                         2             x3
                   V = π           (9 − x )dx = π 9x −
                              x=−3                      3
                             µ         ¶     µ         ¶ −3
                                    27              27
                        = π 27 −         − π −27 +        = 36π.                     (2.318)
                                     3               3
Therefore, the final result is 36π which is indeed the volume of a sphere of radius
3‡ . This way of computing the volume is correct but it is in fact much more
complicated than if we had used spherical coordinates from the beginning. In that
case, the integration region is very easy to determine
             R = {(x, y, z) : 0 ≤ r ≤ 3,           0 ≤ θ ≤ 2π,         0 ≤ φ ≤ π},   (2.320)
  ‡
      Remember that the volume of a sphere of radius r is given by:
                                                        4 3
                                                  V =     πr .                        (2.319)
                                                        3
                                                       62
and the only difficulty is to determine how dx dy dz can be expressed in
terms of dr dθ dφ. We will see in the next section how this relation can be found.
The result we are going to find is
                                       dx dy dz = r2 sin φ dr dθ dφ.                         (2.321)
If we know this, then we can compute our integral very easily. It is just
               Z r=3      Z θ=2π Z φ=π
                      2
        V =          r dr       dθ     sin φ dφ
                    r=0               θ=0         φ=0
                Z    r=3          Z    θ=2π                         Z   r=3       Z   θ=2π
            =               2
                           r dr               dθ [− cos φ]π0   =2    r dr     2
                                                                                dθ
                    r=0               θ=0                       r=0        θ=0
                    Z r=3                          Z r=3            · 3 ¸3
                                                                     r         27
            = 2             r2 dr [θ]2π
                                     0        = 4π        2
                                                         r dr = 4π         = 4π = 36π. (2.322)
                     r=0                            r=0               3 0       3
We can say as a conclusion that whenever the integration region is a sphere (or
part of a sphere), we must use spherical coordinates. If the integration region
is a cylinder (or part of a cylinder), we must use cylindrical coordinates. If the
integration region is a disk (or part of one) it is best to use polar coordinates.
2.5.3   Change of variables and Jacobians
In the previous example we saw that, once we have identified the type of coordinates
which is best to use for solving a particular problem, the next step is to do the change
of coordinates on the integral we want to compute. One way to see how this goes,
is to draw a picture of an infinitesimal element of volume (or surface, if we are
doing an integral of a function of two variables) and compute its volume (surface)
in terms of the new variables. Let us do that for the simplest case of two variables.
                                Figure 25:Differentials of surface.
                                                        63
Consider an infinitesimal rectangle in Cartesian coordinates. Its area is given by
ds = dx dy. What is the surface of an elementary infinitesimal region in polar
coordinates? The answer follows from figure 25, that is
                                        dx dy = r dθ dr.                             (2.323)
Therefore, given an integral
                                        Z Z
                                  I=                f (x, y)dxdy,                    (2.324)
                                               R
a change to polar coordinates will give
                             Z Z
                        I=          f (r cos θ, r sin θ)rdθdr,                       (2.325)
                                    R0
where R0 is the integration region R in terms of the new coordinates.
Example: Compute the integral
                                          Z Z p
                                  I=                     x2 + y 2 dxdy,              (2.326)
                                                   R
      on a disk of radius a. This is a typical case in which the best is to use polar
      coordinates (the integration region is a disk!). In polar coordinates
                          R = {(r, θ) : 0 ≤ r ≤ a,                 0 ≤ θ ≤ 2π}.      (2.327)
      In addition, we have seen before that
                           p
                             x2 + y 2 = r,                 dx dy = r dr dθ,          (2.328)
      therefore, the integral in polar coordinates is simply
                                      Z r=a      Z θ=2π
                                             2
                                  I=        r dr        dθ.                          (2.329)
                                              r=0            θ=0
      The integral in θ is just
                                    Z    θ=2π
                                                dθ = [θ]2π
                                                        0 = 2π.                      (2.330)
                                        θ=0
      So we finally get
                                    Z    r=a                 ·     ¸a
                                                2        r3                 2πa3
                           I = 2π              r dr = 2π                =        .   (2.331)
                                        r=0              3          0        3
We have found the result (2.323) from geometrical considerations (from figure 25).
This can be done for any change of coordinates, in 2 or 3 dimensions. However
there is a more systematic way to compute the element of volume or surface under
a change of coordinates. In general we have:
                                                    64
Definition: Let (x, y) be the Cartesian coordinates in 2-dimensional space and
consider a generic change of variables
                       x = x(u, v),      and         y = y(u, v),           (2.332)
(u, v) being the new variables. Then the differentials of surface are related in the
following way
                                dx dy = |J| du dv,                           (2.333)
where |J| is the modulus of the following determinant
                                     ¯         ¯
                                     ¯ ∂x ∂x ¯
                                     ¯         ¯
                                     ¯ ∂u ∂v ¯
                                     ¯         ¯
                                 J =¯          ¯                       (2.334)
                                     ¯ ∂y ∂y ¯
                                     ¯         ¯
                                     ¯         ¯
                                       ∂u ∂v
This determinant is called the Jacobian of the transformation of coordinates.
Example 1: Use the Jacobian to obtain the relation between the differentials of
    surface in Cartesian and polar coordinates.
     The relation between Cartesian and polar coordinates was given in (2.304).
     We can easily compute the Jacobian,
             ¯          ¯
             ¯ ∂x ∂x ¯
             ¯          ¯
             ¯ ∂r ∂θ ¯ ¯¯                   ¯
             ¯          ¯ ¯ cos θ −r sin θ ¯¯
        J =¯            ¯=                    = r cos2 θ + r sin2 θ = r. (2.335)
             ¯ ∂y ∂y ¯ ¯ sin θ r cos θ ¯
             ¯          ¯
             ¯          ¯
                ∂r ∂θ
     Therefore
                                  dx dy = r dr dθ,                       (2.336)
     which is the same result as (2.323).
Example 2: Find the Jacobian of the transformation
                              x = v/u,         and       y = v.             (2.337)
     Using these new variables evaluate the integral
                                 Z x=1 Z y=x 2
                                              y y/x
                             I=                2
                                                 e dxdy                     (2.338)
                                   x=0   y=0 x
     We start by computing the    Jacobian
                         ¯             ¯
                         ¯ ∂x      ∂x ¯¯
                         ¯                  ¯        ¯
                         ¯ ∂u      ∂v ¯¯ ¯ −v/u2 1/u ¯
                    J =¯
                         ¯
                                       ¯ = ¯¯        ¯=−v.                  (2.339)
                         ¯ ∂y                 0   1  ¯
                         ¯         ∂y ¯¯                u2
                         ¯             ¯
                           ∂u      ∂v
                                         65
      Therefore
                                                v
                                   dx dy = |J|du dv =
                                                  du dv.                                        (2.340)
                                               u2
      Now we have to transform the function we want to integrate,
                                                y 2 y/x
                                                  2
                                                    e = u2 e u ,                                (2.341)
                                                x
      and we have to find the new integration region
                                        0≤x≤1              ⇔       0 ≤ v ≤ u,                   (2.342)
                                        0≤y≤x              ⇔       0 ≤ u ≤ 1.                   (2.343)
      Therefore the integral we need to compute is
                                   Z u=1       Z v=u
                                           u
                               I=         e du       v dv.                                      (2.344)
                                               u=0               v=0
      The first integral is         Z                     ·     ¸v=u
                                         v=u
                                                      v2                    u2
                                               v dv =                   =      ,                (2.345)
                                        v=0           2           v=0       2
      and so                                         Z    u=1
                                                1
                                             I=                 u2 eu du.                       (2.346)
                                                2        u=0
      This integral can be done by using integration by parts twice
          Z u=1                         Z u=1               Z u=1
                  2 u
                             £ 2 u ¤1             u
                 u e du = u e 0 −             2ue du = e −        2ueu du
            u=0                           u=0                u=0
                                            Z u=1                  Z u=1
                                      u 1           u
                         = e − [2ue ]0 +          2e du = e − 2e +        2eu du
                                                          u=0                             u=0
                              =   [2eu ]10    − e = 2e − 2 − e = e − 2.                         (2.347)
      Therefore
                                                          e−2
                                                  I=          .                                 (2.348)
                                                           2
Definition: Let (x, y, z) be the Cartesian coordinates in 3-dimensional space and
consider a generic change of variables
                x = x(u, v, t),      y = y(u, v, t) and                     z = z(u, v, t),     (2.349)
(u, v, t) being the new variables. Then the differentials of surface are related in the
following way
                                dx dy dz = |J| du dv dt,                        (2.350)
                                                     66
where |J| is the modulus of the following determinant
                                   ¯              ¯
                                   ¯ ∂x ∂x ∂x ¯
                                   ¯              ¯
                                   ¯ ∂u ∂v ∂t ¯
                                   ¯              ¯
                                   ¯              ¯
                                   ¯ ∂y ∂y ∂y ¯
                               J =¯¯              ¯                    (2.351)
                                     ∂u  ∂v   ∂t  ¯
                                   ¯              ¯
                                   ¯              ¯
                                   ¯              ¯
                                   ¯ ∂z ∂z ∂z ¯
                                   ¯              ¯
                                     ∂u ∂v ∂t
This determinant is called the Jacobian of the transformation of coordinates.
Example 1: The Jacobian of cylindrical coordinates.
     The relation between Cartesian and cylindrical coordinates was given in (2.306).
     We can easily compute the Jacobian,
             ¯              ¯
             ¯ ∂x ∂x ∂x ¯
             ¯              ¯
             ¯ ∂r ∂θ ∂z ¯
             ¯              ¯ ¯                       ¯
             ¯              ¯ ¯ cos θ −r sin θ 0 ¯
             ¯ ∂y ∂y ∂y ¯ ¯                           ¯
        J = ¯¯              ¯ = ¯ sin θ r cos θ 0 ¯ = r cos2 θ + r sin2 θ = r.
                            ¯    ¯                    ¯
             ¯ ∂r ∂θ ∂z ¯ ¯ 0                0      1 ¯
             ¯              ¯
             ¯              ¯
             ¯ ∂z ∂z ∂z ¯
             ¯              ¯
                ∂r ∂θ ∂z
                                                                            (2.352)
     Therefore
                         dx dy dz = |J| dr dθ dz, = r dr dθ dz,             (2.353)
Example 2: The Jacobian of spherical coordinates.
     The relation between Cartesian and spherical coordinates was given in (2.308).
     The Jacobian is,
            ¯               ¯
            ¯ ∂x ∂x ∂x ¯
            ¯               ¯
            ¯ ∂r ∂θ ∂φ ¯
            ¯               ¯ ¯                                               ¯
            ¯               ¯
            ¯ ∂y ∂y ∂y ¯ ¯¯ cos θ sin φ −r sin θ sin φ r cos θ cos φ ¯¯
            ¯               ¯ ¯
     J = ¯                  ¯ = sin θ sin φ r cos θ sin φ r sin θ cos φ ¯¯
            ¯ ∂r ∂θ ∂φ ¯ ¯¯
            ¯               ¯       cos φ             0           −r sin φ ¯
            ¯               ¯
            ¯ ∂z ∂z ∂z ¯
            ¯               ¯
            ¯ ∂r ∂θ ∂φ ¯
        = −r2 cos2 θ sin3 φ − r2 sin2 θ cos2 φ sin φ − r2 cos2 θ cos2 φ sin φ
       − r2 sin2 θ sin3 φ = −r2 sin3 φ(cos2 θ + sin2 θ) − r2 cos2 φ sin φ(cos2 θ + sin2 θ)
        = −r2 sin3 φ − r2 cos2 φ sin φ = −r2 sin φ(sin2 φ + cos2 φ) = −r2 sin φ.(2.354)
     Therefore
                       dx dy dz = |J| dr dθ dφ = r2 sin φ dr dθ dφ,            (2.355)
                                         67
Let us now see a couple of examples of integral where we use cylindrical and spherical
coordinates:
Example 1: Use cylindrical coordinates to evaluate the following integral
                             Z Z Z
                                     (x2 + y 2 )dxdydz,                   (2.356)
                                        R
     where R is the solid bounded by the surface x2 + y 2 = 2z and the plane z = 2.
     As usual, we start by sketching the integration region. The first equation
     x2 + y 2 = 2z is a paraboloid (one of the quadratic surfaces we saw some time
     ago!). The integration region looks more or less like that
                     Figure 26:The integration region of our problem.
     Now we want to do the integral in cylindrical coordinates. We have seen
     before that
                     x2 + y 2 = r 2 ,  dx dy dz = r dr dθ dz         (2.357)
     so the integral we want to compute is
                                  Z Z Z
                                                  r3 drdθdz,                  (2.358)
                                             R0
     where R0 is the integration region in cylindrical coordinates. From the picture
     and the information given by the problem it is easy to find
                                    √
           R0 = {(r, θ, z) : 0 ≤ r ≤ 2z, 0 ≤ θ ≤ 2π, 0 ≤ z ≤ 2}.             (2.359)
                                            68
     Therefore our integral is
                             Z                Z                 Z      √
                                  z=2              θ=2π              r= 2z
                                        dz                 dθ                 r3 dr.                 (2.360)
                                 z=0              θ=0               r=0
     The integral in r is
                              Z      √
                                   r= 2z                   ·        ¸√2z
                                                      r4
                                              r3 dr =                      = z2.                     (2.361)
                                  r=0                 4              0
     The integral in θ is simply
                                    Z    θ=2π
                                                  dθ = [θ]2π
                                                          0 = 2π.                                    (2.362)
                                        θ=0
     Therefore, the final result is
                                   Z    z=2                 ·        ¸2
                                                  2  z3                       16π
                              2π              z dz =                      =       .                  (2.363)
                                       z=0           3                0        3
Example 2: Use spherical coordinates to compute the volume of the solid
                                                                      pbounded
    above by the sphere x2 + y 2 + z 2 = 16 and below by the cone z = x2 + y 2 .
     The region of integration for this problem is given in the picture below:
                                                                                       p
     Figure 27:The sphere x2 + y 2 + z 2 = 16 and the cone z =                          x2 + y 2 . The dashed
                            region is our integration region.
                                                      69
The integral we have to compute is
                 Z Z Z             Z Z Z
                         dxdydz =        r2 sin φdrdθdφ.                                                (2.364)
                              R                                         R0
Here we have only used the result (2.355) and we called R0 the integration in
spherical coordinates. In order to determine R0 we notice the following: the
equation of the sphere in figure 26 in spherical coordinates (see (2.308)) is just
                                    x2 + y 2 + z 2 = r2 = 16,                                           (2.365)
and the equation of the cone is
                  q
         r cos φ = r2 sin2 φ cos2 θ + r2 sin2 φ sin2 θ = r sin φ,                                       (2.366)
from this equation it follows
                                                                                      π
                                   tan φ = 1                   ⇒         φ=             .               (2.367)
                                                                                      4
This is the angle of the cone with respect to the z axes. Therefore, we just
have to integrate in the following region
       R0 = {(r, θ, φ) : 0 ≤ r ≤ 4,                      0 ≤ θ ≤ 2π,                   0 ≤ φ ≤ π/4}.    (2.368)
The volume is thus
                              Z    r=4               Z    θ=2π          Z    φ=π/4
                                            2
                        V =                r dr                    dθ                       sin φ dφ,   (2.369)
                                  r=0                    θ=0                φ=0
with
        Z    φ=π/4
                                                                             √
                                            φ=π/4                  1      2− 2
                     sin φ dφ =    [− cos φ]φ=0                = −√ + 1 =      .                        (2.370)
            φ=0                                                     2       2
                                       Z    θ=2π
                                                     dθ = [θ]2π
                                                             0 = 2π,                                    (2.371)
                                           θ=0
and                                Z                           ·        ¸4
                                        r=4
                                                 2      r3                            64
                                                 r dr =                      =           .              (2.372)
                                       r=0              3                0             3
Therefore the volume is                                                 √
                                               64π(2 −                       2)
                                           V =                                    .                     (2.373)
                                                    3
                                                     70