On this page
Some limits won't give in to algebra or L'Hôpital's rule. Usually one piece is the problem: a greatest integer function, a sin or cos that never settles, or a sum of n terms with no neat formula. Instead of attacking it head-on, trap it between two simpler expressions that head to the same number.
What does the sandwich theorem say?
The sandwich theorem (also called the squeeze theorem) says: if f(x) ≤ g(x) ≤ h(x) for all x near a, except possibly at a itself, and both f(x) and h(x) tend to L, then g(x) also tends to L. That is Theorem 2.7 in OpenStax Calculus Volume 1, section 2.3, where it is called the Squeeze Theorem. The same idea works when x → ∞ and for sequences as n → ∞.
OpenStax uses it to prove the standard limit sin θ/θ → 1, squeezing it with cos θ < sin θ/θ < 1 for small positive θ. For a refresher on one-sided limits, read our guide to limits and continuity for JEE.
Which bounds should you reach for?
Three standard bounds come up again and again:
Floor functions: x − 1 < [x] ≤ x for every real x, which follows from the definition of the floor or greatest integer function.
Oscillating terms: −1 ≤ sin(anything) ≤ 1, and the same for cos. Multiply through by whatever sits in front.
Sums of n terms: n × (smallest term) ≤ sum ≤ n × (largest term).
For more on the first, see our explainer on greatest integer and fractional part functions.
How do you use the sandwich theorem with floor functions?
Example 1: the limit of x[1/x] as x → 0. Start from 1/x − 1 < [1/x] ≤ 1/x.
For x > 0, multiply by x: 1 − x < x[1/x] ≤ 1.
For x < 0, multiplying by x flips both signs: 1 ≤ x[1/x] < 1 − x.
On both sides of 0 the bounds tend to 1, so the limit is 1.
The graph at the top of this page shows it: x[1/x] is pinned between y = 1 and y = 1 − x.
Example 2: the limit of ([x] + [2x] + ... + [nx])/n² as n → ∞. Apply the floor bound to every term: kx − 1 < [kx] ≤ kx. Add from k = 1 to n: x·n(n + 1)/2 − n < sum ≤ x·n(n + 1)/2. Divide by n². Both sides tend to x/2, so the limit is x/2.
How do you handle sin and cos terms that keep oscillating?
Example 3: the limit of x² sin(1/x) as x → 0. sin(1/x) has no limit at 0, so bound it: −x² ≤ x² sin(1/x) ≤ x². Both bounds tend to 0, so the limit is 0.
Example 4: the limit of (2x + sin x)/(x + cos x) as x → ∞. For x > 1, the numerator lies between 2x − 1 and 2x + 1 and the positive denominator between x − 1 and x + 1, so (2x − 1)/(x + 1) ≤ expression ≤ (2x + 1)/(x − 1). Both bounds tend to 2. For the rational-function step, see how to evaluate limits at infinity.
How do you squeeze a sum of n terms?
Example 5: the limit of 1/√(n² + 1) + 1/√(n² + 2) + ... + 1/√(n² + n). The n terms lie between 1/√(n² + n) and 1/√(n² + 1), so n/√(n² + n) ≤ sum ≤ n/√(n² + 1). Both bounds tend to 1.
Crude bounds can fail. For the sum of k/(n² + k) from k = 1 to n, using the smallest and largest terms gives bounds tending to 0 and 1, which prove nothing. Bound only the denominator instead: k/(n² + n) ≤ k/(n² + k) ≤ k/(n² + 1). Adding gives n(n + 1)/(2(n² + n)) ≤ sum ≤ n(n + 1)/(2(n² + 1)), and both sides tend to 1/2.
A five-step squeeze checklist
Before you write "by sandwich theorem":
Name the stubborn piece: a floor, a sin or cos, or a sum.
Replace it with its standard bound.
Rebuild the whole expression and check the sign of anything you multiply by.
Find the limit of each bound. If they differ, tighten and repeat.
Write the inequality and say where it holds (x > 0, x > 1, near a), then conclude.
If the greatest integer function itself still feels shaky, the Fermi Concept Library gives every mathematics concept its own lesson and its place in the map. When your bounds keep refusing to meet, try worked problems in the Fermi Problem Library, where a step-by-step solver explains the reasoning rather than printing an answer.
Tomorrow, redo Examples 1 to 5 without looking.
![Sawtooth graph of x[1/x] squeezed between two straight lines that meet at (0, 1)](https://news.fermi.ai/media/images/2026/10/sawtooth-graph-of-x-1-x-squeezed-between-two-straight-lines--8204e406-1600x900.webp)


