if you graph the function, as you should first
you'll notice, there are two intervals with areas in them
where do they intersect? well, at sin(x)=sin(2x)
so.. you use the 1st interval, keeping in mind which function
is the [ceiling] and which one is the [floor]
and you do the same for the 2nd interval
so [tex]\bf \begin{cases}
y=sin(x)\\
y=sin(2x)\\
\textendash\textendash\textendash\textendash\textendash\\
[0,\pi ]
\end{cases}
\\ \quad \\
\textit{at which points, do they intersect each other? well}\\
----------------------------\\
sin(x)=sin(2x)\implies sin(x)-sin(2x)=0
\\ \quad \\
sin(x)-2sin(x)cos(x)=0\impliedby \textit{common factor}
\\ \quad \\
sin(x)[1=2cos(x)]=0\\ \quad \\
\begin{cases}
sin(x)=0\to &x=0\\
1-2cos(x)=0\to \frac{1}{2}=cos(x)\to &\frac{\pi }{3}=x
\end{cases}\\
----------------------------\\
[/tex]
[tex]\bf
\textit{notice the [ceiling] function, on the 1st interval, is sin(2x), thus}
\\ \quad \\
\int\limits_{0}^{\frac{\pi }{3}}([sin(2x)]-[sin(x)])dx\implies
\left[ \cfrac{-cos(2x)}{2}-[-cos(x)] \right]_{0}^{\frac{\pi }{3}}\\
----------------------------\\
\textit{notice the [ceiling] function, on the 2nd interval, is sin(x), thus}
\\ \quad \\
\int\limits_{\frac{\pi }{3}}^{\pi }([sin(x)]-[sin(2x)])dx\implies
\left[ -cos(x)-\left( \cfrac{-cos(2x)}{2} \right) \right]_{\frac{\pi }{3}}^\pi [/tex]