Separate height from width in a sum
Four products, one shared factor
The sum \(0.5\cdot1.25 + 0.5\cdot2 + 0.5\cdot3.25 + 0.5\cdot5\) has four terms, and each term is a product of two numbers.
Each term is also the area of one teal rectangle. The rectangles stand under the curve \(y = x^2 + 1\), between 0 and 2.
The factor 0.5 is in every term. It is the width of each rectangle, because the 4 pieces share the length 2 and \(2 \div 4 = 0.5\).
The other factors are 1.25, 2, 3.25 and 5. Move the Rectangle slider to select each rectangle in turn. Its orange height is the curve at the right end of its piece, at 0.5, 1, 1.5 or 2.
From term to term the width stays the same and the height changes.
One factor changes, one stays
A term of a Riemann sum has the form \(f(x_i)\,\Delta x\), the area of one rectangle.
The factor \(f(x_i)\) is the value of the function at the sample point \(x_i\), shown by the orange bar. Move the Rectangle slider. The height changes, because \(x_i\) changes.
The factor \(\Delta x\) is the width of a piece. All pieces are equal, so \(\Delta x\) is the same in every term.
Change \(n\). The width changes, but it is still one number for the whole sum.
Notation
Each term is the height of a rectangle times its width.
\[\text{term } i = \cy{f(x_i)}\cdot\cg{\Delta x}\]The width is the same in every term, so it can move in front of the sum. Only a factor without \(i\) can move out.
\[\sum_{i=1}^{n} \cy{f(x_i)}\,\cg{\Delta x} = \cg{\Delta x}\sum_{i=1}^{n} \cy{f(x_i)}\]To read a given sum, find the spacing between neighboring sample points, which is the width. The rest of the term is the height, the function with the sample point in place of \(x\). The sample points \(x_1\) to \(x_n\) are the right ends of the pieces, so the interval ends at \(x_n\) and starts one width before \(x_1\).
When it fails
A term is the area of its rectangle only when the height \(f(x_i)\) is positive. Lower the curve below the x-axis.
Where the curve is below the x-axis, the height \(f(x_i)\) is negative and the rectangle is drawn red. The width is still positive, so the term has the sign of its height and counts as negative.
Example 1: A square root
Read the sum \(\displaystyle\sum_{i=1}^{n}\frac{1}{n}\sqrt{\frac{i}{n}}\) as a sum of height times width. Name the function, the width and the interval.
The sample points are \(\frac{i}{n}\). Neighboring sample points are \(\frac1n\) apart, so the width is \(\frac1n\).
\[\cy{x_i = \dfrac{i}{n}}, \qquad \cg{\Delta x = \dfrac1n}\]The other factor is the square root of the sample point, so the height comes from the function \(f(x) = \sqrt{x}\).
\[\cy{f(x_i) = \sqrt{x_i}}\]The last sample point is \(\frac nn = 1\), and the first piece starts one width before \(\frac1n\), at \(\frac1n - \frac1n = 0\). The interval is from 0 to 1.
Example 2: A factor that is not the width
Read the sum \(\displaystyle\sum_{i=1}^{n}\frac{6}{n}\left(2 + \frac{3i}{n}\right)^2\) as a sum of height times width. Name the function and the width.
The factor \(\frac6n\) does not contain \(i\), but the factor \(\left(2 + \frac{3i}{n}\right)^2\) does.
A tempting wrong move: The factor without \(i\) is the width, so the width is \(\frac6n\).
\[\Delta x = \dfrac6n\]The sample points \(2 + \frac{3i}{n}\) are only \(\frac3n\) apart, so rectangles \(\frac6n\) wide are twice as wide as the pieces. The red rectangles overlap, and the first one starts before 2.
The width is the spacing of the sample points, \(\frac3n\). Write \(\frac6n\) as \(2\cdot\frac3n\), so the factor 2 belongs to the height.
\[\begin{aligned} &\dfrac6n\left(2 + \dfrac{3i}{n}\right)^2 \\ &\quad = \cg{\dfrac3n}\cdot\cy{2\left(2 + \dfrac{3i}{n}\right)^2} \end{aligned}\]The height is the function \(f(x) = 2x^2\) at the sample point \(x_i = 2 + \frac{3i}{n}\). The last sample point is \(2 + \frac{3n}{n} = 5\), and the first piece starts at \(2 + \frac3n - \frac3n = 2\), so the interval is from 2 to 5.
Practice
Read the sum \(\displaystyle\sum_{i=1}^{n}\frac{\pi}{n}\sin\frac{\pi i}{n}\) as a sum of height times width. Name the function, the width and the interval.
On the figure, the orange dots on the axis mark the sample points. The width is the distance between two neighboring dots.
Solution
The sample points are \(\frac{\pi i}{n}\). Neighbors are \(\frac{\pi}{n}\) apart, so the width is \(\frac{\pi}{n}\).
\[\cg{\Delta x = \dfrac{\pi}{n}}\]The other factor is the sine of the sample point, so the function is \(f(x) = \sin x\). The last sample point is \(\frac{\pi n}{n} = \pi\), and the first piece starts at \(\frac{\pi}{n} - \frac{\pi}{n} = 0\), so the interval is from 0 to \(\pi\).
\[\cy{f(x_i) = \sin x_i}\]
Questions
Questions 1 and 2 use the figure of the line \(y = x + 1\) on the interval from 1 to 7. Each of the three rectangles is as tall as the line at the right end of its piece.
What is the height of the second rectangle?
- 6
- 5
- 2
Answer
6
What is the sum of the areas of the three rectangles?
- 36
- 18
- 12
Answer
36
A sum uses 5 pieces on the interval from 2 to 12. It reads \(f(x) = \frac{x}{2}\) at the right end of each piece. What is the third term, \(f(x_3)\,\Delta x\)?
- 8
- 4
- 6
Answer
8
Summary
You split each term into a height, the function at the sample point, and a width, the spacing of the sample points.
This works because each term is the area of a rectangle, which is its height times its width.
You use it to find the function and the width before you write a sum as an integral.
This is one of four skills in topic 6.3 of Which & Why: AP Calculus.