 Suggested languages for you:

Europe

|
|

# Average Value of a Function

Average Value of a Function
• Calculus • Decision Maths • Geometry • Mechanics Maths • Probability and Statistics • Pure Maths • Statistics Imagine having to calculate the average of something that is constantly changing, like the price of gas. Normally, when calculating the average of a set of numbers, you add them all up and divide by the total amount of numbers. But how can you do this when prices change every month, week, day, or at numerous points throughout the day? How can you choose which prices are included in calculating the average?

If you have a function for the price of gas and how it changes over time, this is a situation where the Average Value of a Function can be very helpful.

## Definition of the Average Value of a Function

You might be familiar with the concept of average. Typically, an average is calculated by adding up numbers and dividing by the total amount of numbers. The average value of a function in Calculus is a similar idea.

The average value of a function is the height of the rectangle that has an area that is equivalent to the area under the curve of the function.

If you look at the picture below, you know already that the integral of the function is all of the area between the function and the $$x$$-axis. The rectangle has the same area as the area below the curve

This idea might sound arbitrary at first. How is this rectangle related to an average? The average involves dividing by the number of values, and how do you tell how many values are involved here?

## Average Value of a Function Over an Interval

When talking about the average value of a function you need to state over which interval. This is because of two reasons:

• You need to find the definite integral over the given interval.

• You need to divide the above integral by the length of the interval.

To find the average value of a function, instead of adding up numbers you need to integrate, and rather than dividing by the number of values you divide by the length of the interval.

\begin{align} \text{Adding values} \quad &\rightarrow \quad \text{Integration} \\ \text{Number of values} \quad &\rightarrow \quad \text{Length of the interval} \end{align}

Using the length of the interval makes sense because intervals have an infinite number of values, so it is more appropriate to use the length of the interval instead.

## Formula for the Average Value of a Function

As stated before, the average value of a function $$f(x)$$ over the interval $$[a,b]$$ is obtained by dividing the definite integral

$\int_a^b f(x)\,\mathrm{d}x$

by the length of the interval.

The average value of the function is often written $$f_{\text{avg}}$$. So

$f_{\text{avg}} = \frac{1}{b-a}\int_a^b f(x)\, \mathrm{d}x.$

Please read our Evaluating Definite Integrals if you need a refresher on integration!

## Calculus Behind the Average Value of a Function

Where does the formula for the average value of a function come from? Recall the Mean Value Theorem for integrals, which states that if a function $$f(x)$$ is continuous on the closed interval $$[a,b]$$, then there is a number $$c$$ such that

$\int_a^b f(x) \, \mathrm{d}x = f(c)(b-a).$

You can see the derivation for the Mean Value Theorem for Integrals in the article!

If you simply divide each side of the equation by $$b-a$$ to solve for $$f(c)$$, you obtain the formula for the average value of a function:

$f(c)=\frac{1}{b-a} \int_a^b f(x) \, \mathrm{d}x.$

## Examples of the Average Value of a Function

An economist finds that the gas prices from 2017 to 2022 can be described by the function

$f(x) = 1.4^x.$

Here, $$f$$ is measured in dollars per gallon, and $$x$$ represents the number of years since 2017. Find the average price of gas per gallon between 2017 and 2022.

In order to use the formula for the average value of a function you first need to identify the interval. Since the function measures the years since 2017, then the interval becomes $$[0,5],$$ where 0 represents 2017 and 5 represents 2022.

Next, you will need to find the definite integral

$\int_0^5 1.4^x\,\mathrm{d}x.$

Begin by finding its antiderivative:

$\int 1.4^x\,\mathrm{d}x= \frac{1}{\ln{1.4}} 1.4^x,$

and then use the Fundamental Theorem of Calculus to evaluate the definite integral, giving you

\begin{align} \int_0^5 1.4^x\,\mathrm{d}x &=\left( \frac{1}{\ln{1.4}} 1.4^5 \right) - \left( \frac{1}{\ln{1.4}} 1.4^0 \right) \\ &= \frac{1.4^5-1}{\ln{1.4}} \\ &= 13.012188. \end{align}

Now that you found the value of the definite integral, you divide by the length of the interval, so

\begin{align} f_{\text{avg}} &= \frac{13.012188}{5} \\ &= 2.6024376. \end{align}

This means that the average price of gas between 2017 and 2022 is \$2.60 per gallon.

Take a look at a graphical representation of the problem: Graphical representation of the average value of the price of the gas

The rectangle represents the total area under the curve of $$f(x)$$. The rectangle has a width of $$5$$, which is the interval of integration, and a height equal to the average value of the function, $$2.6$$.

Sometimes the average value of a function will be negative.

Find the average value of

$g(x) = x^3$

in the interval $$[-2,1].$$

This time the interval is given in a straightforward way, so begin by finding the indefinite integral

$\int x^3 \, \mathrm{d}x,$

which you can do by using the Power Rule, to find that

$\int x^3 \, \mathrm{d}x = \frac{1}{4}x^4.$

Next, use the Fundamental Theorem of Calculus to evaluate the definite integral. This gives you

\begin{align} \int_{-2}^1 x^3 \, \mathrm{d}x &= \left( \frac{1}{4}(1)^4 \right) - \left( \frac{1}{4} (-2)^4 \right) \\ &= \frac{1}{4} - 4 \\ &= -\frac{15}{4}. \end{align}

Finally, divide the value of the definite integral by the length of the interval, so

\begin{align} g_{\text{avg}} &= \frac{1}{1-(-2)}\left(-\frac{15}{4} \right) \\ &= -\frac{15}{12} \\ &= - \frac{5}{4}. \end{align}

Therefore, the average value of $$g(x)$$ in the interval $$[-2,1]$$ is $$-\frac{5}{4}.$$

It is also possible that the average value of a function is zero!

Find the average value of $$h(x) = x$$ on the interval $$[-3,3].$$

Begin by using the Power Rule to find the indefinite integral, that is

$\int x \, \mathrm{d}x = \frac{1}{2}x^2.$

Knowing this, you can evaluate the definite integral, so

\begin{align} \int_{-3}^3 x\, \mathrm{d}x &= \left( \frac{1}{2}(3)^2\right)-\left(\frac{1}{2}(-3)^2\right) \\ &= \frac{9}{2}-\frac{9}{2} \\ &= 0. \end{align}

Since the definite integral is equal to 0, you will also get 0 after dividing by the length of the interval, so

$h_{\text{avg}}=0.$

You can also find the average value of a trigonometric function. Please check out our article about Trigonometric Integrals if you need a refresher.

Find the average value of

$f(x) = \sin(x)$

over the interval $$\left[ 0, \frac{\pi}{2} \right].$$

You will need to find first the definite integral

$\int_0^{\frac{\pi}{2}} \sin{x} \, \mathrm{d}x,$

so find its antiderivative

$\int \sin{x} \, \mathrm{d}x = -\cos{x},$

and use the Fundamental Theorem of Calculus to evaluate the definite integral, that is

\begin{align} \int_0^{\frac{\pi}{2}} \sin{x} \, \mathrm{d}x &= \left(-\cos{\frac{\pi}{2}} \right) - \left(-\cos{0} \right) \\ &= -0-\left( -1 \right) \\ &= 1. \end{align}

Finally, divide by the length of the interval, so

\begin{align} f_{\text{avg}} &= \frac{1}{\frac{\pi}{2}}\\ &= \frac{2}{\pi}. \end{align}

This means that the average value of the sine function over the interval $$\left[ 0, \frac{\pi}{2} \right]$$ is $$\frac{2}{\pi},$$ which is about $$0.63.$$ Graphical representation of the average value of the sine function in the interval $$[0,\frac{\pi}{2}].$$

## Average Value of a Function - Key takeaways

• The average value of a function is the height of the rectangle that has an area that is equivalent to the area under the curve of the function.
• The average value of a function $$f(x)$$ over the interval $$[a,b]$$ is given by$f_{\text{avg}} = \frac{1}{b-a}\int_a^b f(x)\, dx.$
• The average value of a function equation is derived from the Mean Value Theorem for integrals.

The average value of a function is the height of the rectangle that has an area that is equivalent to the area under the curve of the function.

The average value of a function is the integral of the function over an interval [a, b] divided by b - a.

We can use the average value of a function to find the average value of an infinite set of numbers. Consider the gas prices between 2017 and 2022, which can change almost every second. We can find the average value price per gallon over the 5 year period with the average value of a function equation.

To find the average value of a function, take the integral of the over an interval [a, b] and divide by b - a.

The average value of a function is the height of the rectangle that has an area that is equivalent to the area under the curve of the function.

## Final Average Value of a Function Quiz

Question

What is the average value of a function?

The average value of a function is the height of the rectangle that the same area as the area under the curve of the function.

Show question

Question

Where is the average value of a function formula derived from?

The average value of a function formula is derived from the Mean Value Theorem for integrals.

Show question

Question

Which of the following is the formula for the average value of a function?

$f_{\text{avg}} = \frac{1}{b-a} \int_a^b f(x) \, \mathrm{d}x.$

Show question

Question

What does the Mean Value Theorem for integrals say?

The Mean Value Theorem for integrals states that if a function f(x) is continuous on the closed interval [a, b], then there is a number c such that
$\int_a^b f(x) \, \mathrm{d}x = f(c)(b-a)$

where f(c) is the average value of the function over the interval [a, b]

Show question

Question

To find the average value of a function in a given interval you need to divide its definite integral by the ____.

length of the interval.

Show question

Question

The average value of a function can be negative.

True.

Show question

Question

Suppose you are asked to find the average value of the exponential function $$e^x.$$ What information is missing?

The interval on which the average is to be calculated.

Show question

Question

Can you find the average value of a non-integrable function?

No.

Show question

Question

The average value of a function can be equal to zero.

True.

Show question

Question

The average value of a function depends on which interval it is being calculated.

True.

Show question

More about Average Value of a Function 60%

of the users don't pass the Average Value of a Function quiz! Will you pass the quiz?

Start Quiz

### No need to cheat if you have everything you need to succeed! Packed into one app! ## Study Plan

Be perfectly prepared on time with an individual plan. ## Quizzes

Test your knowledge with gamified quizzes. ## Flashcards

Create and find flashcards in record time. ## Notes

Create beautiful notes faster than ever before. ## Study Sets

Have all your study materials in one place. ## Documents

Upload unlimited documents and save them online. ## Study Analytics

Identify your study strength and weaknesses. ## Weekly Goals

Set individual study goals and earn points reaching them. ## Smart Reminders

Stop procrastinating with our study reminders. ## Rewards

Earn points, unlock badges and level up while studying. ## Magic Marker

Create flashcards in notes completely automatically. ## Smart Formatting

Create the most beautiful study materials using our templates. 