2

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) ?

  • 1
    There are very few functions for which the two averages are the same. Just try almost any other function! – Kavi Rama Murthy Oct 29 '18 at 09:50
  • 1
    Did you try another very simple function, say $f(x)=x^2$? – Arnaud D. Oct 29 '18 at 09:50
  • I am currently learning functions and calculus at very introductory level so I got stuck in this problem "A body of mass ${m}$ is thrown at an angle ${x}$ to the horizontal with the initial velocity ${v_o}$. Find the mean power developed by gravity over the whole time of motion of the body," I got confused in finding the mean value . – pranjal verma Oct 29 '18 at 09:56
  • 1
    You're assuming that the speed increases linearly, that is, constant acceleration; what if the acceleration is not constant, for example in order to describe the motion of a rocket, where the acceleration is growing as the rocket's mass decreases because of expulsion of propellent? – egreg Oct 29 '18 at 10:02

3 Answers3

6

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}$$

user
  • 154,566
  • 1
    Is $f(x)=mx+n$ linear when $n\neq0$? (Not that that's the main point, of course.) – Mark McClure Oct 29 '18 at 09:59
  • 2
    @MarkMcClure Yes of course, in calculus context the term refers to functions $f(x)=mx+n$ that is to straight lines. In linear algebra context instead we refer only to $y=mx$ as a linear function/map. – user Oct 29 '18 at 10:01
  • 1
    @MarkMcClure That's is the terminology I'm referring to. Do you think it is not correct? – user Oct 29 '18 at 10:04
  • 2
    Some people use the term "affine" for these functions. This question is related. – Arnaud D. Oct 29 '18 at 10:05
  • 1
    @gimusi Yes, I think it is not correct. I have seen some calculus texts use the term "linear function" in that context it's clearly a conflict with the intended meaning of linear and I would prefer proper terminology. It's easy enough to use "affine" as Arnaud D suggests. – Mark McClure Oct 29 '18 at 10:07
  • 1
    @MarkMcClure Just to clarify I'm referring to the definition given here. But I get your point, when it is not clear from the context use "affine" avoid confusion. In that case I've given explicitely the "linear" form I'm referring to and then I think that the term can't lead to any confusion. Anyway that was a very good issue to point out as an additional information. Thanks – user Oct 29 '18 at 10:11
1

This average assumes that the function $f\left(x\right)$ looks "linear" between $x = a$ and $x = b$. Just imagine a function which is zero at $x = a$ and $x = b$ but very large in between, say some sort of bump function, or even a quadratic function with negative coefficient of $x^2$ and roots $x=a$ and $x=b$, and you will see that this "simple average" is not so great in this situation, while the integral, by its very definition as a limit of upper and lower Riemann sums, captures the changes in between the two values very well, at least for "nice" (e.g. continuous) functions.

Sam Streeter
  • 1,556
1

Consider these two functions: $f(x)\equiv x^{10}$ and $g(x)\equiv \sin(\pi x/2)$. Both equal $0$ when $x=0$ and both equal $1$ when $x=1$. But, if you plot them in the interval $x\in[0,1]$ you'll find they are quite different. It wouldn't make much sense to say that their average in that interval is the same.

The integral definition of average takes this into account: the average of $f(x)$ for $x\in[a,b]$ gives you the constant function that would have the same area under its curve as $f(x)$ does for $x\in[a,b]$.

The functions of the form $f(x)=ax+b$ just happen to be functions for which this integral average coincides with the arithmetic average between the values at the limits of your interval. You can see why plotting them and their average (as a constant function) and checking how the area between the $x$-axis and both functions is the same.

TeicDaun
  • 202
  • 2
    I think you should pick a different $g$ if you want $g(1)=1$. Besides, just because two functions have different graphs does not mean they can't have the same average value in general. You need to say something a bit more specific. – Arnaud D. Oct 29 '18 at 10:01
  • 1
    Whoops, that $\pi$ should be on the numerator, thanks. And, yeah, I could've been a little more specific about that. – TeicDaun Oct 29 '18 at 10:03
  • 1
    With the corrected function, it's worth noting that the graph of $f$ is always below the line $y=x$, and the graph of $g$ is always over this line. I think it's a lot more convincing. – Arnaud D. Oct 29 '18 at 10:08