Evaluate the integral $\int_0^{3\pi/2} 3\lvert \sin x\rvert \; dx$ Evaluate the integral 
$$
\int_0^{3\pi/2} 3\lvert \sin x\rvert \; dx.
$$
My work: the integrand is actually:
| sinx | = sinx if sinx ≥ 0
| sinx | = - sinx if sinx < 0
hence:
∫ | sinx | dx = ∫ sinx dx = - cosx + C if sinx ≥ 0
∫ | sinx | dx = ∫ - sinx dx = cosx + C if sinx < 0
thus, joining these into a single statement:
∫ | sinx | dx = (- cosx) (| sinx | / sinx) + C
or, more precisely,
∫ | sinx | dx = (- cosx) sign(sinx) + C
sign(sinx) meaning 1 if sinx > 0 and - 1 if sinx < 0 
is that correct ???
 A: This is more complicated than it has to be.
In the interval $[0,3\pi/2]$ it holds that $\sin x$ is nonnegative for $x\in[0,\pi]$ and negative for $x\in(\pi,3\pi/2]$. Thus, dividing the integral at $x=\pi$,
$$
\int_0^{3\pi/2}3|\sin x|\,dx=\int_0^\pi 3\sin x+\int_\pi^{3\pi/2}3(-\sin x)\,dx.
$$
Can you take it from here?
Edit
To simplify the calculations, one could also observe the symmetry of the sine function in the intervals $[0,\pi/2]$, $[\pi/2,\pi]$ and $[\pi,3\pi/2]$, and thus use that
$$
\int_0^{3\pi/2}3|\sin x|\,dx=3\int_0^{\pi/2}3\sin x\,dx.
$$
A: The integral you are calculating is a definite integral and not an indefinite one. Therefore, it is better if you simply calculate it as
$$\int_0^\frac{3\pi}2 |\sin(x)|dx = \int_0^{\pi} |\sin(x)|dx + \int_\pi^{\frac{3\pi}{2}}|\sin(x)| dx$$
A: Indeed, you can tackle it geometrically.
We have
$$
\int_{x=0}^{3\pi/2} 3|\sin x| = 3\int_{x=0}^{\pi} \sin x + 3\int_{x=0}^{\pi/2} \sin x = -3\int_{x=0}^{\pi} D\cos x - 3\int_{x=0}^{\pi/2} D\cos x = 9
$$
by the fundamental theorem of calculus.
A: Notice, splitting the limit $$\int_{0}^{3\pi/2}3|\sin x|dx=3\int_{0}^{3\pi/2}|\sin x|dx$$  $$=3\left(\int_{0}^{\pi}|\sin x|dx+\int_{\pi}^{3\pi/2}|\sin x|dx\right)$$
$$=3\left(\int_{0}^{\pi}\sin x dx+\int_{\pi}^{3\pi/2}(-\sin x )dx\right)$$
$$=3\left([-\cos x]_{0}^{\pi}+[\cos x]_{\pi}^{3\pi/2}\right)$$
$$=3\left([1+1]+[0+1]\right)$$$$=3(3)=\color{red}{9}$$
