<s>[INST] Evaluate $\int_0^\frac{\pi}{2} \min (\sin x, \frac{1}{2}) dx$ 
Evaluate
  $\int_0^\frac{\pi}{2}  \min (\sin x, \frac{1}{2}) dx$

Now, what I've tried to do is to write $\min (\sin x, \frac{1}{2})$     :  $\sin x \leq \frac{1}{2}$ and $\frac{1}{2} < \sin x$. but I don't quite understand how to choose the sets for each minimum (because I know that I will have to split this integral.)
Any help will be appreciated.
 [/INST] Notice two things:


*

*On the interval $(0,\frac{\pi}{2})$, function $\sin{x}$ is always increasing.

*$\sin(0) =0$
That means that $\min \left(\sin x, \frac{1}{2} \right)$ will be equal to $\sin x$ when $x<\frac{\pi}{6}$ because $\sin{\frac{\pi}{6}}=\frac{1}{2}$. Now we have
$$
\int_0^{\frac{\pi}{2}} \min \left(\sin x, \frac{1}{2} \right) dx = \int_0^{\frac{\pi}{6}} \sin x dx + \int_{\frac{\pi}{6}}^{\frac{\pi}{2}} \frac{1}{2} dx = \frac{1}{6} \left( -3 \sqrt{3} + \pi + 6 \right)
$$
</s>