---
title: "The Riemann Integral and When a Function Is Integrable"
description: "Define the integral by upper and lower sums and call a function integrable when the two meet. Continuous functions qualify; a function that is discontinuous everywhere need not."
canonical: https://lightmysky.com/learn/mathematics/the-riemann-integral-and-when-a-function-is-integrable-mt_Ahl2MYIA4N
source: https://lightmysky.com/learn/mathematics/the-riemann-integral-and-when-a-function-is-integrable-mt_Ahl2MYIA4N.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# The Riemann Integral and When a Function Is Integrable

Define the integral by upper and lower sums and call a function integrable when the two meet. Continuous functions qualify; a function that is discontinuous everywhere need not.

Subject: Mathematics · Area: Calculus & Analysis · Ages 20 to 21
Page: https://lightmysky.com/learn/mathematics/the-riemann-integral-and-when-a-function-is-integrable-mt_Ahl2MYIA4N

## Ready when they can

- Compute upper and lower sums for a partition and compare them
- State the criterion for integrability in terms of refinements
- Give a bounded function that is not Riemann integrable

## Lesson: Trapping area from both sides

On each piece of a partition, take the infimum of f for the lower sum and the supremum for the upper sum, multiply each by the piece's width, and add. For an increasing function these values sit at the left and right endpoints. For f(x) = x on [0, 2] with partition {0, 1, 2}, the lower sum is 0 times 1 plus 1 times 1, which is 1, and the upper sum is 1 times 1 plus 2 times 1, which is 3. The exact integral, 2, lies between them.

*(drawing: For f(x) = x on [0, 2] with pieces of width 1, the lower sum 1 and the upper sum 3 trap the exact area 2.)*

Refinement can never lower the lower sum or raise the upper sum. A bounded function is Riemann integrable when, for every epsilon greater than 0, some partition makes the upper sum minus the lower sum less than epsilon. A continuous function on a closed interval is uniformly continuous, so narrow pieces make the gap small. Continuity is not necessary: at a single jump, only pieces containing the jump keep a gap, and narrowing them shrinks it.

**Example.** The Dirichlet function equals 1 on rationals and 0 on irrationals. On [0, 2], every subinterval contains both kinds of points, so each supremum is 1 and each infimum is 0. Upper sums stay at 2 and lower sums stay at 0 for every partition. The gap never closes, so the function is not Riemann integrable there.

**Recap.** Lower sums rise, upper sums fall, and integrability means refinements can make their gap as small as any positive number.

*Lesson, questions and flashcards are original text written for this dataset.*

## Practice

18 questions on this page, each with its working shown.

## Needs first

- [Differentiability and the Theorems Behind the Rules](https://lightmysky.com/learn/mathematics/differentiability-and-the-theorems-behind-the-rules-mt_1xLEeoA69z)

## Optional connections

- [Riemann Sums and the Definite Integral as a Limit](https://lightmysky.com/learn/mathematics/riemann-sums-and-the-definite-integral-as-a-limit-mt_pwa2SRU6P9)

## Opens up

- [Sigma-Algebras and Measurable Sets](https://lightmysky.com/learn/mathematics/sigma-algebras-and-measurable-sets-mt_cpvegazufk)
- [Pointwise and Uniform Convergence](https://lightmysky.com/learn/mathematics/pointwise-and-uniform-convergence-mt_iAGk1ML5MA)
