Integration of the Greatest Integer Function
On this page
Direct answer
Integration of the greatest integer function splits the interval at every integer inside it, because [x], the largest integer not exceeding x, is constant between integers. Each piece adds a constant times its length, so ∫[0 to n] [x] dx = n(n − 1)/2 and ∫[0 to n] {x} dx = n/2. Composite floors follow the same discipline, and over [0, 2] the integral of [x²] equals 5 − √2 − √3.
What you must remember
- Definition: [x] is the greatest integer not exceeding x, so [x] ≤ x < [x] + 1, and {x} = x − [x] lies in [0, 1).
- Splitting discipline: on [k, k + 1) the floor equals k, so each unit piece contributes k times its length.
- Anchor results: ∫[0 to n] [x] dx = n(n − 1)/2, ∫[0 to n] {x} dx = n/2, and ∫[1 to n] [x] dx = n(n − 1)/2 for integer n.
- Composite floors: for [f(x)], split where f crosses integers; for [x²] on [0, 2] the crossings are 1, √2 and √3.
- Symmetric window: ∫[−n to n] [x] dx = −n, because the negative side outweighs the positive side.
- Sign care on negatives: floors step downward to the left, so ∫[−2 to 2] [x] dx = −2 + (−1) + 0 + 1 = −2.
- Integrability: [x] jumps at integers but is bounded and monotone, so it is integrable even though it is discontinuous.
Splitting a composite floor, step by step
The worked case ∫[0 to 2] [x²] dx shows the whole protocol, because the inner function crosses several integers before the endpoint.
- Find the crossings: x² climbs from 0 to 4, so it crosses the integers 1, 2 and 3 at x = 1, √2 and √3.
- Build the partition: the pieces are [0, 1), [1, √2), [√2, √3) and [√3, 2], on which the floor takes the values 0, 1, 2 and 3.
- Weight each piece: the integral is 0 × (1) + 1 × (√2 − 1) + 2 × (√3 − √2) + 3 × (2 − √3).
- Simplify: expanding gives 5 − √2 − √3, roughly 1.85.
- Sanity-check the size: the unfloored integral of x² over [0, 2] is 8/3, about 2.67, and flooring only removes fractional parts, so a value near 1.85 is plausible.
The method is the content: identify where the inner function crosses integers, build the partition from those points, and multiply each constant floor value by its subinterval length. Any composite such as [√x] or [2x] on a bounded range yields to the same protocol.
Where the partition goes wrong
Most marks are lost to partition errors rather than to the integration itself.
- Trap: splitting [x²] at x = 1 and x = 2 Correct: the partition follows where x² crosses integers, so the crossings are at √2 and √3, which means the substitution u = x² governs the split.
- Trap: flooring negatives toward zero, so [−1.5] = −1 Correct: the floor moves toward minus infinity, so [−1.5] = −2, and most sign errors trace back to this slip.
- Trap: writing ∫[0 to 2.5] [x] dx as 2.5 × [2.5] Correct: the final partial interval [2, 2.5) contributes 2 × 0.5, so the total is 0 + 1 + 1 = 2.
Frequently asked questions
What is the integral of the greatest integer function from 0 to n?
For a positive integer n, ∫[0 to n] [x] dx equals n(n − 1)/2, from summing k over k = 0 to n − 1. For example, ∫[0 to 4] [x] dx equals 0 + 1 + 2 + 3 = 6.
How is an integral of the greatest integer of x squared computed?
Split the interval wherever x² crosses an integer, then weight each constant floor value by its subinterval length. On [0, 2] the crossings are 1, √2 and √3, giving 5 − √2 − √3.
What is the integral of the fractional part of x over [0, n]?
The integral of {x} over [0, n] equals n/2. On each unit interval {x} = x − k integrates to 1/2, so the n identical pieces add up to n/2.
Does the value of the floor at its jump points affect a definite integral?
No, the finitely many jump points have zero width, so the integral is unchanged. Endpoint conventions, such as closed or half-open subintervals, do not change the answer.
What is the value of [−1.5] in the greatest integer function?
The value is −2, the greatest integer less than or equal to −1.5. Floors step downward to the left, which is why ∫[−2 to 2] [x] dx equals −2 rather than 0.