# How do you find the average value of f(x)=cosx as x varies between [0, pi/2]?

Sep 5, 2016

$\frac{2}{\pi}$

#### Explanation:

The average value of the function $f \left(x\right)$ on the interval $\left[a , b\right]$ can be evaluated through the following the following expression:

$\text{average value} = \frac{1}{b - a} {\int}_{a}^{b} f \left(x\right) \mathrm{dx}$

Here, this gives us an average value of:

$\frac{1}{\frac{\pi}{2} - 0} {\int}_{0}^{\frac{\pi}{2}} \cos \left(x\right) \mathrm{dx}$

Integrating $\cos \left(x\right)$ gives us $\sin \left(x\right)$:

$= \frac{1}{\frac{\pi}{2}} {\left[\sin \left(x\right)\right]}_{0}^{\frac{\pi}{2}}$

$= \frac{2}{\pi} \left[\sin \left(\frac{\pi}{2}\right) - \sin \left(0\right)\right]$

$= \frac{2}{\pi} \left[1 - 0\right]$

$= \frac{2}{\pi}$