Estimating the Average Value of a Function Problem: Determine the average value of the function f(x) over the interval [a, b]. Strategy: Choose sample points a = x 0 < x 1 < x 2 < < x n 1 < x n = b and estimate the average value of f(x) as follows. Let Avg[f(x)] denote the average value of f(x) on [a, b]. Let M i be the maximum value of the function f(x) on the sub-interval [x i 1, x i ]. Then Avg[f(x)] 1 b a (M 1 x 1 + + M n x n ). Let m i be the minimum value of f(x) on the sub-interval [x i 1, x i ]. Then 1 b a (m 1 x 1 + + m n x n ) Avg[f(x)]. Therefore, n m i x i Avg[f(x)] i=1 n M i x i. i=1 The hope is that the average value can be computed to an arbitrary degree of accuracy provided that sufficiently many sample points are chosen.
Example: Estimate the average value of f(x) = x 2 on the interval [0, 2]. Suppose one chooses the sample points x 0 = 0 < x 1 = 0.5 < x 2 = 1 < x 3 = 1.5 < x 4 = 2. Then the average value of is less than or equal to 1 b a (M 1 x 1 + + M n x n ) 1 ( (0.5)2 (0.5) + (1) 2 (0.5) + (1.5) 2 (0.5) + (2) 2 (0.5) ) = 1.875. 2 That M 1 = (0.5) 2, M 2 = (1) 2, etc. can be observed from the graph of the function. The function f(x) = x 2 is increasing on the interval [0, 2], and so the maximum value of f(x) on each sub-interval occurs at the right endpoint. (The maximum value would occur at the left endpoint in the case of a decreasing function. And the maximum value of an arbitrary function could occur almost anywhere within the sub-interval.) Figure 1: The graph displays the function f(x) = x 2 on the interval [0, 2]. The values of M 1 x 1, M 2 x 2, etc. correspond to the areas of the blue shaded rectangles.
On the other hand, the average value of is greater than or equal to 1 b a (m 1 x 1 + + m n x n ) 1 ( (0)2 (0.5) + (0.5) 2 (0.5) + (1) 2 (0.5) + (1.5) 2 (0.5) ) = 0.875. 2 That m 1 = (0) 2, m 2 = (0.5) 2, etc. can also be observed from the graph of the function. The function f(x) = x 2 is increasing on the interval [0, 2], and so the minimum value of f(x) on each sub-interval occurs at the left endpoint. Figure 2: The graph displays the function f(x) = x 2 on the interval [0, 2]. The values of m 1 x 1, m 2 x 2, etc. correspond to the areas of the green shaded rectangles. Together, these two estimates yield 0.875 Avg[f(x)] 1.875. If the interval [0, 2] is divided into 100 sub-intervals instead of 4 sub-intervals, a computer calculation shows that 1.3134 Avg[f(x)] 1.3534.
Riemann Sums Definition: A sum of the form n y k x k, k=1 where a = x 0 < x 1 < < x n = b and each y k is some value of f(x) on the k-th sub-interval [x k 1, x k ] is called a Riemann sum. There are many kinds of Riemann sums depending upon the method used to choose the values of each y k. If we choose y k = M k, the maximum value of f(x) on the k-th sub-interval, then the resulting Riemann sum is called an upper Riemann sum. If y k = m k, then this is called a lower Riemann sum. The sample points a = x 0 < < x n = b are usually referred to as a partition of the interval [a, b]. It is convenient to record the points in the partition as a set of increasing values: P = {a = x 0 < < x n = b} and then refer to the set P as the partition.
Exercise: Let f(x) = x 3 x on the interval [0, 2]. Suppose that we choose sample points as follows 0 = x 0 < 1 = x 1 < 2 = x 2. Determine the values of M 1, M 2, m 1, and m 2. Use these values to compute the values of the upper and lower Riemann sums for this function using the given partition. Then estimate the average value of f(x) on [0, 2].
Solution: To find the maximum and minimum values, first find all of the critical points. f (x) = 3x 2 1 = critical points: x = ± 1 3. On the first sub-interval, [x 0, x 1 ] = [0, 1], compute the values of f(x) at the end points and at the critical point (which lies in this interval): f(0) = 0, f(1) = 0, f(1/ 3) = (1/ 3) 3 1/ 3 = 1/3 3 1 3 = 2/ 3. Therefore, the minimum value on the first sub-interval is m 1 = 2/ 3, and the maximum value is M 1 = 0. On the second sub-interval, [x 1, x 2 ] = [1, 2], compute the value of f(x) at the end points (and ignore the critical points since neither lies in this interval): f(1) = 0, f(2) = 6. Therefore, m 2 = 0 and M 2 = 6. Figure 3: The graph displays the function f(x) = x 3 x on the interval [0, 2]. The values of M 1 x 1, M 2 x 2, etc. correspond to the areas of the blue shaded rectangles. The first blue rectangle has a height of zero, and so it appears as a line segment from (0, 0) to (1, 0).
Figure 4: The graph displays the function f(x) = x 3 x on the interval [0, 2]. The values of m 1 x 1, m 2 x 2, etc. correspond to the green shaded rectangles. The area of the first rectangle is (m 1 x 1 ). since area is a positive quantity and m 1 < 0. The terms in the Riemann sum can (with care) be interpreted as a signed area. The second green rectangle has a height of zero, and so it appears as a line segment from (0, 0) to (1, 0). We now compute the Riemann sums. The upper Riemann sum is M 1 x 1 + M 2 x 2 = 0 (1 0) + 6 (2 1) = 6, and the lower Riemann sum is m 1 x 1 + m 2 x 2 = 2 3 (1 0) + 0 (2 1) = 2 3. Therefore, the average value of f(x) on [0, 2] can be estimated as follows: 1 3 Avg[f(x)] 3. (We multiplied each Riemann sum by 1/(b a) = 1/(2 0) = 1/2.) To improve this estimate, we should choose a finer partition of the interval [0, 2].
The Definite Integral The definite integral of f(x) on the interval [a, b] is essentially the limiting value of the upper and lower Riemann sums of a function. However, there are some complications that need to overcome to make this mathematically precise. Complication: Some functions do not have maximum or minimum values. Example: Define f(x) on the interval [0, 1] as follows: let f(x) = 1/x if x > 0 and let f(x) = 0 if x = 0. Then f(x) does not have a maximum value. Figure 5: The function above is defined at every point of the interval [0, 1], but this function does not have a maximum value on [0, 1]. Wild Complication: A function can have a maximum and a minimum on every subinterval, but choosing more sample points, may not improve the estimate. Example: Dirichlet s fuction is defined as follows: D(x) = 0 if x is rational and D(x) = 1 if x is irrational. On any interval, the maximum value of D(x) is one and the minimum value is zero.
A Way To Avoid Complications Assume that f(x) is continuous on the interval [a, b]. Then f(x) attains a maximum and a minimum value on any subinterval [x i 1, x i ] [a, b]. Moreover, if f(x) is continuous on the interval [a, b] and if for each positive integer n we choose the sample points a = x 0 < < x n = b so as to divide the interval [a, b] into n sub-intervals of equal length, then lim n k=1 n m i x i = lim n k=1 n M i x i. Definition: The common limiting value above is called the definite integral or the Riemann integral of f(x) from x = a to x = b. It is denoted by b a f(x) dx. In fact, more is true. If f(x) is continuous, and if n k=1 y k x k is any Riemann sum, then so long as all of the lengths of the subintervals tend to zero, the sequence of Riemann sums will approach the value of b a f(x) dx. This has the practical implication that you can numerically estimate the value of the definite integral using easier to compute Riemann sums (e.g. right-endpoint, left-endpoint, or mid-point Riemann sums). In practice, there are more sophisticated numerical techniques (e.g. Simpson s rule). Despite these nice answer, this is just the beginning of the story. To apply this theory to applications, functions which are not continous need to be considered. This necessitates a refining the theory of the definite integral. The modern approach is to study what is known as the Lebesgue integral.
Definite Integrals and Area The value of geometrically motivated definite integrals can be computed using the observation that if f(x) is non-negative on [a, b], then the upper and lower Riemann sums estimate the area of the region below the curve y = f(x), above the x-axis and bounded on the left by the vertical line x = a and bounded on the right by the vertical line x = b. Figure 6: The function f(x) = xe x on the interval [0.5, 4] is displayed. The area below the curve refers to the region below y = f(x), above the x-axis, and between the vertical lines which pass through the endpoints of the interval. Exercise: Compute the value of each of the following definite integrals by sketching the graph of the integrand (the function inside the integral) and using geometrical formulas to compute the area. 1. 2. 3. 5 0 5 3 5 0 2x dx 2x dx 25 x 2 dx
Solutions to the exercise: 1. 5 0 2x dx 2. This integral represents the area below the curve y = 2x. Since this curve is a line, the region below the curve is a triangle. The area of this triangle is (1/2) 5 10 = 25. 5 3 2x dx This integral represents the area of a trapezoid. The area can be computed from the formula for the area of a trapezoid or by using the previous calculation and subtracting the area of the triangle below y = 2x on the interval [0, 3]. The value of the integral above is 25 (1/2) 3 6 = 16.
3. 5 0 25 x 2 dx This integral represents the area of one quarter of a circle of radius 5. Therefore, the value of the integral is (1/4) π 5 2 = 25π/4.