MATH-100 · Lesson 5 of 5 · 56 min
The definite integral
The first four lessons were about rates: given a quantity, how fast is it changing? This lesson turns the question around. Given a rate, how much has accumulated? If you know a pump's flow rate over time, how much water has it moved? If you know a vehicle's velocity, how far has it gone? If you know the power a machine draws, how much energy has it used?
The tool for these questions is the definite integral. You will see how it arises from adding up many small pieces, how to compute it exactly with antiderivatives using the Fundamental Theorem of Calculus, and how to apply it to distance, energy, volume and averages. The theorem is the bridge between the two halves of calculus, and it is one of the great ideas of mathematics.
The accumulation problem
If a rate is constant, accumulation is just multiplication. A pump delivering a steady 2 L/s for 30 s moves \(2 \times 30 = 60\) L. On a graph of rate against time, that product is the area of a rectangle under the horizontal line at height 2.
Real rates change. A pump starts up, a vehicle accelerates, a heater cycles on and off. The idea is to split the time into many short intervals, treat the rate as nearly constant on each one, and add up the small products. On the graph, each product is a thin rectangle, and the total approximates the area under the rate curve.
So two questions turn out to be the same question: "how much has accumulated?" and "what is the area under the graph of the rate?" The definite integral answers both.
Riemann sums
To estimate the area under \(y = f(x)\) from \(x = a\) to \(x = b\):
- Split \([a, b]\) into \(n\) equal subintervals of width \(\Delta x = \dfrac{b - a}{n}\).
- In each subinterval, choose a sample point \(x_i^*\): the left end, the right end, or the midpoint.
- Build a rectangle of height \(f(x_i^*)\) and width \(\Delta x\), and add up the areas.
This total is called a Riemann sum. The Greek letter \(\Sigma\) (sigma) means "add up": the expression is read "the sum, for \(i\) from 1 to \(n\), of \(f(x_i^*)\Delta x\)."
Worked problem
Three Riemann sums
Estimate the area under \(y = x^2\) from 0 to 2 with \(n = 4\) rectangles, using left endpoints, right endpoints and midpoints.
Show solution
- \(\Delta x = (2 - 0)/4 = 0.5\). The subintervals are [0, 0.5], [0.5, 1], [1, 1.5] and [1.5, 2].
- Left endpoints 0, 0.5, 1, 1.5: \((0 + 0.25 + 1 + 2.25)(0.5) = 1.75\).
- Right endpoints 0.5, 1, 1.5, 2: \((0.25 + 1 + 2.25 + 4)(0.5) = 3.75\).
- Midpoints 0.25, 0.75, 1.25, 1.75: \((0.0625 + 0.5625 + 1.5625 + 3.0625)(0.5) = 2.625\).
Answer: Left 1.75, right 3.75, midpoint 2.625. The exact area is 8/3 ≈ 2.667
For an increasing function, left sums underestimate and right sums overestimate. The midpoint rule is usually much better than either for the same amount of work. With more rectangles, every version gets closer to the true value.
The definite integral
The definite integral is the limit of Riemann sums as the rectangles become infinitely thin:
The notation mirrors the sum. The integral sign \(\int\) is a stretched S for "sum", \(f(x)\) is the height, and \(dx\) is the infinitely thin width. The numbers \(a\) and \(b\) are the lower and upper limits of integration. For any continuous function the limit exists and does not depend on which sample points you choose.
Worked problem
An integral from the definition
Use right-endpoint sums and the formula \(\sum_{i=1}^n i^2 = \dfrac{n(n+1)(2n+1)}{6}\) to show that \(\int_0^2 x^2\,dx = \dfrac83\).
Show solution
- \(\Delta x = 2/n\) and the right endpoints are \(x_i = 2i/n\).
- \[\sum_{i=1}^{n}\left(\frac{2i}{n}\right)^2\frac{2}{n} = \frac{8}{n^3}\sum_{i=1}^{n} i^2 = \frac{8}{n^3}\cdot\frac{n(n+1)(2n+1)}{6}\]
- As \(n \to \infty\), \(\dfrac{n(n+1)(2n+1)}{n^3} \to 2\), so the sum approaches \(\dfrac{8 \times 2}{6} = \dfrac{8}{3}\).
Answer: 8/3, as expected. The Fundamental Theorem below gets this in one line
Signed area
When \(f(x)\) is negative, \(f(x_i^*)\Delta x\) is negative, so regions below the x-axis count as negative area. The definite integral gives the net signed area: area above the axis minus area below. This is exactly what you want physically. A negative velocity means moving backward, and integrating velocity should subtract that backward motion.
Properties of the definite integral
- Constants factor out and integrals of sums split: \(\int_a^b \big[cf(x) + g(x)\big]dx = c\int_a^b f(x)\,dx + \int_a^b g(x)\,dx\).
- Intervals join: \(\int_a^b f\,dx + \int_b^c f\,dx = \int_a^c f\,dx\).
- Reversing the limits changes the sign: \(\int_b^a f\,dx = -\int_a^b f\,dx\), and \(\int_a^a f\,dx = 0\).
- Comparison: if \(f(x) \le g(x)\) on \([a, b]\), then \(\int_a^b f\,dx \le \int_a^b g\,dx\).
Antiderivatives
Computing limits of sums every time would be impractical. The shortcut runs through antiderivatives. A function \(F\) is an antiderivative of \(f\) if \(F'(x) = f(x)\). For example, \(x^3\) is an antiderivative of \(3x^2\), and so are \(x^3 + 5\) and \(x^3 - 100\): adding a constant changes nothing in the derivative.
The family of all antiderivatives is the indefinite integral, written with a constant \(C\):
Every derivative rule from Lesson 3, read backward, gives an antiderivative:
- \(\int x^n\,dx = \dfrac{x^{n+1}}{n+1} + C\) for \(n \ne -1\), and \(\int \dfrac{1}{x}\,dx = \ln|x| + C\).
- \(\int e^{x}\,dx = e^{x} + C\), and \(\int e^{kx}\,dx = \dfrac{1}{k}e^{kx} + C\).
- \(\int \cos x\,dx = \sin x + C\) and \(\int \sin x\,dx = -\cos x + C\).
- \(\int \sec^2 x\,dx = \tan x + C\) and \(\int \dfrac{1}{1 + x^2}\,dx = \arctan x + C\).
Constants factor out and sums split, just as with derivatives. Products and compositions are harder; Calculus II is largely about techniques for them.
Initial value problems
If you know a rate and one value of the quantity, the constant \(C\) is no longer free. This is how motion is predicted from acceleration.
Worked problem
Motion from acceleration
A ball is thrown upward at 15 m/s from 2 m above the ground. Its acceleration is \(-9.81\) m/s². Find its height as a function of time, its maximum height, and when it lands.
Show solution
- Integrate acceleration: \(v(t) = -9.81t + C_1\). At \(t = 0\), \(v = 15\), so \(C_1 = 15\).
- Integrate velocity: \(s(t) = -4.905t^2 + 15t + C_2\). At \(t = 0\), \(s = 2\), so \(C_2 = 2\).
- Height: \(s(t) = 2 + 15t - 4.905t^2\) m.
- Maximum height when \(v = 0\): \(t = 15/9.81 \approx 1.53\) s, giving \(s \approx 13.47\) m.
- Landing when \(s = 0\): by the quadratic formula, \(t = \dfrac{15 + \sqrt{15^2 + 4(4.905)(2)}}{9.81} \approx 3.19\) s.
Answer: s(t) = 2 + 15t − 4.905t²; peak 13.47 m at 1.53 s; lands at 3.19 s
The Fundamental Theorem of Calculus
The Fundamental Theorem connects the area problem (integrals) to the rate problem (derivatives). It has two parts.
Part 1: accumulation functions
Define a function that measures the accumulated area from a fixed start \(a\) up to a variable end \(x\):
Part 1 says that if \(f\) is continuous, then \(A'(x) = f(x)\). The rate at which area accumulates equals the height of the curve at the moving edge. That is intuitive: when you push the right edge a little further, the area grows by a thin strip whose height is \(f(x)\).
Combined with the chain rule, it handles variable upper limits: \(\dfrac{d}{dx}\int_0^{x^2}\cos t\,dt = \cos(x^2)\cdot 2x\).
Part 2: evaluating integrals
Part 2 is the practical one. If \(F\) is any antiderivative of a continuous function \(f\), then
To find an area or an accumulated total, find any antiderivative, evaluate it at the two limits, and subtract. The constant \(C\) cancels, so you can always leave it out of definite integrals.
Worked problem
Evaluating definite integrals
Evaluate \(\int_0^2 3x^2\,dx\), \(\int_1^4 \sqrt{x}\,dx\) and \(\int_0^\pi \sin x\,dx\).
Show solution
- \(\int_0^2 3x^2\,dx = \big[x^3\big]_0^2 = 8 - 0 = 8\).
- \(\int_1^4 x^{1/2}\,dx = \left[\tfrac23 x^{3/2}\right]_1^4 = \tfrac23(8) - \tfrac23(1) = \tfrac{14}{3}\).
- \(\int_0^\pi \sin x\,dx = \big[-\cos x\big]_0^\pi = -(-1) - (-1) = 2\).
Answer: 8, 14/3 and 2
Look back at the example from the definition: the limit of sums gave \(\int_0^2 x^2\,dx = 8/3\). With the theorem it is just \(\big[\tfrac13x^3\big]_0^2 = \tfrac83\). The same answer, in one line.
In words, the theorem says that integrating a rate of change gives the total change: \(\int_a^b F'(x)\,dx = F(b) - F(a)\). Integrate a flow rate to get a volume, a velocity to get a displacement, a power to get an energy, a current to get a charge.
Substitution
Substitution reverses the chain rule, just as antiderivatives reverse the basic derivative rules. If the integrand contains a function \(u = g(x)\) together with its derivative \(g'(x)\), replace them by \(u\) and \(du = g'(x)\,dx\).
Worked problem
Indefinite substitution
Find \(\int 2x(x^2 + 1)^5\,dx\).
Show solution
- Let \(u = x^2 + 1\). Then \(du = 2x\,dx\), which is exactly the rest of the integrand.
- \(\int u^5\,du = \dfrac{u^6}{6} + C\).
- Substitute back: \(\dfrac{(x^2 + 1)^6}{6} + C\).
Answer: (x² + 1)⁶/6 + C. Differentiate to check: 6(x² + 1)⁵(2x)/6 = 2x(x² + 1)⁵
For a definite integral, change the limits to \(u\)-values as you substitute. Then you never need to substitute back.
Worked problem
Definite substitution
Evaluate \(\int_0^1 x e^{x^2}\,dx\).
Show solution
- Let \(u = x^2\), so \(du = 2x\,dx\) and \(x\,dx = \tfrac12 du\).
- Limits: when \(x = 0\), \(u = 0\); when \(x = 1\), \(u = 1\).
- \(\tfrac12\int_0^1 e^{u}\,du = \tfrac12\big[e^{u}\big]_0^1 = \tfrac12(e - 1)\).
Answer: (e − 1)/2 ≈ 0.859
Calculus II develops substitution further, along with integration by parts and other techniques.
Applications
Net change versus total distance
Integrating velocity gives displacement: where the object ends up relative to where it started. To find the total distance traveled, integrate the speed \(|v(t)|\). In practice, split the interval where \(v\) changes sign and add the sizes of the pieces.
Worked problem
Displacement and distance
A slider moves with velocity \(v(t) = t^2 - 4t + 3\) m/s for \(0 \le t \le 3\) s. Find its displacement and the total distance it travels.
Show solution
- Antiderivative: \(S(t) = \tfrac13t^3 - 2t^2 + 3t\).
- Displacement: \(S(3) - S(0) = (9 - 18 + 9) - 0 = 0\) m.
- Since \(v = (t - 1)(t - 3)\), it is positive on [0, 1] and negative on [1, 3].
- Forward: \(S(1) - S(0) = \tfrac13 - 2 + 3 = \tfrac43\) m. Backward: \(S(3) - S(1) = 0 - \tfrac43 = -\tfrac43\) m.
- Total distance: \(\tfrac43 + \tfrac43 = \tfrac83\) m.
Answer: Displacement 0 m; total distance 8/3 ≈ 2.67 m
Energy from power, volume from flow
Worked problem
Energy used by a machine
During a 2-hour run, a machine's power draw rises as \(P(t) = 5 + 3t\) kW (t in hours). How much energy does it use?
Show solution
- \(E = \int_0^2 (5 + 3t)\,dt = \left[5t + \tfrac32t^2\right]_0^2 = 10 + 6\).
Answer: 16 kWh. Hours times kilowatts gives kilowatt-hours, the unit on an electricity bill
Worked problem
Volume from a flow rate
A pump starts up so that its flow rate is \(Q(t) = 0.3\left(1 - e^{-t/5}\right)\) m³/s. How much water does it deliver in the first 10 s?
Show solution
- \(V = \int_0^{10} 0.3\left(1 - e^{-t/5}\right)dt = 0.3\left[t + 5e^{-t/5}\right]_0^{10}\).
- \(= 0.3\left[(10 + 5e^{-2}) - (0 + 5)\right] = 0.3(5 + 0.677) \approx 1.70\) m³.
Answer: About 1.70 m³. At full speed for 10 s it would have delivered 3 m³; the start-up costs 1.3 m³
Average value
The average value of a function on \([a, b]\) is the height of the rectangle with the same area:
Worked problem
Average daytime temperature
The air temperature at a site follows \(T(t) = 20 + 10\sin\left(\dfrac{\pi t}{12}\right)\) °C, with \(t\) in hours after 6 a.m. Find the average temperature over the 12 hours from 6 a.m. to 6 p.m.
Show solution
- \(T_{\text{avg}} = \dfrac{1}{12}\int_0^{12}\left[20 + 10\sin\left(\dfrac{\pi t}{12}\right)\right]dt\).
- The integral of the sine part is \(10 \cdot \dfrac{12}{\pi}\left[-\cos\dfrac{\pi t}{12}\right]_0^{12} = \dfrac{120}{\pi}(1 + 1) = \dfrac{240}{\pi}\).
- \(T_{\text{avg}} = \dfrac{1}{12}\left(240 + \dfrac{240}{\pi}\right) = 20 + \dfrac{20}{\pi} \approx 26.4\) °C.
Answer: About 26.4 °C, well below the peak of 30 °C
Average values matter in design. Electrical equipment is sized for average (RMS) current, HVAC systems for average and peak loads, and fatigue calculations for average and alternating stresses.
Work and fluid force
Two more applications show the same idea at work: slice the problem into thin pieces, write the small contribution of one piece, and integrate. Both appear constantly in mechanical and civil engineering.
Work done by a varying force
If a constant force \(F\) moves an object a distance \(d\), the work done is \(W = Fd\). If the force changes with position, each short step \(dx\) needs work \(F(x)\,dx\), and the total is
For a spring, Hooke's law gives \(F = kx\), so stretching from 0 to \(x\) takes \(W = \int_0^x kx\,dx = \tfrac12 kx^2\). That is the elastic energy stored in the spring, the same formula you will meet in mechanics.
Worked problem
Pumping out a tank
A vertical cylindrical tank 2 m tall with a 1 m radius is full of water (density 1000 kg/m³). The water is pumped out through a pipe 1 m above the top of the tank. How much work does this take?
Show solution
- Slice the water into thin horizontal disks. A disk at height \(y\) above the bottom, of thickness \(dy\), has volume \(\pi(1)^2\,dy\) and weight \(1000 \times 9.81 \times \pi\,dy\) newtons.
- It must be lifted to the outlet at height 3 m, a distance of \((3 - y)\) meters.
- \[W = \int_0^2 9810\pi\,(3 - y)\,dy = 9810\pi\left[3y - \tfrac12y^2\right]_0^2 = 9810\pi(6 - 2)\]
Answer: W = 39 240π ≈ 123 000 J, or about 123 kJ. A 1 kW pump at 100% efficiency would need about two minutes
Notice that each slice needs a different lift. That is why the problem needs an integral rather than a single multiplication: the water at the bottom has further to go than the water at the top.
Force of water on a gate
Water pressure increases with depth: at depth \(y\) it is \(p = \rho g y\). A vertical gate or wall therefore feels more force near the bottom than near the top. Slice the gate into horizontal strips of height \(dy\): a strip of width \(w\) at depth \(y\) has area \(w\,dy\) and feels a force of \(\rho g y\,w\,dy\).
Worked problem
Hydrostatic force on a sluice gate
A vertical rectangular sluice gate is 2 m wide and holds back water 3 m deep, from the surface to the bottom of the gate. Find the total force of the water on it.
Show solution
- \[F = \int_0^3 (1000)(9.81)\,y\,(2)\,dy = 19\,620\left[\tfrac12y^2\right]_0^3 = 19\,620 \times 4.5\]
Answer: About 88 300 N, or 88.3 kN. The resultant acts two-thirds of the way down, where the gate's supports must resist it
The same method gives the force on dam faces, tank walls, ship hulls and retaining walls holding back soil, which you will meet in Fluid Mechanics and Geotechnical courses.
Numerical integration with data
Engineers often have measurements, not formulas. With values at equal spacing \(h\), the trapezoid rule joins neighboring points with straight lines and adds the trapezoid areas:
Worked problem
Volume from logged flow data
A flow meter records 0, 0.8, 1.4, 1.7, 1.8 and 1.6 m³/min at two-minute intervals. Estimate the volume delivered over the 10 minutes.
Show solution
- \(h = 2\) min. Interior values: \(0.8 + 1.4 + 1.7 + 1.8 = 5.7\). End values: \(\tfrac12(0 + 1.6) = 0.8\).
- Volume \(\approx 2(5.7 + 0.8) = 13.0\) m³.
Answer: About 13 m³
The midpoint rule, the trapezoid rule and Simpson's rule (which fits parabolas instead of lines) are the basis of the numerical integration built into spreadsheets, data loggers and simulation software. ENCM-100 shows how to code the trapezoid rule in a few lines of Python.
Common mistakes
MistakeForgetting the + C on an indefinite integral.
InsteadEvery indefinite integral is a family of functions. Write + C, and use any known value (an initial condition) to find it.
MistakeIntegrating a power by multiplying by the exponent, as in derivatives: ∫x³ dx = 3x².
InsteadRaise the power by one and divide by the new power: x⁴/4 + C.
MistakeUsing ∫xⁿ dx = xⁿ⁺¹/(n + 1) for n = −1.
InsteadThat would divide by zero. ∫(1/x) dx = ln|x| + C.
MistakeTaking the integral of velocity as the distance traveled when the velocity changes sign.
InsteadThe integral of velocity is displacement. For total distance, split where v = 0 and add the absolute values.
MistakeIn a definite substitution, changing to u but keeping the original x-limits.
InsteadConvert the limits to u-values, or substitute back to x before evaluating. Never mix the two.
MistakeSubtracting in the wrong order: F(a) − F(b).
InsteadIt is always upper limit minus lower limit: F(b) − F(a).
Summary and key terms
- Accumulated change is the area under the graph of the rate. Riemann sums approximate it with rectangles.
- The definite integral ∫ₐᵇ f(x) dx is the limit of Riemann sums. It gives net signed area: regions below the axis count as negative.
- An antiderivative F satisfies F′ = f. The indefinite integral is the family F(x) + C.
- Fundamental Theorem, Part 1: d/dx ∫ₐˣ f(t) dt = f(x). Part 2: ∫ₐᵇ f(x) dx = F(b) − F(a).
- Integrating a rate gives the total change: flow to volume, velocity to displacement, power to energy.
- Substitution reverses the chain rule. In definite integrals, change the limits along with the variable.
- Average value = (1/(b − a)) ∫ₐᵇ f(x) dx. With measured data, use the trapezoid or midpoint rule.
- Riemann sum
- A sum of rectangle areas Σ f(xᵢ*) Δx that approximates an integral.
- Definite integral
- The limit of Riemann sums; a number giving net accumulated change.
- Limits of integration
- The endpoints a and b in ∫ₐᵇ.
- Antiderivative
- A function F with F′ = f.
- Indefinite integral
- The family of all antiderivatives, F(x) + C.
- Fundamental Theorem of Calculus
- The result linking integrals and derivatives: integration and differentiation undo each other.
- Displacement
- Net change in position, the integral of velocity.
- Average value
- The constant height with the same integral over the interval.
- Trapezoid rule
- A numerical method that approximates an integral with trapezoids between data points.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Estimate \(\int_0^2 x^3\,dx\) with the midpoint rule and four subintervals. Compare with the exact value.
Show answer
Δx = 0.5, midpoints 0.25, 0.75, 1.25, 1.75. Sum of cubes = 0.015625 + 0.421875 + 1.953125 + 5.359375 = 7.75. Times 0.5 gives 3.875. Exact: [x⁴/4] from 0 to 2 = 4.
Find \(\int (6x^2 - 4x + 3)\,dx\).
Show answer
2x³ − 2x² + 3x + C.
Find \(\int \left(\dfrac{2}{x} + e^{3x} - \cos x\right)dx\).
Show answer
2 ln|x| + (1/3)e^(3x) − sin x + C.
Evaluate \(\int_1^3 (x^2 + 1)\,dx\).
Show answer
[x³/3 + x] from 1 to 3 = (9 + 3) − (1/3 + 1) = 12 − 4/3 = 32/3 ≈ 10.67.
Evaluate \(\int_0^{\pi/2} \cos x\,dx\) and explain the answer as an area.
Show answer
[sin x] from 0 to π/2 = 1. The area under one quarter-wave of the cosine curve is exactly 1.
Find \(\dfrac{d}{dx}\int_2^{x} \sqrt{1 + t^3}\,dt\) and \(\dfrac{d}{dx}\int_0^{3x} e^{-t^2}\,dt\).
Show answer
By Part 1: √(1 + x³). With the chain rule: e^(−9x²) · 3 = 3e^(−9x²).
Evaluate \(\int_0^2 x(x^2 + 1)^3\,dx\) using substitution.
Show answer
u = x² + 1, du = 2x dx; limits 1 to 5. ½∫ from 1 to 5 of u³ du = ½[u⁴/4] = (625 − 1)/8 = 78.
A car's velocity is \(v(t) = 20 - 4t\) m/s for \(0 \le t \le 8\) s. Find its displacement and the total distance traveled.
Show answer
v = 0 at t = 5. Forward: ∫ from 0 to 5 = [20t − 2t²] = 50 m. Backward: ∫ from 5 to 8 = (160 − 128) − 50 = −18 m. Displacement 32 m; total distance 68 m.
A heater's power is \(P(t) = 2 + 0.5t\) kW for \(0 \le t \le 4\) h. Find the energy used and the average power.
Show answer
E = [2t + 0.25t²] from 0 to 4 = 8 + 4 = 12 kWh. Average power = 12/4 = 3 kW.
How much work does it take to stretch a spring with \(k = 800\) N/m from 0.10 m to 0.25 m beyond its natural length?
Show answer
W = ∫ from 0.10 to 0.25 of 800x dx = 400(0.0625 − 0.01) = 21 J.
A stone falls from rest with \(a = -9.81\) m/s² from a height of 45 m. Find its height as a function of time and when it hits the ground.
Show answer
v = −9.81t, s = 45 − 4.905t². s = 0 when t² = 45/4.905, so t ≈ 3.03 s.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.