# 5.4: Average Value of a Function

## 5.4 Average Value of a Function

We often need to find the average of a set of numbers, such as an average test grade. Suppose you received the following test scores in your algebra class: 89, 90, 56, 78, 100, and 69. Your semester grade is your average of test scores and you want to know what grade to expect. We can find the average by adding all the scores and dividing by the number of scores. In this case, there are six test scores. Thus,

[dfrac{89+90+56+78+100+69}{6}=dfrac{482}{6}≈80.33.]

Therefore, your average test grade is approximately 80.33, which translates to a B− at most schools.

Suppose, however, that we have a function (v(t)) that gives us the speed of an object at any time t, and we want to find the object’s average speed. The function (v(t)) takes on an infinite number of values, so we can’t use the process just described. Fortunately, we can use a definite integral to find the average value of a function such as this.

Let (f(x)) be continuous over the interval ([a,b]) and let ([a,b]) be divided into n subintervals of width (Δx=(b−a)/n). Choose a representative (x^∗_i) in each subinterval and calculate (f(x^∗_i)) for (i=1,2,…,n.) In other words, consider each (f(x^∗_i)) as a sampling of the function over each subinterval. The average value of the function may then be approximated as

[dfrac{f(x^∗_1)+f(x^∗_2)+⋯+f(x^∗_n)}{n},]

which is basically the same expression used to calculate the average of discrete values.

But we know (Δx=dfrac{b−a}{n},) so (n=dfrac{b−a}{Δx}), and we get

[dfrac{f(x^∗_1)+f(x^∗_2)+⋯+f(x^∗_n)}{n}=dfrac{f(x^∗_1)+f(x^∗_2)+⋯+f(x^∗_n)}{dfrac{(b−a)}{Δx}}.]

Following through with the algebra, the numerator is a sum that is represented as (sum_{i=1}^nf(x∗i),) and we are dividing by a fraction. To divide by a fraction, invert the denominator and multiply. Thus, an approximate value for the average value of the function is given by

(dfrac{sum_{i=1}^nf(x^∗_i)}{dfrac{(b−a)}{Δx}}=(dfrac{Δx}{b−a})sum_{i=1}^nf(x^∗_i)=(dfrac{1}{b−a})sum_{i=1}^nf(x^∗_i)Δx.)

This is a Riemann sum. Then, to get the exact average value, take the limit as n goes to infinity. Thus, the average value of a function is given by

(dfrac{1}{b−a}lim_{n→∞}sum_{i=1}^nf(x_i)Δx=dfrac{1}{b−a}∫^b_af(x)dx.)

Definition: average value of the function

Let (f(x)) be continuous over the interval ([a,b]). Then, the average value of the function (f(x)) (or (f_{ave})) on ([a,b]) is given by

[f_{ave}=dfrac{1}{b−a}∫^b_af(x)dx.]

Example (PageIndex{8}): Finding the Average Value of a Linear Function

Find the average value of (f(x)=x+1) over the interval ([0,5].)

Solution

First, graph the function on the stated interval, as shown in Figure.

Figure (PageIndex{10}):The graph shows the area under the function ((x)=x+1) over ([0,5].)

The region is a trapezoid lying on its side, so we can use the area formula for a trapezoid (A=dfrac{1}{2}h(a+b),) where h represents height, and a and b represent the two parallel sides. Then,

(∫^5_0x+1dx=dfrac{1}{2}h(a+b)=dfrac{1}{2}⋅5⋅(1+6)=dfrac{35}{2}).

Thus the average value of the function is

(dfrac{1}{5−0}∫^5_0x+1dx=dfrac{1}{5}⋅dfrac{35}{2}=dfrac{7}{2}).

Exercise (PageIndex{7})

Find the average value of (f(x)=6−2x) over the interval ([0,3].)

Hint

Use the average value formula, and use geometry to evaluate the integral.

3

### Key Concepts

• The definite integral can be used to calculate net signed area, which is the area above the x-axis less the area below the x-axis. Net signed area can be positive, negative, or zero.
• The average value of a function can be calculated using definite integrals.

## Key Equations

• Definite Integral

(displaystyle∫^b_af(x)dx=lim_{n→∞}sum_{i=1}^nf(x^∗_i)Δx)

## Glossary

average value of a function
(or (f_{ave})) the average value of a function on an interval can be found by calculating the definite integral of the function and dividing that value by the length of the interval
variable of integration
indicates which variable you are integrating with respect to; if it is x, then the function in the integrand is followed by dx

## 5.4: Average Value of a Function

You are about to erase your work on this activity. Are you sure you want to do this?

##### Updated Version Available

There is an updated version of this activity. If you update to the most recent version of this activity, then your current progress on this activity will be erased. Regardless, your record of completion will remain. How would you like to proceed?

##### Mathematical Expression Editor

We find the average value of a function.

### Average value

We will define and compute the average value of a function on an interval.

Continuing our average value calculation, we have

### Theoretical Justifications

In this section, we derive the formula for average value. Recall that we are trying to find the average value of a function, , over an interval, . We begin by subdividing the interval into equal sub-intervals, each of length In each of these sub-intervals, we choose a sample point. We denote the sample point in the -th sub-interval by . As an approximation to the average value of the function over the interval we take the average of the function values at the sample points: This can be written in summation notation as Observe that equation in the definition of can be rewritten as This allows us to rewrite our approximation of as Since is a constant, we can bring it inside the summation to write: Finally, the approximation improves as the number of sample points, , increases. Therefore, we define which by the definition of the definite integral can be written as

## Remarks

You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label for specifying the condition.

For example, if the range G1:G2 contains the column label Income in G1 and the amount 10,000 in G2, you could define the range as MatchIncome and use that name as the criteria argument in the database functions.

Although the criteria range can be located anywhere on the worksheet, do not place the criteria range below the list. If you add more information to the list, the new information is added to the first row below the list. If the row below the list is not blank, Excel cannot add the new information.

Make sure the criteria range does not overlap the list.

To perform an operation on an entire column in a database, enter a blank line below the column labels in the criteria range.

## Find AVERAGE of a List in Python with Example

The formula to calculate average is done by calculating the sum of the numbers in the list divided by the count of numbers in the list.

The average of a list can be done in many ways listed below:

• Python Average by using the loop
• By using sum() and len() built-in functions from python
• Using mean() function to calculate the average from the statistics module.
• Using mean() from numpy library

In this Python tutorial, you will learn:

## Review

If (X) has an exponential distribution with mean (mu), then the decay parameter is (m = dfrac<1>), and we write (X sim Exp(m)) where (x geq 0) and (m > 0) . The probability density function of (X) is (f(x) = me^<-mx>) (or equivalently (f(x) = dfrac<1>e^<-dfrac>)). The cumulative distribution function of (X) is (P(X leq X) = 1 - e^<-mx>).

The exponential distribution has the memoryless property, which says that future probabilities do not depend on any past information. Mathematically, it says that (P(X > x + k | X > x) = P(X > k)).

If (T) represents the waiting time between events, and if (T sim Exp(lambda)), then the number of events (X) per unit time follows the Poisson distribution with mean (lambda). The probability density function of (PX) is ((X = k) = dfrace^<-k>>). This may be computed using a TI-83, 83+, 84, 84+ calculator with the command ( ext(lambda, k)). The cumulative distribution function (P(X leq k)) may be computed using the TI-83, 83+,84, 84+ calculator with the command ( ext(lambda, k)).

Q: (a) Find a Taylor polynomial of degree 4 for f(x) = sin(x) expan- ded about xo = 0.

A: Since solve the first question for you. If youwant any specific question to be solved then please sp.

A: We have to evaluate the given integral.

A: As we know that F= m×g . (1) Where m is mass of object and g is acceleration due to gravity.

Q: Numericle Analysis Solve the question clearly. Thanks.

A: Click to see the answer

Q: show that the equation 3x+2cosx+5=0 has exaclty one real root.

A: Click to see the answer

Q: There are multiple selections, so i wrote all of the answers for them on paper

A: Click to see the answer

Q: consider f(x)=-6x8+2lxl. is the function even, odd, or neither. justify the answer using algebraic t.

A: Click to see the answer

Q: How large should n be to guarantee that the Trapezoidal Rule approximation to - 6x +24x2- 2x 5) da i.

## Remarks

Cells in range that contain TRUE or FALSE are ignored.

If a cell in average_range is an empty cell, AVERAGEIF ignores it.

If range is a blank or text value, AVERAGEIF returns the #DIV0! error value.

If a cell in criteria is empty, AVERAGEIF treats it as a 0 value.

If no cells in the range meet the criteria, AVERAGEIF returns the #DIV/0! error value.

You can use the wildcard characters, question mark (?) and asterisk (*), in criteria. A question mark matches any single character an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (

Average_range does not have to be the same size and shape as range. The actual cells that are averaged are determined by using the top, left cell in average_range as the beginning cell, and then including cells that correspond in size and shape to range. For example:

Then the actual cells evaluated are

Note: The AVERAGEIF function measures central tendency, which is the location of the center of a group of numbers in a statistical distribution. The three most common measures of central tendency are:

Average which is the arithmetic mean, and is calculated by adding a group of numbers and then dividing by the count of those numbers. For example, the average of 2, 3, 3, 5, 7, and 10 is 30 divided by 6, which is 5.

Median which is the middle number of a group of numbers that is, half the numbers have values that are greater than the median, and half the numbers have values that are less than the median. For example, the median of 2, 3, 3, 5, 7, and 10 is 4.

Mode which is the most frequently occurring number in a group of numbers. For example, the mode of 2, 3, 3, 5, 7, and 10 is 3.

For a symmetrical distribution of a group of numbers, these three measures of central tendency are all the same. For a skewed distribution of a group of numbers, they can be different.

## Tunneling

The observation that the wavefunctions are not zero at the classical limit means that the quantum mechanical oscillator has a finite probability of having a displacement that is larger than what is classically possible. The oscillator can be in a region of space where the potential energy is greater than the total energy. Classically, when the potential energy equals the total energy, the kinetic energy and the velocity are zero, and the oscillator cannot pass this point. A quantum mechanical oscillator, however, has a finite probability of passing this point. For a molecular vibration, this property means that the amplitude of the vibration is larger than what it would be in a classical picture. In some situations, a larger amplitude vibration could enhance the chemical reactivity of a molecule.

Figure (PageIndex<2>): In classical mechanics a particle can only pass through a barrier if it has enough kinetic energy to get over the barrier in potential energy. A quantum particle can sometimes sneak through a barrier even when its energy would seem to trap it on one side. This effect, called quantum tunneling, explains how trapped nuclear particles can sometimes escape their nuclei, leading to radioactive decay. Tunneling also allows photons of visible light to escape the interior of the sun and electrical currents to function. Exercise (PageIndex<3>)

Plot the probability density for (v = 0) and (v = 1) states. Mark the classical limits on each of the plots, since the limits are different because the total energy is different for (v = 0) and (v = 1). Shade in the regions of the probability densities that extend beyond the classical limit.

The fact that a quantum mechanical oscillator has a finite probability to enter the classically forbidden region of space is a consequence of the wave property of matter and the Heisenberg Uncertainty Principle. A wave changes gradually, and the wavefunction approaches zero gradually as the potential energy approaches infinity.

To understand quantum tunneling, think about a particle moving on a line. Now imagine placing a wall on each side of the particle. In classical physics, the particle bounces back and forth between the walls and eventually stops, trapped. The particle has enough energy to be outside the walls, but it does not have enough energy to get there.

Figure (PageIndex<2>): (left) Classical behavior of a particle colliding with a barrier of finite thickness and height. (right) Corresponding quantum behavior. This chance to be found beyond the barrier is called the tunneling probability.

In quantum mechanics, the particle behaves like a wave. The wave is most intense between the walls, so the particle is probably there. At the walls, the quantum wave diminishes but does not become zero it extends slightly into the walls. A very low-intensity wave extends outside the walls. There is thus a tiny probability that the particle will be found outside the walls.

Figure (PageIndex<3>): Quantum tunnelling through a barrier. The energy of the tunneled particle is the same but the probability amplitude is decreased. (CC-SA-BY 3.0 Felix Kling).

### Tunneling in Harmonic Oscillators

We should be able to calculate the probability that the quantum mechanical harmonic oscillator is in the classically forbidden region for the lowest energy state of the harmonic oscillator, the state with (v = 0). The classically forbidden region is shown by the shading of the regions beyond (Q_0) in the graph you constructed for Exercise (PageIndex<3>). The area of this shaded region gives the probability that the bond oscillation will extend into the forbidden region (Figure (PageIndex<3>)). To calculate this probability, we use

because the integral from 0 to (Q_0) for the allowed region can be found in integral tables and the integral from (Q_0) to (infty) cannot. The form of the integral, P[allowed], to evaluate is

[P[ ext ] = 2 int limits _0^ Psi _0^* (Q) Psi _0 (Q) dQ label <5.4.10>]

The factor 2 appears in Equation ( ef<5.4.10>) from the symmetry of the wavefunction, which extends from (-Q_0) to (+Q_0). To evaluate the integral in Equation ( ef<5.4.10>), use the wavefunction and do the integration in terms of (x). Recall that for (v = 0), (Q = Q_0) corresponds to (x = 1). Including the normalization constant, Equation ( ef<5.4.10>) produces

[P[ ext ] = dfrac <2>> int limits _0^1 exp (-x^2) dx label <5.4.11>]

The integral in Equation ( ef<5.4.11>) is called an error function (ERF) and can only be evaluated numerically. Values can be found in books of mathematical tables. When the limit of integration is 1, ERF(l) = 0.843 and P[forbidden] = 0.157. This result means that the quantum mechanical oscillator can be found in the forbidden region 16% of the time. This effect is substantial and leads to the phenomenon called quantum mechanical tunneling.

Numerically Verify that Pr[allowed] in Equation ( ef<5.4.11>) equals 0.843. To obtain a value for the integral do not use symbolic integration or symbolic equals.

## How to find median in Excel

Median is the middle value in a group of numbers, which are arranged in ascending or descending order, i.e. half the numbers are greater than the median and half the numbers are less than the median. For example, the median of the data set <1, 2, 2, 3, 4, 6, 9>is 3.

This works fine when there are an odd number of values in the group. But what if you have an even number of values? In this case, the median is the arithmetic mean (average) of the two middle values. For example, the median of <1, 2, 2, 3, 4, 6>is 2.5. To calculate it, you take the 3rd and 4th values in the data set and average them to get a median of 2.5.

In Microsoft Excel, a median is calculated by using the MEDIAN function. For example, to get the median of all amounts in our sales report, use this formula:

To make the example more illustrative, I've sorted the numbers in column C in ascending order (though it is not actually required for the Excel Median formula to work):

In contrast to average, Microsoft Excel does not provide any special function to calculate median with one or more conditions. However, you can "emulate" the functionality of MEDIANIF and MEDIANIFS by using a combination of two or more functions like shown in these examples:

## 5.4: The Harmonic Oscillator Energy Levels

For a classical oscillator, we know exactly the position, velocity, and momentum as a function of time. The frequency of the oscillator (or normal mode) is determined by the reduced mass (mu) and the effective force constant (k) of the oscillating system and does not change unless one of these quantities is changed. There are no restrictions on the energy of the oscillator, and changes in the energy of the oscillator produce changes in the amplitude of the vibrations experienced by the oscillator.

Figure (PageIndex<1>): Potential energy function and first few energy levels for harmonic oscillator. (CC BY=NC Ümit Kaya)

For the quantum mechanical oscillator, the oscillation frequency of a given normal mode is still controlled by the mass and the force constant (or, equivalently, by the associated potential energy function). However, the energy of the oscillator is limited to certain values. The allowed quantized energy levels are equally spaced and are related to the oscillator frequencies as given by Equation ( ef<5.4.1>) and Figure (PageIndex<1>).

[E_v = left ( v + dfrac <1> <2> ight ) hbar omega = left ( v + dfrac <1> <2> ight ) h u label <5.4.1>]

In a quantum mechanical oscillator, we cannot specify the position of the oscillator (the exact displacement from the equilibrium position) or its velocity as a function of time we can only talk about the probability of the oscillator being displaced from equilibrium by a certain amount. This probability is given by

We can, however, calculate the average displacement and the mean square displacement of the atoms relative to their equilibrium positions. This average is just (left langle Q ight angle), the expectation value for (Q), and the mean square displacement is (left langle Q^2 ight angle), the expectation value for (Q^2). Similarly we can calculate the average momentum (left langle P_Q ight angle), and the mean square momentum (left langle P^2_Q ight angle), but we cannot specify the momentum as a function of time.

Physically what do we expect to find for the average displacement and the average momentum? Since the potential energy function is symmetric around (Q = 0), we expect values of (Q > 0) to be equally as likely as (Q < 0). The average value of (Q) therefore should be zero.

These results for the average displacement and average momentum do not mean that the harmonic oscillator is sitting still. As for the particle-in-a-box case, we can imagine the quantum mechanical harmonic oscillator as moving back and forth and therefore having an average momentum of zero. Since the lowest allowed harmonic oscillator energy, (E_0), is (dfrac<2>) and not 0, the atoms in a molecule must be moving even in the lowest vibrational energy state. This phenomenon is called the zero-point energy or the zero-point motion, and it stands in direct contrast to the classical picture of a vibrating molecule. Classically, the lowest energy available to an oscillator is zero, which means the momentum also is zero, and the oscillator is not moving.

Compare the quantum mechanical harmonic oscillator to the classical harmonic oscillator at (v=1) and (v=50).

At v=1 the classical harmonic oscillator poorly predicts the results of quantum mechanical harmonic oscillator, and therefore reality. At v=1 the particle will be near the ground state and the classical model will predict the particle to spend most it's time on the outer edges when the KE goes to zero and PE is at a maximum, while the quantum model says the opposite and that the particle will be more likely to be found in the center. At v=50 the quantum model will begin to match the classical much more closely, with the particle most likely to be found at the edges. The quantum model looking more like the classical at higher quantum numbers can be referred to as the correspondence principle.

Since the average values of the displacement and momentum are all zero and do not facilitate comparisons among the various normal modes and energy levels, we need to find other quantities that can be used for this purpose. We can use the root mean square deviation (see also root-mean-square displacement) (also known as the standard deviation of the displacement) and the root-mean-square momentum as measures of the uncertainty in the oscillator's position and momentum.

For a molecular vibration, these quantities represent the standard deviation in the bond length and the standard deviation in the momentum of the atoms from the average values of zero, so they provide us with a measure of the relative displacement and the momentum associated with each normal mode in all its allowed energy levels. These are important quantities to determine because vibrational excitation changes the size and symmetry (or shape) of molecules. Such changes affect chemical reactivity, the absorption and emission of radiation, and the dissipation of energy in radiationless transitions.

The harmonic oscillator wavefunctions form an orthonormal set this means that all functions in the set are normalized individually

[int limits _<-infty>^ psi ^*_v (x) psi _v (x) dx = 1 label <5.4.4>]

and are orthogonal to each other.

[int limits _<-infty>^ psi ^*_ (x) psi _v (x) dx = 0 ext v' e v label <5.4.5>]

The fact that a family of wavefunctions forms an orthonormal set is often helpful in simplifying complicated integrals. We will use these properties when we determine the harmonic oscillator selection rules for vibrational transitions in a molecule and calculate the absorption coefficients for the absorption of infrared radiation.

Finally, we can calculate the probability that a harmonic oscillator is in the classically forbidden region. What does this tantalizing statement mean? Classically, the maximum extension of an oscillator is obtained by equating the total energy of the oscillator to the potential energy, because at the maximum extension all the energy is in the form of potential energy. If all the energy weren't in the form of potential energy at this point, the oscillator would have kinetic energy and momentum and could continue to extend further away from its rest position. Interestingly, as we show below, the wavefunctions of the quantum mechanical oscillator extend beyond the classical limit, i.e. beyond where the particle can be according to classical mechanics.

The lowest allowed energy for the quantum mechanical oscillator is called the zero-point energy, (E_0 = dfrac <2>). Using the classical picture described in the preceding paragraph, this total energy must equal the potential energy of the oscillator at its maximum extension. We define this classical limit of the amplitude of the oscillator displacement as (Q_0). When we equate the zero-point energy for a particular normal mode to the potential energy of the oscillator in that normal mode, we obtain

The zero-point energy is the lowest possible energy that a quantum mechanical physical system may have. Hence, it is the energy of its ground state.

Recall that (k) is the effective force constant of the oscillator in a particular normal mode and that the frequency of the normal mode is given by Equation ( ef<5.4.1>) which is