Given $D=\{(x,y)|0\le x\le2,0\le y\le\sqrt{4-x^2}\}$
Express $D$ in polar coordinates.
I have the answer as $D=\{(r,\theta)|0\le\theta\le\dfrac{\pi}{2},0\le r\le2\}$
One more example is
$D=\{(x,y)|x^2+y^2\le4\text{ and }y\ge-x\}$
I have the answer as $D=\{(r,\theta)|-\dfrac{\pi}{4}\le\theta\le\dfrac{3\pi}{4},0\le r\le2\}$
My question is how did they get the coordinates as $0\le\theta\le\dfrac{\pi}{2}$ and $-\dfrac{\pi}{4}\le\theta\le\dfrac{3\pi}{4}$
Can anyone please explain me how to get those coordinates.
I will update the answer for to include the first example when you correct it, as it currently reads that
$$0 \leq x \leq 0$$
For the second example, to get $\theta $ from $y \geq -x $ draw the line for $y = -x $ and notice that the two "halfs" make angles of $-\frac\pi4$ and $\frac{3\pi}{4} $.
Make a sketch and it'll become fairly obvious that
$$-\frac\pi4 \leq \theta \leq \frac{3\pi}{4} $$
As for the 1st example, consider this sketch:
From $0 \leq y $ I painted the red region. From $0 \leq x \leq 2$ I painted the blue region and from $x^2 + y^2 \leq 4$ I painted the green quarter of circle. From that you get
$$0 \leq \theta \leq \frac\pi2$$