Find the area contained by y=\sin x from x = 0 to x = 3π/2.
Figure 13.13 illustrates the required area. From this we see that there are parts both above and below the x axis and the crossover point occurs when x = π.
\begin{aligned}\int_0^\pi \sin x \mathrm{~d} x & =[-\cos x]_0^\pi \\& =-\cos \pi+\cos 0=2 \\\int_\pi^{3 \pi / 2} \sin x \mathrm{~d} x & =[-\cos x]_\pi^{3 \pi / 2} \\& =-\cos \left(\frac{3 \pi}{2}\right)+\cos \pi=-1\end{aligned}
The total area is 3 square units. Note, however, that the single integral over 0 to 3π/2 evaluates to 1; that is, it gives the net value of 2 and −1.
\int_0^{3 \pi / 2} \sin x \mathrm{~d} x=[-\cos x]_0^{3 \pi / 2}=-\cos \left(\frac{3 \pi}{2}\right)+\cos 0=1