Why average value of a function is not calculated by using the formula $\frac{f(a)+f(b)}{2}$

functions

I know the formula for calculating the average value of a function as $$ \frac{1}{b-a}\int_a^b f(x)\,dx$$

But in elementry level maths and physics problems we generally use a very simple approach to find the average of a value,by taking sum of two values and then dividing them from 2.

(for example,if the initial velocity of a car is ${10ms^{-1}}$ and after 10 seconds the final velocity is ${20ms^{-1}}$ then the average velocity will be ${ \frac {10 + 20}{2}=15ms^{-1}}$ )

Let us took a very simple identity function ${f(x)=x}$,we want to find the average value between ${2}$ and ${4}$ then by integration;

$$ \frac{1}{b-a}\int_a^b f(x)\,dx$$
$$= \frac{1}{4-2}\int_2^4 f(x)\,dx$$
$$= \frac{1}{2}\left(\frac{4^2-2^2}{2}\right)$$
$$= \left(\frac{16-4}{4}\right)=3$$

But I can also calculate this by using a general formula for average of two values
$$\frac{f(a)+f(b)}{2}$$
$$\frac{4+2}{2}=3$$

By both methods we get the same value,so my question is why we don't use $\frac{f(a)+f(b)}{2}$ for calculating the average value of a function (which seems to be very simple) ?

Best Answer

The formula

$$\frac{1}{b-a}\int_a^b f(x)\,dx=\frac{f(a)+f(b)}{2}$$

doesn't hold in general.

It always holds for linear functions

$$f(x)=mx+n$$

indeed in that case we have

$$\frac{1}{b-a}\int_a^b f(x)\,dx=\frac{1}{b-a}\left[\frac12mx^2+nx\right]_a^b=\frac{1}{b-a}\left(\frac12mb^2+nb-\frac12 ma^2-na\right)=$$ $$=\frac{m(b+a)(b-a)+2n(b-a)}{2(b-a)}=\frac{m(b+a)+2n}{2}=\frac{(ma+n)+(mb+n)}{2}=\frac{f(a)+f(b)}{2}$$

Related Question