# What is the average value of the function f(x)=cos(x/2)  on the interval [-4,0]?

Aug 29, 2017

$\frac{1}{2} \sin \left(2\right)$, approximately $0.4546487$

#### Explanation:

The average value $c$ of a function $f$ on the interval $\left[a , b\right]$ is given by:

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

Here, this translates into the average value of:

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

Let's use the substitution $u = \frac{x}{2}$. This implies that $\mathrm{du} = \frac{1}{2} \mathrm{dx}$. We can then rewrite the integral as such:

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

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

Splitting up $\frac{1}{4}$ into $\frac{1}{2} \cdot \frac{1}{2}$ allows for $\frac{1}{2} \mathrm{dx}$ to be present in the integral so we can easily make the substitution $\frac{1}{2} \mathrm{dx} = \mathrm{du}$. We also need to change the bounds into bounds of $u$, not $x$. To do this, take the current $x$ bounds and plug them into $u = \frac{x}{2}$.

$c = \frac{1}{2} {\int}_{- 2}^{0} \cos \left(u\right) \mathrm{du}$

This is a common integral (note that $\frac{d}{\mathrm{dx}} \sin \left(x\right) = \cos \left(x\right)$):

$c = \frac{1}{2} {\left[\sin \left(u\right)\right]}_{- 2}^{0}$

Evaluating:

$c = \frac{1}{2} \left(\sin \left(0\right) - \sin \left(- 2\right)\right)$

$c = - \frac{1}{2} \sin \left(- 2\right)$

Note that $\sin \left(- x\right) = - \sin \left(x\right)$:

$c = \frac{1}{2} \sin \left(2\right)$

$c \approx 0.4546487$