A Non-Integrable Function That Formulas Say Is Integrable
Why 1/x fails as a counterexample, and which two functions give a finite answer from the antiderivative formula while still not being integrable.

A student who has only seen Riemann integration as a computation will evaluate F(b) - F(a) for any antiderivative F they can find, and report a number. Ask whether the integral exists and they check whether the number came out finite. That works on every textbook exercise. It gives no way to see what 'not integrable' means.
The question was posed on Math StackExchange (Example of a function whose non-integrability can not be justified by computation). The asker wants a function f: [a,b] -> R that is not integrable, where a formula-based evaluation wrongly suggests a finite value. The asker's first attempt was 1/x on [0,1], and it did not do the job.
This article walks through why that attempt fails and two examples from the answers that do work. It also states which assumption of the fundamental theorem of calculus each example breaks, because that is what the students need to see.
Why 1/x is the wrong example
The student's computation was [log x]_0^1 = 0 - (-infinity) = +infinity. The asker found this unsatisfying as an argument, yet the area under 1/x on (0,1] really is unbounded. The instinct is right. The verdict is correct, and only the notation is sloppy.
1/x is undefined at 0 and unbounded near it, so it is not Riemann integrable on [0,1]. The expression 0 - (-infinity) is shorthand for the improper integral, the limit of -log(e) as e goes to 0 from above, which diverges to +infinity. The formula and the theory agree that no finite integral exists.
So 1/x cannot serve as a counterexample. The formula already says 'infinite', which is the same conclusion as 'not integrable'. What is needed is a function where the formula says 'finite' and the integral still does not exist.
An antiderivative that behaves at 0
The accepted answer (12 votes) offers D(x) = sin(1/x^3) - (3/x^3) cos(1/x^3). Its antiderivative is I(x) = x sin(1/x^3) + C. Differentiating by the product and chain rules confirms it: the sin term comes from differentiating x, and the -(3/x^3) cos term from differentiating the inner 1/x^3.
Near 0, |x sin(1/x^3)| <= |x|, so I tends to 0 and extends continuously by I(0) = 0. A student plugging in the endpoints on [0,1] gets sin(1) and nothing looks wrong.
But D is unbounded near 0, since the 3/x^3 factor multiplies a cosine that keeps returning to +-1. That rules out Riemann integrability. The answer adds that it is not Lebesgue integrable either, because any attempt at the area gives positive infinity minus negative infinity. This is a stronger example than 1/x, because the formula returns a finite, plausible number.
A primitive that blows up in the middle
The second answer (10 votes) defines f(x) = 2 - 1/(x-3)^2 for x != 3 and f(3) = 1 on [1,4]. The value at 3 is arbitrary and only makes f defined everywhere. The antiderivative formula gives:
[2x + 1/(x-3)] from 1 to 4 = (8 + 1) - (2 - 1/2) = 7.5The error is visible without any measure theory. The primitive 2x + 1/(x-3) is not defined at 3, and it heads to -infinity on the left of 3 and +infinity on the right. Evaluating at 1 and 4 steps over a pole the student never looked at.
The answer says f is not integrable in the Riemann, Lebesgue, Henstock-Kurzweil or Cauchy sense. It gives a contradiction argument for the Henstock-Kurzweil case. Define f_m = max(f, m), which is Riemann integrable. Monotonicity of the integral would force int f <= inf_m int f_m = -infinity, which is impossible for a finite value.
What the formula silently assumes
Both examples fail the same hypothesis. The fundamental theorem needs F to be continuous on the whole closed interval and to have F' = f there, with f integrable. Students check none of this and just substitute endpoints. A short checklist helps:
- Is
fbounded on[a,b]? If not, it is not Riemann integrable, whateverFdoes. - Is
Fdefined and continuous at every point of[a,b], including interior points such as3above? - Does
F' = fhold everywhere, or only away from a bad point?
In the first example I is continuous at 0 but I'(0) does not exist, since sin(1/h^3) has no limit as h goes to 0. In the second, F fails at the first question in the list that concerns it, because it is not even defined at 3. In both, the antiderivative formula holds almost everywhere and the integral still does not exist.
Where these examples do not fit
These are counterexamples to a procedure, not a teaching sequence. The first one requires students to accept that a derivative can be unbounded while its antiderivative stays tame, which is not obvious. Expect the question 'but the answer is finite, so why isn't it the integral?'. The honest reply is that the definition of the Riemann integral requires boundedness first, and the formula is only a shortcut that holds under hypotheses.
The second example is easier to show on a board. Its limit is that its non-integrability proof, as given in the answer, goes through Henstock-Kurzweil integration, which a class that has only met Riemann integrals will not know. For such a class, the argument that f is unbounded near 3 is the one to use.
Also separate two claims in your own wording: 'not Riemann integrable' and 'has no finite improper integral'. The answers show examples where those come apart, and mixing them is how students end up defending the wrong computation.
This article draws on Example of a function whose non-integrability can not be justified by computation and answers to it (1, 2), on the Stack Exchange network, licensed under CC BY-SA 4.0.
- #antiderivative
- #calculus
- #definite-integrals
- #real-analysis
- #riemann-integration
- #soft-question


Comments