# Average Value of a Function

It is easy to compute average value of finitely many values `y_1`, `y_2`,...,`y_n`: `y_(ave)=(y_1+y_2+...+y_n)/n`.

But how to compute average of infinitely many values? In general, let's try to compute the average value of a function `y=f(x)`, `a<=x<=b`.

As always we start by dividing the interval `[a,b]` into `n` equal subintervals, each with length `Delta x=(b-a)/n`. Then we choose points `x_1^(**)`, . . . , `x_n^(**)` in successive subintervals and calculate the average of the numbers `f(x_1^(**))`, . . . , `f(x_n^(**))`: `(f(x_1^(**))+f(x_2^(**))+...+f(x_n^(**)))/n`.

Since `Delta x=(b-a)/n` then `n=(b-a)/(Delta x)` and the average value becomes `(f(x_1^(**))+f(x_2^(**))+...+f(x_n^(**)))/((b-a)/(Delta x))=`

`=1/(b-a)(f(x_1^(**))+f(x_2^(**))+...+f(x_n^(**)))Delta x=`

`=1/(b-a)sum_(i=1)^nf(x_i^(**))Delta x` .

If we let `n` increase, we would be computing the average value of a large number of closely spaced values. The limiting value is `lim_(n->oo) 1/(b-a)sum_(i=1)^n f(x_i^(**))Delta x=1/(b-a)int_a^b f(x)dx` by the definition of definite integral.

**Average Value of a Function** `f` on the interval `[a,b]` is `f_(ave)=1/(b-a)int_a^b f(x)dx`.

For a positive function, we can think of this definition as saying `text(area)/text(width)=text(average height)`.

**Example 1**. Find the average value of function `f(x)=4-x^2` on interval `[0,2]`.

Here, `a=0` and `b=2`, therefore `f_(ave)=1/(2-0)int_0^2(4-x^2)dx=1/2 (4x-1/3x^3)|_0^2=1/2 (4*2-1/3*2^3)=8/3`.

Now, recall that Mean Value Theorem for Integrals states that there exists such number `c` from `[a,b]` that `f(c)=1/(b-a) int_a^b f(x)dx`.

This means that there exists such number (or numbers) `c` that `f(c)=f_(ave)`. In other words function takes its average value at least once.

**Example 2**. Find such `c` in interval `[0,2]` that `f(c)=f_(ave)` for `y=4-x^2` on `[0,2]`.

In Example 1 we've found that `f_(ave)=8/3`.

Therefore, we need to find such `c` that `f(c)=4-c^2=8/3`.

This gives `c^2=4-8/3=4/3` or `c=+-2/sqrt(3)` , however `c=-2/sqrt(3)` doesn't belong to interval `[0,2]`, therefore the only applicable number is `c=2/sqrt(3)`.