Convert this integral to polar coordinates $$\int_{0}^{2}\int_{0}^{\sqrt{2y-y^2}}f\text{ dx dy}$$
Now we see that that $x=\sqrt{2y-y^2}$, and doing a little rearranging gives us that $x^2+y^2-2y=0$, which turns into
$x^2+(y-1)^2=1$
The bounded region has this shape:

Clearly we can see that $0\leq \theta \leq \dfrac{\pi}{2}$, but for $r$, here is my confusion.
We see that $0\leq r\leq 2$ (from the picture), but we also know that $x^2+y^2=2y$, which means $r^2=2r\sin\theta\to r=2\sin\theta$, and therefore $0\leq r\leq 2\sin\theta$
So which is correct? They both give different evaluations on the integral (I just plugged in $f=1$).
Essentially my question is, how does one find $r$? Sometimes I see $r$ expressed as functions of $\theta$, other times I just see $r$ between two constants (usually $0$ and $1$). What is the correct answer here, and why?
 A: $$0 \leq r \le 2 \sin \theta$$
Draw a line from the origin to a point on the boundary. It doesn't always end on $r=2$ but it ends on $r=2\sin \theta$.
$$\int_0^\frac{\pi}2 \int_0^{2\sin \theta} fr\,\,dr  d\theta$$
Remark:
If you substitute in $f=1$, you should obtain the area of semi-circle to check whether what you are doing is correct.
A: 
$r :0 \to 2\sin\theta$
$\theta: 0 \to \frac{\pi}{2}$
$dxdy=rdrd\theta$
A: Your confusion comes from your use of $r$ before fully defining it. In this case, you're trying to use the parametrization of $x, y$ as $r, \theta$:
$$x = r\cos\theta\\y = r\sin\theta.$$
Everything comes from this. You define $r$ and $\theta$ by what they are necessarily because of this equation. The bounds on $r$ with this parameterization are $0<r<2\sin\theta$.
If you wanted $r$ to be between two constants, you would need to define $r$ and $\theta$ in a different way, with something like:
$$x = r_1\cos\theta_1\\y = 1+r_1\sin\theta_1$$
You might see that using this parameterization of your shape yields bounds:
$$0<r_1<1\\-\frac\pi2<\theta_1<\frac\pi2.$$
Does this help clarify what is going on with this?
