Dealing with Points of Discontinuity and Non-Differentiability
In the previous section, we proved the First Fundamental Theorem of Calculus under a clean, friendly condition: the function f(x) is continuous on [a,b], and its antiderivative F(x) satisfies F′(x)=f(x) at every point of [a,b].
In practice, however, many important functions in mathematics have sharp corners (points of non-differentiability, like ∣x−1∣) or finite jumps (points of discontinuity, like the greatest integer function ⌊x⌋ or piecewise-defined functions). Even more surprisingly, sometimes f(x) itself is completely smooth, yet the antiderivative formula F(x) we find has a hidden jump inside [a,b].
How do we evaluate definite integrals safely when a "trouble spot" x=c lies inside our interval [a,b]?
1. Stepping Around a Trouble Spot: Leaving a Small Gap Around the Point§
Suppose a bounded function f(x) is continuous everywhere on [a,b]except at an interior point x=c (where a<c<b). Because f(x) is not continuous at x=c, we cannot directly apply the Fundamental Theorem across the whole interval [a,b] in one step.
Instead, we step around the point x=c by leaving a tiny gap of width 2h around it, from c−h to c+h (where h>0 is a small positive number):
Left Piece [a,c−h]: On this closed interval, we stop just before x=c. Here, f(x) has no breaks at all—it is completely continuous!
Right Piece [c+h,b]: On this closed interval, we start just after x=c. Again, f(x) is completely continuous here!
Middle Strip [c−h,c+h]: What happens to the tiny vertical strip between c−h and c+h? Because f(x) is bounded (say ∣f(x)∣≤M), the area of this thin strip is at most width×height=2h⋅M. As we shrink h→0+, the width 2h shrinks to 0, so the area of this middle strip vanishes completely:
h→0+lim(2h⋅M)=0
[!TIP]
Why a Single Point Has Zero Area:
A single point x=c on the x-axis has a width of 0. Changing the value of f(c) at a single point—or even having a finite jump there—only changes a single vertical line segment of width 0, which adds zero area to the integral.
Therefore, the total definite integral from a to b is simply the limit of the sum of the two safe pieces as h→0+:
Now, because f(x) is continuous on [a,c−h] and on [c+h,b], we can apply the First Fundamental Theorem of Calculus separately on each piece! If F(x) is an antiderivative on each piece, then:
Taking the limit as h→0+, recall from our chapter on Limits and Continuity that limh→0+F(c−h) is the left-hand limitF(c−), and limh→0+F(c+h) is the right-hand limitF(c+). This gives our master formula:
[!IMPORTANT]
Fundamental Theorem Across a Trouble Spot x=c:
If x=c∈(a,b) is a point where f(x) or its antiderivative F(x) is discontinuous or changes its formula, then:
If there are several trouble spots c1<c2<⋯<ck inside (a,b), we simply split the interval at every one of them: [a,c1], [c1,c2], …, [ck,b], and evaluate each sub-interval using the formula valid on its interior.
2. Three Situations Where We Must Split the Interval§
Let us see what our master formula [F(c−)−F(a)]+[F(b)−F(c+)] tells us in the three main situations we encounter when evaluating definite integrals.
Situation 1: Functions with Sharp Corners or Piecewise Formulas (Modulus Functions)§
What if our antiderivative F(x) is continuous at x=c, so that F(c−)=F(c+)=F(c), even though F′(c) does not exist (a sharp corner)?
Look at what happens in our master formula when F(c−)=F(c+)=F(c):
∫abf(x)dx=[F(c)−F(a)]+[F(b)−F(c)]=F(b)−F(a)
The intermediate values F(c) and −F(c) cancel out!
In practice, when the integrand f(x) itself has a sharp corner (like ∣x−c∣) or is defined by different formulas on the left and right of x=c:
f(x)={f1(x),f2(x),a≤x<cc≤x≤b
we have two different antiderivative formulas: F1(x) on [a,c) and F2(x) on (c,b]. Splitting at x=c gives:
The modulus function ∣x−1∣ is continuous everywhere on [0,3], but it has a sharp corner (point of non-differentiability) at x=1, where x−1 changes sign:
∣x−1∣={−(x−1)=1−x,x−1,if 0≤x<1if 1≤x≤3
We split the interval [0,3] at the corner point x=1:
∫03∣x−1∣dx=∫01(1−x)dx+∫13(x−1)dx
Now each piece is a simple polynomial that is smooth on its sub-interval:
Notice that because F1(x)=x is continuous up to x=1 and F2(x)=x2 is continuous down to x=1, we can simply write:
∫02f(x)dx=∫011dx+∫122xdx=[x]01+[x2]12=1+3=4
Situation 2: Step Functions — Greatest Integer, Fractional Part, and Signum Functions§
Step functions such as the Greatest Integer Function⌊x⌋ (often written [x]) jump at every integer point.
The Graphical Rectangle Method for Greatest Integer Integrals
Whenever the entire integrand is a greatest integer function ⌊g(x)⌋, the graph of y=⌊g(x)⌋ is simply a collection of horizontal steps! You do not even need to find antiderivatives—you can write down the value of the definite integral immediately by drawing the graph and summing the areas of the rectangles:
Sketch the inner curve y=g(x) over the interval [a,b] to see its range (its minimum and maximum values) and where it increases or decreases.
Draw horizontal lines at every integer height y=k that lies within the range of g(x).
Project the intersection points down to the x-axis. If g(x) hits an integer k at x=cr, that point is a jump point of ⌊g(x)⌋. (If g(x) merely touches an integer k at a peak and turns back down without crossing below k, that single point has width 0 and adds zero area!)
Sum the rectangles: On each sub-interval [xr−1,xr] where k≤g(x)<k+1, the graph of y=⌊g(x)⌋ is a flat horizontal line at height k. It forms a rectangle of base (xr−xr−1) and signed height k:
∫ab⌊g(x)⌋dx=∑(height k)×(width of sub-interval)
What if ⌊g(x)⌋ is only a part of the integrand—for example, ∫abx⌊x2⌋dx or ∫abe⌊x⌋dx? We still find the exact same jump points where g(x) reaches an integer, split the integral at those points, replace ⌊g(x)⌋ by its constant integer value k on each sub-interval, and integrate the remaining smooth function of x!
Example 3
Evaluate:
∫03⌊x⌋dx
Solution:
Look at the staircase graph of y=⌊x⌋ on [0,3] above. Instead of computing antiderivatives, we simply read off the areas of the three rectangles on [0,1], [1,2], and [2,3]:
On [0,1), height =0 and width =1−0=1⟹Area1=0×1=0.
On [1,2), height =1 and width =2−1=1⟹Area2=1×1=1.
On [2,3), height =2 and width =3−2=1⟹Area3=2×1=2.
At x=3, the isolated point (3,3) has width 0⟹Area=0.
Adding the rectangle areas directly gives:
∫03⌊x⌋dx=0+1+2=3
Example 4
Evaluate:
∫01⌊x2+x+1⌋dx
Solution:
Let us sketch the inner function g(x)=x2+x+1 on [0,1] to see how it behaves:
At x=0, g(0)=02+0+1=1.
For x∈[0,1], g′(x)=2x+1>0, so g(x) is strictly increasing.
At x=1, g(1)=12+1+1=3.
As x moves from 0 to 1, g(x) rises continuously from y=1 to y=3. Drawing horizontal lines at the integer levels y=1,2,3, we see that the curve crosses the horizontal line y=2 at a single interior point:
x2+x+1=2⟹x2+x−1=0
Using the quadratic formula (and keeping the positive root inside [0,1]):
x=2−1+1−4(1)(−1)=25−1
Looking at the right panel of the figure above, the region under y=⌊x2+x+1⌋ consists of just two rectangles:
Rectangle R1 on [0,25−1): Here 1≤x2+x+1<2, so the height is 1 and the base is 25−1−0=25−1.
Rectangle R2 on [25−1,1): Here 2≤x2+x+1<3, so the height is 2 and the base is 1−25−1.
At the single point x=1, the height jumps to 3, which has width 0 and area 0.
Writing the integral directly as the sum of the two rectangle areas:
∫01⌊x2+x+1⌋dx=1⋅(25−1−0)+2⋅(1−25−1)
Simplifying the expression:
∫01⌊x2+x+1⌋dx=2−25−1=25−5
Example 5
Evaluate:
∫0π⌊2sinx⌋dx
Solution:
Here the inner function g(x)=2sinx is not monotonic on [0,π]—it rises from 0 to a peak and then falls back to 0. Sketching y=2sinx on [0,π] makes the behavior crystal clear:
As x goes from 0 to 2π, 2sinx rises from 0 to 2, crossing the line y=1 at sinx=21⟹x=6π.
At the peak x=2π, 2sin(2π)=2 at a single isolated point!
As x goes from 2π to π, 2sinx falls from 2 back to 0, crossing the line y=1 again at x=65π.
Look at the graph of y=⌊2sinx⌋ in the figure above:
On [0,6π) and (65π,π], 0≤2sinx<1, so the step height is 0 (zero area).
At x=2π, ⌊2sinx⌋=2, which is a single point of width 0 (zero area).
Everywhere else between x=6π and x=65π, the step height is 1!
Thus, the entire area under y=⌊2sinx⌋ is a single rectangle of height 1 extending from x=6π to x=65π:
∫0π⌊2sinx⌋dx=1×(65π−6π)=64π=32π
Situation 3: Hidden Jumps in the Antiderivative Formula (The Classic Trap!)§
This is one of the most important—and most frequently misunderstood—situations in definite integration.
Sometimes, the integrand f(x) you are asked to integrate is completely continuous and smooth across the entire interval [a,b]. Yet when you use standard integration tricks—such as dividing numerator and denominator by cos2x (to write the integral in terms of tanx) or dividing by x2 (to write it in terms of x−x1)—the antiderivative formula F(x) you obtain has a jump discontinuity at some interior point x=c!
If F(x) jumps at x=c so that F(c−)=F(c+), then plugging in only the outer endpoints F(b)−F(a)misses the jumpF(c−)−F(c+) and gives a completely wrong answer!
Let us see how our [a,c−h] and [c+h,b] method exposes and fixes this trap immediately.
Example 6
Evaluate:
∫0π1+sin2x1dx
Solution:
First, look at the integrand f(x)=1+sin2x1. Since 1≤1+sin2x≤2, the function f(x) is smooth and strictly positive everywhere on [0,π]. Therefore, the area under the curve must be a strictly positive number!
Now let us find the indefinite integral using the standard method: divide both the numerator and the denominator by cos2x:
Why did F(π)−F(0) fail? Because when we divided by cos2x, we divided by 0 at x=2π! At x=2π, tanx is undefined and jumps from +∞ (on the left of 2π) to −∞ (on the right of 2π). Consequently, F(x) has a jump discontinuity at c=2π!
The Correct Evaluation Using [0,2π−h] and [2π+h,π]:
Because c=2π is a point of discontinuity of F(x), we split [0,π] around c=2π:
The integrand has two modulus terms: ∣x∣ (which has a sharp corner at x=0) and ∣x−1∣ (which has a sharp corner at x=1). Both x=0 and x=1 lie inside the interval [−1,2].
We therefore split [−1,2] at x=0 and x=1 into three sub-intervals: [−1,0], [0,1], and [1,2]. Let us write the simplified formula for f(x)=∣x∣+∣x−1∣ on each sub-interval:
On [−1,0]: Both x≤0 and x−1<0, so ∣x∣=−x and ∣x−1∣=−(x−1)=1−x. Thus:
f(x)=−x+(1−x)=1−2x
On [0,1]: Here x≥0 while x−1≤0, so ∣x∣=x and ∣x−1∣=1−x. Thus:
f(x)=x+(1−x)=1
On [1,2]: Both x>0 and x−1≥0, so ∣x∣=x and ∣x−1∣=x−1. Thus:
f(x)=x+(x−1)=2x−1
Summing the definite integrals over the three pieces:
(Geometrically, the graph of y={x} on [0,3] consists of three identical right-angled triangles, each of base 1 and height 1, so each triangle has area 21×1×1=21, giving a total area of 3×21=23.)
Recall from Section 03 that to integrate x4+1x2+1, we divide the numerator and denominator by x2:
∫(x−x1)2+(2)21+x21dx=21tan−1(x2x2−1)+C
Let F(x)=21tan−1(x2x2−1).
Look carefully at the denominator inside tan−1: it contains x2, which becomes 0 at x=0! Since x=0 lies right in the middle of our interval [−1,1], F(x) has a jump discontinuity at c=0.
(Notice that if you blindly plugged in x=1 and x=−1, you would get F(1)−F(−1)=0−0=0, which is impossible since x4+1x2+1>0 everywhere!)
Using our [−1,0−h] and [0+h,1] formula around the trouble spot c=0:
∫−11x4+1x2+1dx=[F(0−)−F(−1)]+[F(1)−F(0+)]
Let us evaluate each term:
At the outer endpoints: At x=−1 and x=1, we have x2−1=0, so:
F(−1)=21tan−1(0)=0andF(1)=21tan−1(0)=0
Left-Hand Limit at 0: As x→0− (approaching 0 through negative numbers), the numerator x2−1→−1 (negative) and the denominator x2→0− (negative). A negative number divided by a tiny negative number goes to +∞:
Right-Hand Limit at 0: As x→0+ (approaching 0 through positive numbers), the numerator x2−1→−1 (negative) and the denominator x2→0+ (positive), so the fraction goes to −∞:
Here the inner function is g(x)=x2−2x+2. To see its behavior on [0,2], we complete the square:
g(x)=(x−1)2+1
Let us sketch the parabola y=(x−1)2+1 over [0,2]:
At x=0, g(0)=(−1)2+1=2.
As x goes from 0 to 1, g(x)decreases from 2 down to its vertex minimum g(1)=1.
As x goes from 1 to 2, g(x)increases from 1 back up to g(2)=2.
Thus, for every interior point x∈(0,2), the parabola lies strictly between y=1 and y=2:
1≤(x−1)2+1<2for all x∈(0,2)
The value g(x)=2 is reached only at the two single endpoints x=0 and x=2, which have width 0 and contribute zero area! Everywhere on the open interval (0,2), the step height is ⌊(x−1)2+1⌋=1.
Drawing the rectangle of height 1 and base 2−0=2 immediately gives:
This integrand combines both the greatest integer function⌊x⌋ (which jumps at x=1 and x=2) and the modulus function∣x−2∣ (which has a sharp corner at x=2).
Splitting the interval [0,3] at x=1 and x=2 takes care of both the jumps and the corner point simultaneously:
On [0,1): Here ⌊x⌋=0, so the entire product is:
⌊x⌋∣x−2∣=0⋅∣x−2∣=0
On [1,2): Here ⌊x⌋=1, and since x<2, we have ∣x−2∣=2−x. Thus:
⌊x⌋∣x−2∣=1⋅(2−x)=2−x
On [2,3): Here ⌊x⌋=2, and since x≥2, we have ∣x−2∣=x−2. Thus:
⌊x⌋∣x−2∣=2(x−2)=2x−4
Summing the integrals over the three sub-intervals:
∫03⌊x⌋∣x−2∣dx=∫010dx+∫12(2−x)dx+∫23(2x−4)dx
Applying the First Fundamental Theorem of Calculus to each piece:
Using the sum property of definite integrals, we can examine ⌊sinx⌋ and ⌊cosx⌋ on [0,π] using the graphical rectangle method:
Part 1 (Behavior of ⌊sinx⌋ on [0,π]): For every x∈[0,π] except the single point x=2π, we have 0≤sinx<1, so ⌊sinx⌋=0. At the single point x=2π, ⌊sin(π/2)⌋=1, which has width 0 and contributes zero area! Thus:
∫0π⌊sinx⌋dx=0
Part 2 (Behavior of ⌊cosx⌋ on [0,π]): As x increases from 0 to π, cosx decreases from 1 to −1, crossing 0 at x=2π:
At x=0, ⌊cos0⌋=1 (single point, zero area).
On (0,2π], 0≤cosx<1⟹⌊cosx⌋=0 (height 0, area 0).
On (2π,π], −1≤cosx<0⟹⌊cosx⌋=−1.
On (2π,π], the graph forms a single rectangle below the x-axis of signed height −1 and width π−2π=2π: