Double Integration in Polar Coordinates

While over the past three articles, we’ve seen that double integration over cartesian coordinates is a useful and powerful tool, sometimes these integrals can be difficult to evaluate in their cartesian form. Integrating in polar coordinates by converting a cartesian double integral to its polar form or simply expressing the problem in terms of polar coordinates. Typically, integrals are defined as sums of rectangles, but this makes less sense when looking at polar regions. Let’s look at one:

# diagram of a circle with some polar rectangles
from matplotlib import pyplot, patches
import math

fig = pyplot.figure()
ax = fig.add_axes([0,0,1,1])

circle = patches.Circle((0,0), radius=3, linewidth=1, edgecolor='r', facecolor='none')
innerCircle1 = patches.Circle((0,0), radius=2, linewidth=1, edgecolor='r', facecolor='none')
innerCircle2 = patches.Circle((0,0), radius=1, linewidth=1, edgecolor='r', facecolor='none')

ax.add_patch(circle)
ax.add_patch(innerCircle1)
ax.add_patch(innerCircle2)

for angle in range(0,361,30):
    ax.plot([0,3*math.cos(math.radians(angle))],[0,3*math.sin(math.radians(angle))], color='r')
png

Each of the small regions in the diagram above has some of the properties of a rectangle, namely the distance from the origin of the top and bottom curves being constant, and the angle between the lines making up the sides also being constant. Given these objects are somewhat analogous to rectangles in polar coordinates, we call them polar rectangles. Let’s start by finding the area of a polar rectangle. We’re calling a portion of a circle (eg the portion from x degrees to y degrees) a wedge. Consider the following diagram of a full wedge separated into polar rectangles:

# diagram of a single wedge with contained polar rectangles marked
fig = pyplot.figure()
ax = fig.add_axes([0,0,1,1])

arc1 = patches.Arc((0,0), 6, 6, theta1=60, theta2=120, edgecolor='r')
arc2 = patches.Arc((0,0), 4, 4, theta1=60, theta2=120, edgecolor='r')
arc3 = patches.Arc((0,0), 2, 2, theta1=60, theta2=120, edgecolor='r')

for i in range(1,4,1):
    for angle in [60,120]:
        startX = (i - 1) * math.cos(math.radians(angle))
        endX = i * math.cos(math.radians(angle))
        startY = (i - 1) * math.sin(math.radians(angle))
        endY = i * math.sin(math.radians(angle))
        ax.plot([startX, endX], [startY, endY], color='r')

ax.add_patch(arc1)
ax.add_patch(arc2)
ax.add_patch(arc3)

ax.text(0, 1.5, "The polar rectangle we want", horizontalalignment="center")
ax.text(math.cos(math.radians(60)) + 0.1, math.sin(math.radians(60)), "r1")
ax.text(2 * math.cos(math.radians(60)) + 0.1, 2 * math.sin(math.radians(60)), "r2")

ax.plot(0,0)

pyplot.show()
png

As seen in the diagram, if we take the area of the whole wedge and then subtract from that the area of the inner wedge, we will get the area of the polar rectangle that we want: area of a wedge shaped sector=θ2ππr2=12θr2 So if we take the angle between the edges to be θ, the radius of the inner curve to be r1, and the radius of the outer curve to be r2, we get the following formulas: area of the inner wedge=12θr12 area of the outer wedge=12θr22 Subtracting the area of the outer edge from that of the inner wedge: area of the polar rectangle=(12θr22)(12θr12) This formula is somewhat useful, but doesn’t really lead to us our definition of the double integral for integrating over polar functions. For that, let’s introduce a couple new variables. Suppose ΔAk is the area of some kth polar rectangle, and then suppose rk is the average of the inner and outer radius of this polar rectangle. If we suppose that Δr=r2r1 (the difference of the inner and outer radii), we can say the following: r1=rkΔr2 r2=rk+Δr2 Using Δθ as the notion for the angle between the curves and plugging into the previous area formula, we get the following: (12Δθ(rk+Δr2)2)(12Δθ(rkΔr2)2) Δθ2((rk+Δr2)2(rkΔr2)2) Δθ2(rk2+2rkΔr2+Δr24rk2+2rkΔr2Δr24) Δθ2(4rkΔr2) Δθ2(2rkΔr) ΔθrkΔr Now, let’s say we want to write a partial sum to estimate the area of a polar function, f(rk,θk), over a polar region R, we can do this like follows: Sn=k=1nf(rk,θk)ΔAk However, when we try and turn this into an integral, we just get the following: SnRf(rk,θk)dA But this isn’t very helpful since we don’t what dA is. But since we know what Ak is based on our work earlier, we can transform the partial sum into the following: Sn=k=1nf(rk,θk)ΔθrkΔr We can rewrite the limit of this partial sum into a useful iterated integral: limnSn=Rf(rk,θk)rdθdr Using a theorem from our good old friend Fubini, we can again transform this double integral into two successive single integrations: Rf(rk,θk)rdθdr=θ=αθ=βr=g1(θ)r=g2(θ)f(r,θ)rdrdθ

Example

Let’s try and find the volume between the XY plane and the function f(r,θ)=something in the wedge from θ=π/4 to =3π/4 between the radii r=1 and r=3.

Double Integrals over Polar Coordinates to Calculate Area

Similar to how we can use double integrals over 2D cartesian space to calculate area, we can calulate area using double polar integrals in a similar manner. If we hold f(r,θ) within the integral constant to get rid of the volume calculation like we did for cartesian space, we get the following expression: Rrdrdθ

Example

To show that this formula is consistent with all previous volume formulas, we will consider the case of the volume of a circle. We know that it is πr2, and the integral should be equivalent. First off, we need to figure out our bounds. Since we’re going through the whole circle, our start and end angles, α and β respectively, are 0 and 2π. And again since this is a circle, we can set our inner radius to be 0, and our outer radius to be r, the radius of the circle. This gives us the following: Rrdrdθ=02π0rrdrdθ Evaluating the inner integral yields the following: 0rrdr=12r2|0r=12r2 Then plugging this into the outer integral: 02π12r2dθ=(θ2r2)|02π 2π2r202r3=πr2

Transforming Cartesian Double Integrals into Polar Double Integrals

Sometimes it can be extremely difficult (or basically impossible) to evaluate an integral over cartesian space, but feasible to evaluate over polar space. This means that converting an integral from cartesian space to polar space is a useful technique. This can be done noting that x=rcosθ and that y=rsinθ. Using these two expressions to convert an integral: Rf(x,y)dxdy=Gf(rcosθ,rsinθ)rdrdθ Note also that the regions are different. R is the region over cartesian space and G is the region over polar space.

Example

As an example, let’s look at the following integral over the unit circle in the first and second quadrants: Rex2+y2dA We can define the interval R as being between the x-axis and the curve defined by the equation y=1x2. Or more in terms of integration, we can say that the region is defined over the x-interval [0,1], and the y-intervl [0,1x2]. Let’s try and put this together into an integral over cartesian space: Rex2+y2dA=0101x2ex2+y2dydx Now if we even look at trying to evaluate the inner integral, we can see that it will be quite difficult, and it is in fact impossible with elementary functions. Now, let’s look at turning it into an integral over polar space: f(x,y)=ex2+y2f(r,θ)=e(rcosθ)2+(rsinθ)2 er2cos2θ+r2sin2θ er2(cos2θ+r2sin2θ) er2 Now that we know the formula for the polar form of the function, f(r,θ)=er2, we have to find the bounds of the region in polar form. Since it’s the unit circle, we know that 0r1. Since we’re integrating only over the first two quadrants, we also know that we can bound θ as 0θπ. Writing this out in the form of an integral: Ger2dA=0π01er2rdrdθ Evaluating the inner integral: 01er2rdr First, we need to do a u-substitution. Let’s chose u=r2. Then du=2rdr, which implies dr=du2r. Our bounds of integration remain unchanged since 02=0 and 12=1. Plugging this back into the original expression: 01er2rdr=0112eudu=12eu|u=0u=1=12e112e0=12(e1) Now plugging this into the outer integral: 0π12(e1)dθ=12θ(e1)|0π=π2(e1)