Change of variables in double integrals

Imagine that you had to compute the double integral

Dg(x,y)dA  (1)

where g(x,y) = x2 + y2 and D is disk of radius 7 centered at origin.

PIC

We could start to calculate this as follows.

Dg(x,y)dA = 7749x2 49x2 (x2 + y2)dydx =  a mess

It turns out that this integral would be a lot easier if we could change variables to polar coordinates. In rectangular coordinates, as above, the disk is the region D defined by 7 x 7 and 49 x2 y 49 x2. In polar coordinates, the disk is the region we’ll call D defined by 0 r 7 and 0 θ 2π. Hence the region of integration is simpler to describe using polar coordinates.

Moreover, the integrand x2 + y2 is simple in polar coordinates because x2 + y2 = r2. Using polar coordinates, our lives will be a lot easier because it seems that all we need to do is integrate r2 over the region D defined by 0 r 7 and 0 θ 2π.

Unfortunately, it’s not quite that easy. We need to account for one more consequence of changing variables, which is how changing variables changes area. You may recall that dA stands for the area of a little bit of the region D. In rectangular coordinates, we replaced dA by dxdy (or dydx). The rest of this reading discusses what dA becomes when we change variables. (As you will see, in polar coordinates, dA does not becomes drdθ.)

To see how area gets changed, let’s write the change of variables as the function

T(r,θ) = (r cos θ,r sin θ).  (2)

The function T(r,θ) gives rectangular coordinates in terms of polar coordinates. It maps the region D (shown below in green) into the region D (shown in blue). You can change r and θ by dragging the red point in D. The yellow point moves to show the point T(r,θ) in D (you cannot drag the yellow point directly).

Do you understand why the disk looks like a rectangle in polar coordinates (i.e., why the region D on the left is a rectangle)? Remember, the disk is described by 0 r 7 and 0 θ 2π, which is a rectangle when plotted in the rθ-plane.

We can say that T(r,θ) parametrizes D for (r,θ) in D. (This uses the same language that we used when parametrizing a curve. We’ll use it again when we talk about parametrizing surfaces.)

We can chop up the region D into small rectangles of width Δr and height Δθ. The function T(r,θ) maps each of these small rectangles into “curvy rectangles” in D, as shown below.

The area of each small rectangle in D is ΔrΔθ. But we don’t care about area in D. The dA in the integral of equation (1) is based on area in D not area in D. So we need to estimate the area of each “curvy rectangle” in D.

It turns out that we can approximate each “curvy rectangle” as a parallelogram with sides T r Δr and T θ Δθ. We know the area of a parallelogram is the magnitude of the cross product of the two vectors spanning the parallelogram. So it looks like we are finished.

We have to use one little trick since the cross product is defined only for three-dimensional vectors and T is two-dimensional. We view the vectors T r and T θ as three-dimensional vectors that happen to have zero for their third component. Then, we can take their cross product. We’ll show in lecture that the area of a “curvy rectangle” simplifies to

| det DT(r,θ)|ΔrΔθ,

where DT(r,θ) is the matrix of partial derivatives. (The D in DT(r,θ) is not the same D as the region D of integration; sorry for the poor notation.) Because we need to take the absolute value of the determinant, we typically use the notation “det” to denote determinant to avoid confusion (see discussion at end of the matrices and determinant reading).

For T given by equation (2), you can calculate that | det DT(r,θ)| = r so that the area of each “curvy rectangle” is rΔrΔθ. This agrees with the above picture, since the “curvy rectangles” were larger when r was larger.

The important point is that T stretches or shrinks D when it maps D onto D. Consequently, when we convert from area in D to area in D, we need to multiply by the absolute value of the determinant of the matrix of partial derivatives: | det DT(r,θ)|.

We now put everything back together. We started off trying to integrate the function g(x,y) = x2 + y2 over the region D. If we use (x,y) = T(r,θ) to change variables, we can instead integrate the function g(T(r,θ)) = r2 over the region D. However, we need to include the factor | det DT(r,θ)| = r in dA to account for the stretching by T. We can replace dA with rdrdθ. We end up with the formula

Dg(x,y)dA = Dg(T(r,θ))| det DT(r,θ)|drdθ,

which for our example is

D(x2 + y2)dA =02π07r2rdrdθ =02π07r3drdθ.

You can compute that this integral is 74π2 much easier using this form than you could using the original integral (1).

For a general change of variables, we tend to use the variables u and v (rather than r and θ). In this case, if we change variables by (x,y) = T(u,v), our integral is

Dg(x,y)dA = Dg(T(u,v))| det DT(u,v)|dudv,

where D is a region in the xy-plane that is parametrized by (x,y) = T(u,v) for (u,v) in the region D.

You can see some examples, including more details on the disk example, here.