# How do you find the average value of the function for f(x)=e^x-2x, 0<=x<=2?

Mar 16, 2018

The average value $= 1.19$

#### Explanation:

The average value of a function $f \left(x\right)$ over the interval $x \in \left[a , b\right]$ is

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

Here,

$f \left(x\right) = {e}^{x} - 2 x$

and

$\left[a , b\right] = \left[0 , 2\right]$

Therefore,

The average value is

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

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

$= \frac{1}{2} \left({e}^{2} - 4 - 1\right)$

$= \frac{1}{2} \cdot 2.389$

$= 1.19$

Mar 16, 2018

$\textcolor{b l u e}{\frac{1}{2} {e}^{2} - \frac{5}{2} \approx 1.1946}$

#### Explanation:

The average value of a function in an interval $\left[a , b\right]$ is found using:

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

For interval:

$\left[0 , 2\right]$

$\frac{1}{2} {\int}_{0}^{2} \left({e}^{x} - 2 x\right) \mathrm{dx} = \frac{1}{2} {\left[{e}^{x} - {x}^{2}\right]}_{0}^{2}$

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

Plugging in upper and lower bounds:

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

$= \frac{1}{2} \left\{\left[{e}^{2} - 4\right] - \left[1\right]\right\} = \textcolor{b l u e}{\frac{1}{2} {e}^{2} - \frac{5}{2} \approx 1.1946}$

If you look at the diagram, you will see that the average value we calculated is the line marked. The rectangle formed by this line the x axis and the bounds of the interval $\left[0 , 2\right]$, has the same area as the area under the function in this interval, the shaded region in the diagram.

We can show this is true by calculating the area under the curve in the interval and then comparing this to the area of the rectangle.

Area under curve:

$A = {\int}_{0}^{2} \left({e}^{x} - 2 x\right) \mathrm{dx} = {\left[{e}^{x} - {x}^{2}\right]}_{0}^{2}$

This area is the area we found above before multiply it by $\frac{1}{2}$

i.e.

${e}^{2} - 5$

$A = {\int}_{0}^{2} \left({e}^{x} - 2 x\right) \mathrm{dx} = {\left[{e}^{x} - {x}^{2}\right]}_{0}^{2} = {e}^{2} - 5 \approx 2.3891$

Area of rectangle:

$\left(2\right) \cdot \left(\frac{1}{2} {e}^{2} - \frac{5}{2}\right) = {e}^{2} - 5 \approx 2.3891$

So this is true.