find the mean value of y = |cosx| in the range of -Pi less than or equal to x less than or equal to Pi
$\displaystyle \bar{y} = \frac{1}{\pi - (-\pi)} \int_{-\pi}^{\pi} |\cos{x}| dx$
using symmetry ...
$\displaystyle \bar{y} = \frac{1}{\pi} \int_{0}^{\pi} |\cos{x}| dx = \frac{1}{\pi}\left[ \int_{0}^{\frac{\pi}{2}} \cos{x} \, dx - \int_{\frac{\pi}{2}}^{\pi} \cos{x} \, dx\right]$