An integral adds many small pieces. If a velocity tells how position changes at each moment, an integral accumulates velocity into displacement. If marginal cost tells how cost changes per item, an integral accumulates marginal cost into total cost change.
Learning objectives
After this lesson you should be able to:
interpret definite integrals as accumulated change;
distinguish signed area from total geometric area;
approximate area with left, right, and midpoint Riemann sums;
distinguish indefinite and definite integrals;
compute basic antiderivatives;
use the Fundamental Theorem of Calculus in simple cases;
interpret integral units;
use edumath helpers and SymPy to compute and approximate integrals.
Integral roadmap
When you see an integral, first ask what kind it is.
Definite integral \(\int_a^b f(x)\,dx\) : compute accumulated signed area on an interval.
Indefinite integral \(\int f(x)\,dx\) : find a family of antiderivatives.
Riemann sum : approximate a definite integral with rectangles.
Application : identify rate units and accumulated units.
Accumulation from small pieces
Suppose water flows into a tank at rate \(r(t)\) liters per minute. Over a very small time interval \(\Delta t\) , the amount added is approximately
\[
r(t)\Delta t.
\]
An integral adds many such pieces:
\[
\int_a^b r(t)\,dt.
\]
The result is measured in liters because
\[
\frac{\text{liters}}{\text{minute}}\cdot \text{minutes}=\text{liters}.
\]
Signed area
A definite integral
\[
\int_a^b f(x)\,dx
\]
can be interpreted as signed area under the graph.
Area above the x-axis counts positive.
Area below the x-axis counts negative.
If positive and negative regions cancel, the integral may be zero even though there is visible geometric area.
Displacement from velocity uses signed area. Total distance uses area under speed, which is \(|v(t)|\) . Always read the question carefully.
Riemann sums
A Riemann sum approximates area with rectangles.
Riemann-sum workflow
Split \([a,b]\) into \(n\) equal subintervals.
Compute the width: \[
\Delta x=\frac{b-a}{n}.
\]
Choose sample points: left endpoint, right endpoint, or midpoint.
Evaluate the function at each sample point to get rectangle heights.
Multiply height by width.
Add all rectangle areas.
Walkthrough: midpoint Riemann sum
Approximate
\[
\int_0^1 x^2\,dx
\]
with 4 midpoint rectangles.
Compute width. \[
\Delta x=\frac{1-0}{4}=\frac14.
\]
List intervals and midpoints.
\([0,1/4]\)
\(1/8\)
\(1/64\)
\(1/256\)
\([1/4,1/2]\)
\(3/8\)
\(9/64\)
\(9/256\)
\([1/2,3/4]\)
\(5/8\)
\(25/64\)
\(25/256\)
\([3/4,1]\)
\(7/8\)
\(49/64\)
\(49/256\)
Add areas. \[
\frac{1+9+25+49}{256}=\frac{84}{256}=0.328125.
\]
Interpret. The exact integral is \(1/3\approx0.3333\) , so the midpoint estimate is close.
Antiderivatives and indefinite integrals
An antiderivative of \(f(x)\) is a function whose derivative is \(f(x)\) .
For example,
\[
\int 4x^3\,dx=x^4+C.
\]
Why + C? Because \(x^4\) , \(x^4+7\) , and \(x^4-100\) all have derivative \(4x^3\) .
Walkthrough: antiderivative
Find
\[
\int (3x^2-2)\,dx.
\]
Split terms. Integrate \(3x^2\) and \(-2\) separately.
Reverse the power rule. Since \(d(x^3)/dx=3x^2\) , an antiderivative of \(3x^2\) is \(x^3\) .
Integrate the constant. An antiderivative of \(-2\) is \(-2x\) .
Add the constant of integration. \[
\int(3x^2-2)\,dx=x^3-2x+C.
\]
Check. Differentiate \(x^3-2x+C\) to get \(3x^2-2\) .
Fundamental Theorem of Calculus
If \(F'(x)=f(x)\) , then
\[
\int_a^b f(x)\,dx=F(b)-F(a).
\]
Walkthrough: definite integral
Compute
\[
\int_0^3 2x\,dx.
\]
Find an antiderivative. \[
F(x)=x^2.
\]
Evaluate at the upper bound. \[
F(3)=9.
\]
Evaluate at the lower bound. \[
F(0)=0.
\]
Subtract. \[
F(3)-F(0)=9-0=9.
\]
Interpret. The accumulated signed area under \(2x\) from 0 to 3 is 9.
Use + C for indefinite integrals. Do not add + C to a definite integral answer after evaluating bounds.
Mixed practice
What is an antiderivative of \(4x^3\) ?
Compute \(\int_0^5 1\,dx\) .
Compute \(\int_0^3 2x\,dx\) .
What does the integral of velocity over time represent?
Why can signed area be negative?
Approximate \(\int_0^1 x^2\,dx\) using 2 midpoint rectangles.
If a rate is dollars per month and you integrate over months, what units result?
\(x^4+C\) .
The antiderivative of 1 is \(x\) , so \(5-0=5\) .
\(9\) .
Displacement; integrating speed gives total distance.
Graph regions below the x-axis count negatively.
Midpoints are \(1/4\) and \(3/4\) , width is \(1/2\) , so the estimate is \((1/16)(1/2)+(9/16)(1/2)=10/32=0.3125\) .
Dollars.
Using this lesson with edumath and SymPy
Use edumath to compute common integral quantities and to build tables that show every rectangle in a Riemann sum.
from edumath.calculus import antiderivative, definite_integral, midpoint_riemann_sum
antiderivative("3*x**2" )
definite_integral("2*x" , 0 , 3 )
midpoint_riemann_sum("x**2" , 0 , 1 , 10 )
from edumath.calculus import left_riemann_sum, right_riemann_sum, trapezoid_rule
left_riemann_sum("x" , 0 , 1 , 10 ), right_riemann_sum("x" , 0 , 1 , 10 ), trapezoid_rule("x" , 0 , 1 , 10 )
(0.45000000000000007, 0.55, 0.5)
from edumath.calculus import riemann_sum_table
rows = riemann_sum_table("x**2" , 0 , 1 , 4 , method= "midpoint" )
[(row.index, row.sample, row.height, row.area) for row in rows]
[(1, 0.125, 0.015625, 0.00390625),
(2, 0.375, 0.140625, 0.03515625),
(3, 0.625, 0.390625, 0.09765625),
(4, 0.875, 0.765625, 0.19140625)]
import sympy as sp
x = sp.symbols("x" )
F = sp.integrate(3 * x** 2 - 2 , x)
sp.diff(F, x)
\(\displaystyle 3 x^{2} - 2\)