Home

Squeeze Theorem Calculator

Squeeze theorem demo. Enter g≤f≤h and a; if g and h share the same limit, watch f squeezed to it—for limits.

展开更多 ▾
g(x) ≤ f(x) ≤ h(x), and lim g = lim h = A ⇒ lim f = A
Lower bound of f
Function whose limit we want
Upper bound of f
x approaches this point

📖 Tutorial|Squeeze Theorem

1. Definition
If g(x)≤f(x)≤h(x) near a and lim g=lim h=A, then lim f=A. This is the squeeze (sandwich) theorem.
2. Symbols
SymbolMeaning
g(x), h(x)Lower and upper bounds
f(x)The sandwiched middle function
ACommon limit
aApproach point
3. How it works
  • We numerically compute the limits of g and h;
  • If both equal A, f is squeezed to A;
  • If they differ, the theorem does not apply.
4. Steps
  1. Enter lower g, middle f, upper h;
  2. Enter the point a;
  3. Click Calculate to check the squeeze.
5. Example
Example: as x→0, −x²≤x²sin(1/x)≤x² and lim(±x²)=0, so x²sin(1/x)→0.
6. Pitfalls
First verify g≤f≤h actually holds;
The two bounds must share exactly the same limit;
Oscillating functions are squeezed because they are hard to bound directly.

❓ FAQ|Squeeze Theorem

When should I use the squeeze theorem?
When f is hard to bound directly but you can sandwich it between two functions with the same limit.
What if the bounds have different limits?
They do not squeeze tightly enough; find sharper bounds.
Why does x²sin(1/x) work?
|sin(1/x)|≤1, so −x²≤x²sin(1/x)≤x² and both bounds tend to 0.
Must the inequality hold everywhere?
Only in some punctured neighborhood of a.
Why does the number wobble?
sin(1/x) oscillates fast for tiny x, so floating-point noise appears, but the conclusion stands.