# Integration of the Greatest Integer Function

> Greatest integer function integration for JEE Mathematics: splitting at integers, integral of [x] and [x^2] over [0,2], fractional part area n/2 with worked splits.

- Canonical URL: https://prepelephant.com/topics/jee/mathematics/greatest-integer-function-integration
- Exam / course: JEE · Subject: Mathematics
- Publisher: PrepElephant (https://prepelephant.com) — Prepared and reviewed by the PrepElephant Academic Review Team
- First published: 2026-10-02
- Last updated: 2026-10-02
- How to cite: "Integration of the Greatest Integer Function", PrepElephant, https://prepelephant.com/topics/jee/mathematics/greatest-integer-function-integration

## Direct answer

The greatest integer function [x] (the floor of x — the largest integer not exceeding it) is a step function, constant between consecutive integers and jumping by one at each; integrating it means splitting the interval at every integer inside it and summing ordinary constants. The anchor results: ∫[0 to n] [x] dx = n(n - 1)/2 for a positive integer n, ∫[0 to n] {x} dx = n/2 for the fractional part {x} = x - [x], and over a symmetric window ∫[-n to n] [x] dx = -n. Composite floors like [x^2] require splitting wherever x^2 crosses an integer, not wherever x does — over [0, 2] the crossings sit at 1, √2, √3, and ∫[0 to 2] [x^2] dx = 5 - √2 - √3. Graphically, each integral is the signed sum of rectangular areas, which makes estimation and unit-splitting the entire technique.

## What you must remember

- **Definition:** [x] = the greatest integer ≤ x; properties [x + n] = [x] + n for integer n, [x] ≤ x < [x] + 1, and {x} = x - [x] ∈ [0, 1).
- **Splitting discipline:** partition at every integer in the interval; on [k, k + 1) the floor equals k, contributing k × 1 to the integral.
- **Anchor results:** ∫[0 to n] [x] dx = n(n - 1)/2; ∫[0 to n] {x} dx = n/2; ∫[1 to n] [x] dx = n(n - 1)/2 as well when n is an integer (shifting by the property [x + 1] = [x] + 1).
- **Composite floors:** for [f(x)], split where f crosses integers — [x^2] on [0, 2] splits at 1, √2, √3, giving (0 × 1) + 1(√2 - 1) + 2(√3 - √2) + 3(2 - √3) = 5 - √2 - √3.
- **Sign care on negatives:** on [-2, -1) the floor is -2 (not -1): floors step at integers going left too, and ∫[-2 to 2] [x] dx = (-2) + (-1) + 0 + 1 = -2.
- **Linearity with a twist:** ∫[x] dx as an antiderivative is x[x] - [x]^2/2 - [x]/2 + C on any unit interval — but definite integrals via splitting are faster and safer.
- **Limits versus integrals:** [x] is discontinuous at integers but bounded and monotone, so it is integrable — a favourite true/false pairing with differentiability, where it fails at integers.

## Splitting a composite floor honestly

Compute ∫[0 to 2] [x^2] dx. The inside function x^2 climbs from 0 to 4, crossing integer values 1, 2, 3 at x = 1, √2, √3 (and 4 exactly at the endpoint x = 2). So the partition is [0, 1), [1, √2), [√2, √3), [√3, 2], on which [x^2] takes the values 0, 1, 2, 3. The integral is 0 × (1 - 0) + 1 × (√2 - 1) + 2 × (√3 - √2) + 3 × (2 - √3). Expanding: (√2 - 1) + (2√3 - 2√2) + (6 - 3√3) = 5 - √2 - √3 ≈ 1.85. Sanity check by size: x^2 averages 4/3 over [0, 2], and flooring shaves off the fractional parts, so an answer near 1.85 rather than 2.67 is exactly right. The method is the content: identify the inner function's integer-crossings, build the partition from them, and multiply each constant floor value by its subinterval length. Any composite — [√x], [2x], [sin x] on a bounded range — yields to the same protocol with its own crossing points.

## Where students slip

JEE Main asks ∫[0 to 3] [x] dx style questions (answer 3) and one-step fractional-part areas (answer n/2), frequently as numerical values; JEE Advanced escalates to composite floors like [x^2] and mixed integrands such as [x]{x} or [x]/(e^x...) where splitting precedes any standard technique. The recurring errors: splitting [x^2] at the integers 1, 2 rather than at √2, √3 — the substitution u = x^2, not x, governs the crossings; flooring negatives as the next integer up ([−1.5] = -2, not -1); forgetting that the value at the finitely many jump points does not affect the integral, so endpoint conventions (closed or half-open subintervals) are immaterial — a point of unnecessary anxiety in otherwise correct solutions. Also common: writing ∫[0 to 2.5] [x] dx as 2.5 × [2.5]; the final partial interval [2, 2.5) contributes 2 × 0.5, giving 0 + 1 + 1 = 2 overall. The function's limit behaviour (one-sided limits differ at integers) belongs to continuity questions, but integrability by splitting belongs to definite integration — both live in the syllabus.

## Frequently asked questions

### What is ∫[0 to n] [x] dx for a positive integer n?

n(n - 1)/2, from summing k over k = 0 to n - 1; for example ∫[0 to 4] [x] dx = 0 + 1 + 2 + 3 = 6.

### How is an integral of [x^2] computed?

Split the interval wherever x^2 crosses an integer; on [0, 2] the crossings 1, √2, √3 give ∫[x^2] dx = 5 - √2 - √3.

### What is the integral of the fractional part {x} over [0, n]?

n/2, since on each unit interval {x} = x - k integrates to 1/2 and the pieces are identical.

### Does the value of [x] at its jump points affect a definite integral?

No — finitely many discontinuities have zero width, so the integral is unchanged; splitting conventions at endpoints do not matter.

### What is [−1.5]?

-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 = -2 and not 0.
