Ask any JEE student what they think of integrals involving the Greatest Integer Function — written [x] — and you'll usually get a groan. It looks like one of those topics that needs ten lines of inequality-solving before you even start integrating. That reputation is undeserved. The function itself is simple; it's almost always taught algebraically when it should be taught visually. Once you see it as a picture instead of a set of inequalities, it stops being hard.
What [x] actually means
[x], the greatest integer function (also called the floor function), gives the largest integer less than or equal to x. So [2.7] = 2, [3] = 3, [-0.4] = -1. Graphed, it looks like a staircase — flat steps of height 1, each stretching over an interval of width 1 on the x-axis, jumping up by exactly 1 at every integer.
That staircase shape is the entire trick. Once you can see where the steps are, the integral is just arithmetic — no calculus involved beyond recognising that the area under a constant is a rectangle.
The standard (slow) approach
Most students are taught to handle ∫[f(x)] dx by algebra: figure out the range of f(x) over the interval, then solve a chain of inequalities like k ≤ f(x) < k+1 for every integer k in that range, to find where [f(x)] switches value. It works, but it's slow, and every inequality is a fresh chance to make a sign error or flip an inequality the wrong way under exam pressure.
The observation method
Here's the faster way. Instead of solving inequalities, sketch the inner function f(x) over the interval you're integrating, and draw horizontal lines at each integer height it passes through. Wherever the graph of f(x) crosses one of those horizontal lines, that's a breakpoint — the x-value where [f(x)] jumps to the next integer. You read these breakpoints straight off the sketch. No algebra required unless the function is awkward to invert by eye.
Once you have the breakpoints, the rest is bookkeeping:
- Between two consecutive breakpoints,
[f(x)]is constant — it equals whatever integer that strip of the staircase sits at. - The integral over that strip is just (that integer) × (width of the strip) — a rectangle's area, not an integral you need to "do".
- Add up the rectangles across the whole interval. That sum is your answer.
Worked example
Evaluate ∫20 [x²] dx — the definite integral of [x²] from x = 0 to x = 2.
Sketch y = x² for x between 0 and 2. It's increasing throughout, running from 0 up to 4. Mark horizontal lines at y = 1, 2, 3. Where does the curve cross each one?
x² = 1 → x = 1 · x² = 2 → x = √2 · x² = 3 → x = √3. These split [0, 2] into four strips: [0, 1), [1, √2), [√2, √3), [√3, 2).
On [0, 1), x² < 1, so [x²] = 0. On [1, √2), [x²] = 1. On [√2, √3), [x²] = 2. On [√3, 2), [x²] = 3. These are exactly the "steps" of the staircase — no inequality-solving, just reading the picture.
0 × (1 − 0) + 1 × (√2 − 1) + 2 × (√3 − √2) + 3 × (2 − √3)
= (√2 − 1) + (2√3 − 2√2) + (6 − 3√3)
= 5 − √2 − √3 ≈ 1.854
That's the whole answer — four rectangles added up, each one read straight off a sketch. Nobody solved an inequality; they just looked at where a rising curve crosses a few horizontal lines.
A trickier example — a non-monotonic function
The first example was easy mode: x² only ever increases on [0, 2], so every integer level is crossed exactly once. Real JEE questions like to break that assumption. Here's the case that actually separates students who understand the method from students who memorised the steps.
Evaluate ∫40 [4x − x²] dx.
4x − x² is a downward parabola, zero at x = 0 and x = 4, peaking at 4 when x = 2. It's not monotonic — it rises from 0 to 4 on [0, 2], then falls back from 4 to 0 on [2, 4]. Draw horizontal lines at y = 1, 2, 3 and watch where the curve crosses each one — you'll see two crossings per line, symmetric about x = 2.
By symmetry about x = 2, each crossing pair is 2 − √(4−k) and 2 + √(4−k). Reading them off: x = 2−√3, 2−√2, 1 on the way up, and x = 3, 2+√2, 2+√3 on the way down. Notice x = 1 and x = 3 both give exactly f(x) = 3 — the peak region where [4x−x²] = 3 is unusually wide.
Working left to right: floor = 0 on [0, 2−√3), floor = 1 on [2−√3, 2−√2), floor = 2 on [2−√2, 1), floor = 3 on the whole middle stretch [1, 3) (it briefly touches 4 only at the single point x = 2, which has zero width and doesn't affect the integral), then it mirrors back down: floor = 2 on [3, 2+√2), floor = 1 on [2+√2, 2+√3), floor = 0 on [2+√3, 4].
The two floor-0 strips contribute nothing. The two floor-1 strips: 1 × 2(√3 − √2). The two floor-2 strips: 2 × 2(√2 − 1). The wide floor-3 strip: 3 × 2.
= 2(√3 − √2) + 4(√2 − 1) + 6
= 2√3 − 2√2 + 4√2 − 4 + 6
= 2 + 2√2 + 2√3 ≈ 8.293
The number itself isn't the point — the point is that the sketch caught the symmetry immediately. Someone jumping straight into algebra, solving k ≤ 4x−x² < k+1 for each k without drawing anything first, has to consciously remember that a downward parabola gives two solutions per level. Miss that, and you silently drop half the rectangles. The picture makes it impossible to miss.
When to use this
The observation method is fastest when the inner function is monotonic and easy to sketch — a straight increase or decrease, like the first example. For anything oscillating or non-monotonic, like the parabola above, sketch it first anyway — you'll still see the breakpoints faster than you'd solve for them, and the sketch tells you immediately when a value repeats on both sides of a peak, the exact trap the algebraic method hides until you sit down and plug in test points.