# Convert Iterated Integral to Polar Coordinates

Okay, I know that this question is probably somewhere on this site. But I couldn't find it after looking for over an hour so I'm just going to post it.

The prompt is to convert this integral to polar coordinates. $$\int_0^1 \int_0^{2-x} dydx$$

I know that this region is a triangle with vertices (2,0), (0,0), and (0,2) but that it is constrained by x = 1.

Here is my attempt at the solution.

$$\int_0^{\pi/2} \int_0^{1/\cos(\theta)} rdrd\theta = \frac{1}{4}\pi \sec^2(r)$$

Which is not correct. I think the limits on theta are right, since the region is only in the first quadrant. I attempted to use trigonometry to get the limits on r, but I can't seem to get it right because I cannot get the correct answer, which is:

$$1.5$$

To begin with, it should be obvious that $$\int_0^{\pi/2} \int_0^{1/\cos(\theta)} r\,dr\,d\theta \neq \tfrac14\pi \sec^2(r)$$ because $r$ is a variable of integration and should have been eliminated when you take the definite integral. In fact, $$\int_0^{1/\cos(\theta)} r\,dr = \tfrac12 \sec^2 \theta,$$ (see confirmation by Wolfram Alpha), so if the integral $\int_0^{\pi/2} \int_0^{1/\cos(\theta)} r\,dr\,d\theta$ is defined, then $$\int_0^{\pi/2} \int_0^{1/\cos(\theta)} r\,dr\,d\theta = \int_0^{\pi/2} \left(\frac12 \sec^2 \theta\right)\,d\theta.$$

But when you evaluate that you will see that your bounds are still incorrect.

The problem is that your polar bounds of integration go out to the line $x=1$ in every direction $\theta$ such that $0 < \theta < \tfrac\pi2$, but the actual region does not extend out that far in all those directions. The region you are integrating over is actually the entire infinite half-strip between $x=0$ and $x=1$ where $y>0$.

Draw the correct region in Cartesian coordinates and then try drawing rays from the origin with various positive slopes. You should find two different equations to describe the radii of the points on the region's boundary. The way to deal with this is to cut the region in two pieces, integrate each piece, and then add them back together.

• I just wrote what mathematica gave when I used r and q as variables since it wouldn't accept theta. And I thought of doing it that way, but wouldn't one of the "integrals" just be a square? I'm not sure I know how to make a double integral for a rectangle. – Cave Johnson Oct 19 '16 at 3:14
• Very strange result from Mathematica. Perhaps the input didn't quite say what you meant it to say. For the correct polar integration, the pieces need to be separated by lines through the origin, so I don't see how either piece would be a square. They should each be a triangle with one vertex at the origin. – David K Oct 19 '16 at 3:18
• Here's the screenshot from mathematica I was thinking it would have been two pieces separated by a line through y=1, giving a square (that would have area 1) and a triangle (that would have area 0.5) adding to 1.5. – Cave Johnson Oct 19 '16 at 3:22
• You wrote Cos[r] where the integral in your question would have led to Cos[q]. With Cos[q] the integral will not converge, which is the correct evaluation of what you wrote in the question. – David K Oct 19 '16 at 3:26
• And no, the line separating the two pieces is not $y=1$. One integral should be for $\theta$ from $0$ to $k$, and the other for $\theta$ from $k$ to $\frac\pi2$, for a suitable number $k$. The dividing line between the two pieces is the line $\theta = k$, which is a line through the origin. – David K Oct 19 '16 at 3:28