Question

$$\int_{-\pi}^{\pi}|\cos\ x|dx$$

Evaluate

$\int _{-\pi }^{\pi }|\cos(x)|\mathrm{d}x$