Evaluate the following integral involving $\sin \pi x$ 
Let $F: \Bbb{R} \to \Bbb{R}$ be defined by $$F(s)=\begin{cases}1, & \text{if }s\ge \dfrac12 \\[0.2cm]0, & \text{if }s< \dfrac12 \end{cases}$$
  I need to evaluate $$\int^{1}_{0} F(\sin \pi x) dx\,$$

I noticed that $\sin (\pi x)$ is greater than $\frac{1}{2}$ for $\frac{1}{6}\le x \le \frac{5}{6}$ thus integral reduces to $\int^{\frac{5}{6}}_{\frac{1}{6}} 1 dx=\frac{2}{3}$. Is it okay?
 A: Let's write the function $F(\sin\pi x)$ like this
$$F(\sin\pi x)=
\begin{cases}1, & \text{if }\sin\pi x\ge \dfrac12 \\[0.2cm]0, & \text{if }\sin\pi x< \dfrac12 \end{cases}$$
Now we solve the inequality $\sin\pi x \ge \frac12$. We only care about the solutions in the range $[0;1]$. You already did it.  It holds for $x \in [\frac16;\frac56]$. So we can rewrite the function $F(\sin\pi x)$ like this:
$$F(\sin\pi x)=
\begin{cases}1, & \text{if } x \in \big[\frac16;\frac56\big] \\[0.2cm]0, & \text{if } x \in \big[0;\frac16\big)\cup\big(\frac56;1\big] \end{cases}$$
Now we can split the integral to two parts, one for each case of this function:
$$
\int_0^1 F(\sin\pi x)dx = \int_{[0;1]} F(\sin\pi x)dx =\\= \int_{\big[\frac16;\frac56\big]}F(\sin\pi x)dx + \int_{\big[0;\frac16\big)\cup\big(\frac56;1\big]}F(\sin\pi x)dx = \int_{\big[\frac16;\frac56\big]}1dx + \int_{\big[0;\frac16\big)\cup\big(\frac56;1\big]}0dx
$$
If you aren't familiar with this notation, it is the same as:
$$
\int_\frac16^\frac561dx+\left(\int_0^\frac160dx+\int_\frac56^10dx\right)
$$
The second term is zero, so only the first term remains. And you see that your result was correct.
