Average value of a function

In summary, the average value of a function is the average of all the output values of the function over a given interval. It has various applications in fields such as physics, economics, and engineering. It can be negative if the function has negative values and the total area under the curve is also negative. The average value is not always equal to the maximum or minimum value of the function. To find the average value, one can use the formula: Average value = (1/b-a) ∫<sub>a</sub><sup>b</sup> f(x) dx, where a and b are the starting and ending points of the interval, and f(x) is the function. This formula can be evaluated using integration techniques.
  • #1
reinloch
5
0

Homework Statement


Suppose we walk along a unit semicircle.


Homework Equations


Find the average value of our distance from the base of the semicircle.


The Attempt at a Solution


[itex] y_{ave} = \frac{1}{1-(-1)}\int_{-1}^1\sqrt{1-x^2}\ dx = \frac{\pi}{4} [/itex]
OR
[itex] y = \sin\theta, \qquad 0 \le \theta \le \pi[/itex]
[itex] y_{ave} = \frac{1}{\pi-0}\int_0^{\pi}\sin\theta\ d\theta = \frac{2}{\pi} [/itex]

I would appreciate if anyone can enlighten me on why these approaches lead to different answers, and if anyone of them is wrong. Thanks.
 
Physics news on Phys.org
  • #2
reinloch said:

Homework Statement


Suppose we walk along a unit semicircle.

Homework Equations


Find the average value of our distance from the base of the semicircle.

The Attempt at a Solution


[itex] y_{ave} = \frac{1}{1-(-1)}\int_{-1}^1\sqrt{1-x^2}\ dx = \frac{\pi}{4} [/itex]
OR
[itex] y = \sin\theta, \qquad 0 \le \theta \le \pi[/itex]
[itex] y_{ave} = \frac{1}{\pi-0}\int_0^{\pi}\sin\theta\ d\theta = \frac{2}{\pi} [/itex]

I would appreciate if anyone can enlighten me on why these approaches lead to different answers, and if anyone of them is wrong. Thanks.
Since the answers are different, they can't both be correct.

Do you expect a difference if you find the average while walking along the semi-circle versus walking along the x-axis ?
 
  • #3
To add to Sammy's comments, in your equation$$
\bar y = \frac 1 2\int_{-1}^1\sqrt{1-x^2}~dx$$try the substitution ##x=\cos\theta##. That will express the integral correctly in terms of ##\theta##, and if you are careful and do it correctly you will get the same ##\frac \pi 4## answer.

[Edit - added later:] I agree with Curious2141's later post. The correct answer is ##\frac 2 \pi##.
 
Last edited:
  • #4
reinloch said:

Homework Statement


Suppose we walk along a unit semicircle.

Homework Equations


Find the average value of our distance from the base of the semicircle.

The Attempt at a Solution


[itex] y_{ave} = \frac{1}{1-(-1)}\int_{-1}^1\sqrt{1-x^2}\ dx = \frac{\pi}{4} [/itex]
OR
[itex] y = \sin\theta, \qquad 0 \le \theta \le \pi[/itex]
[itex] y_{ave} = \frac{1}{\pi-0}\int_0^{\pi}\sin\theta\ d\theta = \frac{2}{\pi} [/itex]

I would appreciate if anyone can enlighten me on why these approaches lead to different answers, and if anyone of them is wrong. Thanks.

The correct answer is ##\frac{2}{\pi}##.

To determine the average value of a continuous function, you need to define the function properly in terms of a specified independent variable. It might be tempting to use the definition ##y = \sqrt{1-x^2}## here and compute the average like you did in the first attempt. But this would be wrong because it is implying that you are walking in order to keep ##\frac{dx}{dt}## constant. That's a rather weird way to walk.

A more natural walk would be to walk such that the average speed along the arc is kept constant. In other words, if we can find the traversed arc length as a function of x, we can then find y as a function of s, and then average y the usual way.

The y-axis is a line of symmetry, so it suffices to consider the positive x-axis (1st quadrant). If you start by working with ##\displaystyle s = \int_0^x \sqrt{1 + (\frac{dy}{dx})^2}dx## you will quickly end up with ##s = \arcsin x \implies x = \sin s \implies y = \cos s##.

Now, if you average ##y(s)## over the first quadrant by evaluating ##\frac{1}{\arcsin 1} \int_0^{\arcsin 1} \cos s ds##, you'll quickly find the average value ##\overline{y(s)} = \frac{2}{\pi}##. Since the 2nd quadrant is simply a reflection of the 1st quadrant, the average is the same there, as is the overall average.

You'll note that this is basically identical to the value you obtained using the second method, and that in fact is correct as well. If you think about it, walking such that your bearing with respect to the origin changes at a constant rate is equivalent to walking at constant speed along the arc length of the semicircle because of the relationship ##s = r\theta##.

(As an aside, ##\frac{2}{\pi}## also intuitively "looks" more correct because it is the same answer we get in Buffon's needle, but this is a little bit of handwaving, and not rigorous.)

EDIT: An even quicker (and nicer) way of working through the arc length approach:

$$ \overline{y(s)} = \frac{1}{s}\int_0^s y ds = \frac{1}{s}\int_{-1}^{1} y\frac{ds}{dx}dx = \frac{1}{s}\int_{-1}^{1} y\sqrt{1 + (\frac{dy}{dx})^2}dx = \frac{1}{s}\int_{-1}^{1} 1dx = \frac{2}{\pi}$$

I used FTC and Chain Rule, and skipped a few steps in simplifying the algebra, but the result is quicker.
 
Last edited:

Related to Average value of a function

1. What is the average value of a function?

The average value of a function is the value that represents the average of all the output values of the function over a given interval. It is calculated by dividing the total area under the curve of the function by the length of the interval.

2. How is the average value of a function used in real life?

The average value of a function is used in various fields such as physics, economics, and engineering to calculate important quantities like average velocity, average cost, and average power. It also helps in finding the most representative value of a data set.

3. Can the average value of a function be negative?

Yes, the average value of a function can be negative. This occurs when the function has negative values over the given interval and the total area under the curve is also negative.

4. Is the average value of a function always equal to the function's maximum or minimum value?

No, the average value of a function is not always equal to its maximum or minimum value. It is possible for a function to have a different average value than its maximum or minimum value over a given interval.

5. How can I find the average value of a function?

The average value of a function can be found by using the formula: Average value = (1/b-a) ∫ab f(x) dx, where a and b are the starting and ending points of the interval, and f(x) is the function. This integral can be evaluated using integration techniques such as the Fundamental Theorem of Calculus.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
244
  • Calculus and Beyond Homework Help
Replies
3
Views
603
  • Calculus and Beyond Homework Help
Replies
9
Views
253
Replies
14
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
732
  • Calculus and Beyond Homework Help
Replies
3
Views
917
  • Calculus and Beyond Homework Help
Replies
3
Views
819
  • Calculus and Beyond Homework Help
Replies
3
Views
378
  • Calculus and Beyond Homework Help
Replies
34
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
908
Back
Top