18

Day 18

Riemann Sums And Integration


The Definition of the Definite Integral: From Riemann Sums to Signed Area

The definite integral abf(x)dx\int_a^b f(x) \, dx measures the signed area under a curve. It is defined as the limit of Riemann sums — rectangles that get thinner and thinner. This foundation is what everything else in integration is built on.

Core Theorem
The definite integral is the limit of Riemann sums:
abf(x)dx=limni=1nf(xi)Δx\int_a^b f(x) \, dx = \lim_{n \to \infty} \sum_{i=1}^{n} f(x_i^*) \, \Delta x
where Δx=ban\Delta x = \frac{b-a}{n} and xix_i^* is any sample point in the ii-th subinterval. When this limit exists, it equals the signed area between the graph of ff and the xx-axis from x=ax=a to x=bx=b.
Step-by-Step SOP
  1. 1

    Partition the interval

    Split [a,b][a, b] into nn subintervals, each of width Δx=ban\Delta x = \frac{b-a}{n}.
  2. 2

    Choose sample points

    Pick xix_i^* in each subinterval — left endpoint, right endpoint, or midpoint.
  3. 3

    Evaluate the function

    Compute the height f(xi)f(x_i^*) for each subinterval.
  4. 4

    Sum the rectangles

    Add them up: i=1nf(xi)Δx\sum_{i=1}^{n} f(x_i^*)\,\Delta x.
  5. 5

    Take the limit

    The definite integral is limni=1nf(xi)Δx\lim_{n \to \infty} \sum_{i=1}^{n} f(x_i^*)\,\Delta x, when the limit exists.

Practice Exercises


Example 01Medium
Approximate 02x2dx\int_0^2 x^2 \, dx using a right-endpoint Riemann sum with n=4n=4 subintervals.
NEED A HINT?
Divide [0,2][0, 2] into 4 equal pieces, so Δx=0.5\Delta x = 0.5. Heights are f(0.5),f(1),f(1.5),f(2)f(0.5), f(1), f(1.5), f(2).
SHOW DETAILED EXPLANATION

Set up the partition

Δx=204=0.5\Delta x = \frac{2-0}{4} = 0.5. Right endpoints: x1=0.5, x2=1, x3=1.5, x4=2x_1^* = 0.5,\ x_2^* = 1,\ x_3^* = 1.5,\ x_4^* = 2.

Evaluate f at the right endpoints

f(0.5)=0.25,f(1)=1,f(1.5)=2.25,f(2)=4f(0.5) = 0.25,\quad f(1) = 1,\quad f(1.5) = 2.25,\quad f(2) = 4.

Add up the rectangles

R4=(0.25+1+2.25+4)(0.5)=(7.5)(0.5)=3.75R_4 = (0.25 + 1 + 2.25 + 4)(0.5) = (7.5)(0.5) = 3.75. The exact value is 832.67\frac{8}{3} \approx 2.67, so a right sum overestimates here (the function is increasing).
Example 02Easy
Use geometry to evaluate 03(x+1)dx\int_0^3 (x+1) \, dx exactly.
NEED A HINT?
f(x)=x+1f(x) = x+1 is positive on [0,3][0, 3], so the integral is the area of a trapezoid under the line.
SHOW DETAILED EXPLANATION

Identify the region

The graph of y=x+1y = x + 1 over [0,3][0, 3] bounds a trapezoid with parallel sides f(0)=1f(0) = 1 and f(3)=4f(3) = 4, and width 33.

Apply the trapezoid area formula

Area=12(b1+b2)h=12(1+4)(3)=152=7.5\text{Area} = \frac{1}{2}(b_1 + b_2)\,h = \frac{1}{2}(1 + 4)(3) = \frac{15}{2} = 7.5.

Confirm with an antiderivative

03(x+1)dx=[x22+x]03=(92+3)0=7.5\int_0^3 (x+1)\,dx = \left[\frac{x^2}{2} + x\right]_0^3 = \left(\frac{9}{2} + 3\right) - 0 = 7.5. ✓
Example 03Hard
Write a Riemann sum in summation notation for 15xdx\int_1^5 \sqrt{x} \, dx using nn subintervals and right endpoints.
NEED A HINT?
Δx=51n=4n\Delta x = \frac{5-1}{n} = \frac{4}{n}, and the right endpoint of the ii-th subinterval is xi=1+iΔxx_i^* = 1 + i\,\Delta x.
SHOW DETAILED EXPLANATION

Define the width and sample points

Δx=4n\Delta x = \frac{4}{n} and xi=1+4inx_i^* = 1 + \frac{4i}{n}.

Assemble the sum

Rn=i=1n1+4in4nR_n = \sum_{i=1}^{n} \sqrt{\,1 + \frac{4i}{n}\,}\cdot \frac{4}{n}.

State the limit

As nn \to \infty, Rn15xdx=23(53/21)14.37R_n \to \int_1^5 \sqrt{x}\,dx = \frac{2}{3}\left(5^{3/2} - 1\right) \approx 14.37.
Common Pitfalls
  • Left vs. right vs. midpointAll three choices of sample point converge to the same integral as nn \to \infty, but for a fixed nn they differ. For an increasing function, a left sum underestimates and a right sum overestimates; the reverse holds for a decreasing function.
  • Signed area, not total areaWhere f(x)<0f(x) < 0, that region contributes negatively. For example 11xdx=0\int_{-1}^{1} x \, dx = 0 because the area below the axis on [1,0][-1, 0] cancels the area above it on [0,1][0, 1].

Properties of the Definite Integral: Linearity, Additivity, and Order

Just as derivatives have a sum rule and a constant-multiple rule, integrals have algebraic properties that let you break a hard integral into easy pieces or combine known results.

Core Theorem
For integrable functions f,gf, g and constants c,a,bc, a, b:
1. Sum rule:
ab[f(x)+g(x)]dx=abf(x)dx+abg(x)dx\int_a^b [f(x) + g(x)] \, dx = \int_a^b f(x)\,dx + \int_a^b g(x)\,dx
2. Constant multiple:
abcf(x)dx=cabf(x)dx\int_a^b c\,f(x)\,dx = c \int_a^b f(x)\,dx
3. Additivity over intervals:
acf(x)dx+cbf(x)dx=abf(x)dx\int_a^c f(x)\,dx + \int_c^b f(x)\,dx = \int_a^b f(x)\,dx
4. Reversing the limits:
abf(x)dx=baf(x)dx\int_a^b f(x)\,dx = -\int_b^a f(x)\,dx
5. Zero width:
aaf(x)dx=0\int_a^a f(x)\,dx = 0

Practice Exercises


Example 01Easy
Given 02f(x)dx=5\int_0^2 f(x)\,dx = 5 and 02g(x)dx=3\int_0^2 g(x)\,dx = 3, find 02[2f(x)g(x)]dx\int_0^2 [2f(x) - g(x)]\,dx.
NEED A HINT?
Use the constant-multiple rule and the sum rule.
SHOW DETAILED EXPLANATION

Split using linearity

02[2f(x)g(x)]dx=202f(x)dx02g(x)dx\int_0^2 [2f(x) - g(x)]\,dx = 2\int_0^2 f(x)\,dx - \int_0^2 g(x)\,dx.

Substitute the given values

=2(5)3=7= 2(5) - 3 = 7.
Example 02Medium
Given 03h(x)dx=8\int_0^3 h(x)\,dx = 8 and 53h(x)dx=2\int_5^3 h(x)\,dx = 2, find 05h(x)dx\int_0^5 h(x)\,dx.
NEED A HINT?
53h(x)dx\int_5^3 h(x)\,dx has its limits reversed relative to 35h(x)dx\int_3^5 h(x)\,dx.
SHOW DETAILED EXPLANATION

Fix the reversed limits

53h(x)dx=35h(x)dx=2    35h(x)dx=2\int_5^3 h(x)\,dx = -\int_3^5 h(x)\,dx = 2 \implies \int_3^5 h(x)\,dx = -2.

Combine with additivity

05h(x)dx=03h(x)dx+35h(x)dx=8+(2)=6\int_0^5 h(x)\,dx = \int_0^3 h(x)\,dx + \int_3^5 h(x)\,dx = 8 + (-2) = 6.
Gary Chang

Gary Chang

Calculus Educator

5+ Years of Calculus Teaching Experience | AP Calculus Specialist. Dedicated to helping students master calculus through step-by-step logic and clear visualizations.