Single-Variable-Calculus ยท Unit 14 ยท Video 4 ยท Interactive Practice

Riemann Sums: the Definite Integral and a Year of Loans

IKey Formulas

FormulaNameWhat you need
ฮ”x=bโˆ’an\Delta x = \dfrac{b - a}{n}Width of each pieceInterval [a,b][a, b] cut into nn equal pieces
โˆ‘i=1nf(ci)โ€‰ฮ”x\displaystyle\sum_{i=1}^{n} f(c_i)\,\Delta xRiemann sumA sample point cic_i in piece ii
โˆซabf(x)โ€‰dx=limโกnโ†’โˆžโˆ‘i=1nf(ci)โ€‰ฮ”x\displaystyle\int_a^b f(x)\,dx = \lim_{n\to\infty}\sum_{i=1}^{n} f(c_i)\,\Delta xDefinite integralContinuous ff; any choice of the cic_i
โˆซ01er(1โˆ’t)โ€‰f(t)โ€‰dt\displaystyle\int_0^1 e^{r(1-t)}\,f(t)\,dtTotal owed at the end of the yearBorrowing rate f(t)f(t), interest rate rr per year

Key Insight: The dxdx in an integral is what the width ฮ”x\Delta x becomes in the limit, so the integral carries the units of ff times the units of xx: dollars per year times years gives dollars.

IIVisualization 1 โ€” Thin Rectangles, One Limit

For x2x^2 on [0,2][0, 2], left, right and midpoint staircases all close in on โˆซ02x2โ€‰dx=83\int_0^2 x^2\,dx = \tfrac{8}{3}.

IIIVisualization 2 โ€” A Year of Daily Loans

Total borrowed is a Riemann sum of rate times time step; with daily steps it is nearly โˆซ01f(t)โ€‰dt\int_0^1 f(t)\,dt.

๐Ÿ’ก The rate here is f(t)=100,000+600,000โ€‰t(1โˆ’t)2f(t) = 100{,}000 + 600{,}000\,t(1-t)^2 dollars per year, whose integral over [0,1][0, 1] is exactly 150,000150{,}000 dollars.

IVVisualization 3 โ€” From Borrowed to Owed

A loan taken at time tt grows for 1โˆ’t1 - t years, so the year-end debt weights f(t)f(t) by er(1โˆ’t)e^{r(1-t)}.

VQuiz Questions

Problem 1 ยท A Right-Endpoint Riemann Sum

Given: f(x)=x2f(x) = x^2 on [1,3][1, 3], cut into n=4n = 4 equal pieces, with each sample point cic_i the right endpoint of its piece โ€” find the Riemann sum โˆ‘i=14f(ci)โ€‰ฮ”x\sum_{i=1}^{4} f(c_i)\,\Delta x.

โœ… Correct! ฮ”x=12\Delta x = \tfrac{1}{2}, the right endpoints are 1.5,2,2.5,31.5, 2, 2.5, 3, and 12(2.25+4+6.25+9)=10.75\tfrac{1}{2}(2.25 + 4 + 6.25 + 9) = 10.75.
โŒ Those are the left endpoints. 1,1.5,2,2.51, 1.5, 2, 2.5 give 6.756.75; the right endpoint of piece ii is ci=1+i2c_i = 1 + \tfrac{i}{2}, so the samples are 1.5,2,2.5,31.5, 2, 2.5, 3.
โŒ The heights are right, but each rectangle's area is height times width. Multiply 2.25+4+6.25+9=21.52.25 + 4 + 6.25 + 9 = 21.5 by ฮ”x=12\Delta x = \tfrac{1}{2}.
โŒ That is the limit, not this sum. 263\tfrac{26}{3} is the area โˆซ13x2โ€‰dx\int_1^3 x^2\,dx; with only 44 right-endpoint rectangles on a rising curve the sum overshoots it.
โŒ Not quite. Find ฮ”x=3โˆ’14\Delta x = \tfrac{3 - 1}{4}, list the right endpoints, then add f(ci)โ€‰ฮ”xf(c_i)\,\Delta x.
Show solution

The width of each piece is

ฮ”x=bโˆ’an=3โˆ’14=12.\Delta x = \frac{b - a}{n} = \frac{3 - 1}{4} = \frac{1}{2}.

The right endpoint of piece ii is ci=1+iโ€‰ฮ”xc_i = 1 + i\,\Delta x, so c1,c2,c3,c4=1.5,ย 2,ย 2.5,ย 3c_1, c_2, c_3, c_4 = 1.5,\ 2,\ 2.5,\ 3. Then

โˆ‘i=14f(ci)โ€‰ฮ”x=12(1.52+22+2.52+32)=12(2.25+4+6.25+9)=12(21.5)=10.75.\sum_{i=1}^{4} f(c_i)\,\Delta x = \tfrac{1}{2}\big(1.5^2 + 2^2 + 2.5^2 + 3^2\big) = \tfrac{1}{2}(2.25 + 4 + 6.25 + 9) = \tfrac{1}{2}(21.5) = 10.75.

Because x2x^2 rises across each piece, the right endpoint gives the tallest rectangle, so 10.7510.75 is larger than the exact area โˆซ13x2โ€‰dx=263โ‰ˆ8.67\int_1^3 x^2\,dx = \tfrac{26}{3} \approx 8.67; the left-endpoint sum, 6.756.75, is smaller.

Problem 2 ยท Keep Track of the Units

Given: A business borrows at a constant rate of $73,000 per year, with tt measured in years, and its bank adds up the daily pieces โˆ‘i=1365fโ€‰โฃ(i365)ฮ”t\sum_{i=1}^{365} f\!\left(\tfrac{i}{365}\right)\Delta t โ€” find the correct time step and the total borrowed over the year.

โœ… Correct! Each day borrows $73,000 per year times 1365\tfrac{1}{365} year, which is $200, and 365365 such days make $73,000.
โŒ That is a single term of the sum. $200 is one day's piece fโ€‰โฃ(i365)ฮ”tf\!\left(\tfrac{i}{365}\right)\Delta t; the total adds all 365365 of them.
โŒ The units do not match. The rate is in dollars per year, so ฮ”t\Delta t must be in years: one day is 1365\tfrac{1}{365} year, not 11. Using 11 inflates the total 365365-fold.
โŒ Not quite. Check that (dollars per year) times (time step) comes out in dollars.
Show solution

Since tt is in years and ff is in dollars per year, the time step must be in years: one day is ฮ”t=1365\Delta t = \tfrac{1}{365} year. Then each term is

fโ€‰โฃ(i365)ฮ”t=73,000โ‹…1365=200ย dollars,f\!\left(\tfrac{i}{365}\right)\Delta t = 73{,}000 \cdot \tfrac{1}{365} = 200 \text{ dollars},

and there are 365365 terms, so the total borrowed is 365โ‹…200=73,000365 \cdot 200 = 73{,}000 dollars. The units check: (dollars per year) ร—\times (years) == dollars. The integral โˆซ01f(t)โ€‰dt\int_0^1 f(t)\,dt gives the same $73,000, the area of a rectangle of height 73,00073{,}000 and width 11.

Problem 3 ยท One Day's Loan at Year End

Given: On day 146146 (time t=146365=0.4t = \tfrac{146}{365} = 0.4 year) the business borrows $1,000. Interest is compounded continuously at r=0.05r = 0.05 per year โ€” find what that loan has grown to by the end of the year.

โœ… Correct! The loan has 1โˆ’0.4=0.61 - 0.4 = 0.6 year left to grow, so it becomes 1000โ€‰e0.05โ‹…0.6=1000โ€‰e0.03โ‰ˆ1030.451000\,e^{0.05 \cdot 0.6} = 1000\,e^{0.03} \approx 1030.45 dollars.
โŒ That loan was not out for a full year. 1000โ€‰e0.051000\,e^{0.05} is a loan from t=0t = 0; money borrowed at t=0.4t = 0.4 grows only for the remaining 1โˆ’t1 - t years.
โŒ That uses the time already passed. e0.05โ‹…0.4e^{0.05 \cdot 0.4} counts the 0.40.4 year before the loan existed; the growth factor is er(1โˆ’t)e^{r(1-t)}, using the time still to come.
โŒ That is simple interest. 1000(1+0.05โ‹…0.6)1000(1 + 0.05 \cdot 0.6) ignores compounding; continuous compounding multiplies by e0.03e^{0.03}, which is slightly more than 1.031.03.
โŒ Not quite. Use the growth factor er(1โˆ’t)e^{r(1-t)} with t=0.4t = 0.4.
Show solution

Money borrowed at time tt has 1โˆ’t1 - t years left in the year. Here 1โˆ’0.4=0.61 - 0.4 = 0.6 year, which is 365โˆ’146=219365 - 146 = 219 days. With continuous compounding a principal PP grows to Pโ€‰er(1โˆ’t)P\,e^{r(1-t)}, so

1000โ€‰e0.05โ€‰(1โˆ’0.4)=1000โ€‰e0.03โ‰ˆ1000โ‹…1.030455โ‰ˆ1030.45ย dollars.1000\,e^{0.05\,(1 - 0.4)} = 1000\,e^{0.03} \approx 1000 \cdot 1.030455 \approx 1030.45 \text{ dollars}.

This growth factor er(1โˆ’t)e^{r(1-t)} is exactly the weight that turns the total borrowed, โˆซ01f(t)โ€‰dt\int_0^1 f(t)\,dt, into the total owed, โˆซ01er(1โˆ’t)f(t)โ€‰dt\int_0^1 e^{r(1-t)} f(t)\,dt.

Problem 4 ยท Owed After Two Years

Given: The business borrows at rate f(t)f(t) dollars per year during the first year only, 0โ‰คtโ‰ค10 \le t \le 1, and repays nothing until the end of the second year, t=2t = 2, with interest compounded continuously at rate rr โ€” which integral is the total owed at t=2t = 2?

โœ… Correct! A loan from time tt grows for 2โˆ’t2 - t years before t=2t = 2, so each piece f(t)โ€‰ฮ”tf(t)\,\Delta t is weighted by er(2โˆ’t)e^{r(2-t)}.
โŒ That is what is owed at t=1t = 1. The debt keeps growing through the second year, so each loan grows for 2โˆ’t2 - t years, not 1โˆ’t1 - t.
โŒ That reverses the timing. erte^{rt} would let the earliest loans grow least; a loan grows for the time remaining until repayment, 2โˆ’t2 - t.
โŒ Interest compounds; it does not double the debt. Another year multiplies the year-one debt by ere^{r}, not by 22.
โŒ Not quite. Ask how long the loan from time tt grows before t=2t = 2.
Show solution

Cut the first year into days of width ฮ”t=1365\Delta t = \tfrac{1}{365}. On day ii, at time t=i365t = \tfrac{i}{365}, the business borrows fโ€‰โฃ(i365)ฮ”tf\!\left(\tfrac{i}{365}\right)\Delta t dollars. That loan grows until t=2t = 2, which is 2โˆ’i3652 - \tfrac{i}{365} years, so at t=2t = 2 it is worth

er(2โˆ’i/365)โ€‰fโ€‰โฃ(i365)ฮ”t.e^{r(2 - i/365)}\, f\!\left(\tfrac{i}{365}\right)\Delta t.

Adding over all 365365 days and letting the time step shrink gives

โˆ‘i=1365er(2โˆ’i/365)โ€‰fโ€‰โฃ(i365)ฮ”tโ€…โ€Šโ‰ˆโ€…โ€Šโˆซ01er(2โˆ’t)โ€‰f(t)โ€‰dt.\sum_{i=1}^{365} e^{r(2 - i/365)}\, f\!\left(\tfrac{i}{365}\right)\Delta t \;\approx\; \int_0^1 e^{r(2-t)}\, f(t)\,dt.

Since er(2โˆ’t)=erโ€‰er(1โˆ’t)e^{r(2-t)} = e^{r}\,e^{r(1-t)}, this equals erโˆซ01er(1โˆ’t)f(t)โ€‰dte^{r}\int_0^1 e^{r(1-t)} f(t)\,dt: the amount owed at the end of the first year, grown for one more year.

Solved: 0 / 4