# How do you find the average value of the function for f(x)=sinxcosx, 0<=x<=pi/2?

Feb 26, 2017

The average value is $\frac{1}{\pi}$.

#### Explanation:

The average value of a function $f \left(x\right)$ on a closed interval $\left[a , b\right]$ is given by

$A = \frac{1}{b - a} {\int}_{a}^{b} F \left(x\right)$

Where $A$ is the average value and $f ' \left(x\right) = F \left(x\right)$. Our expression will therefore be

$A = \frac{1}{\frac{\pi}{2} - 0} {\int}_{0}^{\frac{\pi}{2}} \sin x \cos x \mathrm{dx}$

$A = \frac{2}{\pi} {\int}_{0}^{\frac{\pi}{2}} \sin x \cos x \mathrm{dx}$

The trick here is to realize that $2 \sin x \cos x = \sin 2 x$. Therefore, $\sin x \cos x = \frac{1}{2} \sin 2 x$.

$A = \frac{2}{\pi} {\int}_{0}^{\frac{\pi}{2}} \frac{1}{2} \sin 2 x \mathrm{dx}$

Now let $u = 2 x$. Then $\mathrm{du} = 2 \mathrm{dx}$ and $\mathrm{dx} = \frac{\mathrm{du}}{2}$. The bounds of integration become $0$ to $\pi$.

$A = \frac{2}{\pi} {\int}_{0}^{\pi} \frac{1}{4} \sin u \mathrm{du}$

$A = \frac{1}{4} \left(\frac{2}{\pi}\right) {\int}_{0}^{\pi} \sin u \mathrm{du}$

$A = \frac{1}{2 \pi} {\int}_{0}^{\pi} \sin u \mathrm{du}$

$A = \frac{1}{2 \pi} {\left[- \cos u\right]}_{0}^{\pi}$

$A = \frac{1}{2 \pi} {\left[- \cos 2 x\right]}_{0}^{\frac{\pi}{2}}$

$A = \frac{1}{2 \pi} \left(- \cos \pi - \left(- \cos 0\right)\right)$

$A = \frac{1}{2 \pi} \left(1 + 1\right)$

$A = \frac{1}{\pi}$

Hopefully this helps!