how to determine the domain of this function: $\sqrt{(\sin(x))^2 + \sin x}$? let $x$ be in this interval: $[0, 2\pi]$. the exercise's request is to find the domain of this function:$$\sqrt{(\sin(x))^2 + \sin x}$$
Here's my attempt to solve it:

*

*I found the domain of the square root: $$(sin (x))^2 + \sin x \geq 0$$
In this case, I've found that $$\sin x \ge 0 $$ and that: $$\sin x \ge -1 $$
in the trigonometric circle, I have found that the set of solution is only the 4th quadrant, since the sin of -1 is $3/2\pi$ (270 degree).
Is that correct?
 A: Let $t = \sin x \,\, (-1 \leq t \leq 1)$
The domain of the function will become:
$$t^2 + t \geq 0$$
$$\implies t \in (-\infty, -1] \cup [0, +\infty)$$
But $-1 \leq t \leq 1 \implies t = -1$ or $0 \leq t \leq 1$

*

*$t = -1 \implies \sin x = -1 \implies x = -\dfrac{\pi}{2} + k2\pi \implies x = \dfrac{3\pi}{2}$ (since $x \in [0, 2\pi]$)


*$0 \leq t \leq 1 \implies 0 \leq \sin x \leq 1 \implies x \in [0, \pi] \cup \{2\pi\}$
Therefore, the domain is:
$$D = [0, \pi] \cup \left\{\dfrac{3\pi}{2}, 2\pi \right\}$$
A: What if $\sin x(\sin x+1)=0?$
Else  we need $\sin x(\sin x+1)>0$
If $\sin x>0,\sin x+1>0\iff\sin x>-1\implies \sin x>$ max$(0,-1)$
$\implies2n\pi\le x\le2n\pi+\pi$
What if $\sin x<0?$
A: We must have
$$\sin x(\sin x+1)\ge0.$$
As $$\sin x+1\ge0$$ is always true, we seem to be left with
$$\sin x\ge 0.$$
But there is a trap*: when $$\sin x+1=0$$ the sign of $\sin x$ is irrelevant and finally $$x\in[0,\pi]\cup\left\{\frac{3\pi}2,2\pi\right\}.$$
*Credit to Buraian.

After the fact, a systematic solution is
$$\sin x>0\lor\sin x=0\lor\sin x=-1,$$
$$x\in(0,\pi)\cup\{0,\pi,2\pi\}\cup\left\{\frac\pi2,\frac{3\pi}2\right\}.$$
A: There is perhaps a better way to approach,  consider:
$$ f= \sin^2 x + \sin x$$
Now, we can see there are zero set for this function: $ \sin x = \{0,-1 \}$, in the interval $[0, 2 \pi]$ the zero set in terms of 'x' : $\{0, \pi, \frac{ 3 \pi}{2} \}$. Hence, the domain of $x$ in which the function is greater than zero and also belongining the original domain constrained is given by:
$$ \left[ 0 , \pi \right] \cup \left[ \frac{3 \pi}{2} , 2 \pi\right]$$
Explanation:
The function 'sign flips' whenever it hits a root, so we can partition the given domain  based on root as as:
$$ \left[ 0, \pi \right] \cup \left[ \pi, \frac{ 3 \pi}{2} \right] \cup \left[ \frac{3 \pi}{2} , 2 \pi \right]$$
Now since in the first domain the function is positive, the second it will be negative and third it will be positive again. Hence, the final answer is given by:
$$ \left[ 0, \pi \right] \cup \left[ \frac{ 3\pi}{2} , 2\pi \right]$$

Edit
Oops! The function above is slightly more complicated than a regular quadratic in the sense that a zero doesn't correspond exactly as a sign flip!
As correctly pointed out by the @The 2nd, the function retain's it's negative sign even after the zero $ \frac{3 \pi}{2}$ , hence the whole domain of $x$ values greater than $ \frac{3 \pi}{2}$ is neglected. But, there is still one more root to consider, that is the one at $ x = 2 \pi$
Hence, the final answer is given by:
$$ \left[ 0 , \pi \right] \cup \left[ \frac{ 3 \pi}{2} \right] \cup \left[ 2 \pi \right]$$
