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.