Limit Calculator: Numeric Limits, One-Sided Limits and Limits at Infinity
By FindMySum · Last reviewed
A limit calculator tells you what value a function approaches as its input approaches some point, even when the function is undefined at that point. This one works numerically: it evaluates the function ever closer to the point, extrapolates to the point itself and rounds the answer to the digits that its own error estimate supports. It handles two-sided and one-sided limits, limits at plus or minus infinity, and infinite limits, and it says plainly when a limit does not exist.
When the function is a fraction that gives 0/0 or ∞/∞, the calculator also applies L'Hôpital's rule with exact derivatives and checks that the two answers agree.
What a limit is
The limit of f(x) as x approaches a, written lim x→a f(x) = L, means that f(x) can be made as close to L as you like by taking x close enough to a. What happens exactly at x = a doesn't matter: f(a) may be different from L or may not exist at all.
That is why limits are useful. The function sin(x)/x can't be evaluated at x = 0, because it gives 0/0. But the values near 0 are clear: sin(0.1)/0.1 = 0.998334, sin(0.01)/0.01 = 0.999983, sin(0.001)/0.001 = 0.9999998. They are heading to 1, and the limit is 1. This particular limit is the key step in proving that the derivative of sin x is cos x.
One-sided limits
A limit can be approached from the left (x → a⁻, values of x below a) or from the right (x → a⁺, values above a). The two-sided limit exists only when both one-sided limits exist and are equal.
The function |x|/x shows the difference. For negative x it equals −1, for positive x it equals 1. So the left-hand limit at 0 is −1, the right-hand limit is 1, and the two-sided limit does not exist. Step functions such as floor(x) behave the same way at every whole number.
One-sided limits also matter at the edge of a function's domain. √x is only defined for x ≥ 0, so at 0 only the right-hand limit makes sense, and it is 0.
Infinite limits and limits at infinity
Two different ideas use the word infinity.
An infinite limit means f(x) grows without bound as x approaches a finite point. 1/x² goes to +∞ as x → 0 from either side, which makes the line x = 0 a vertical asymptote. 1/x goes to +∞ from the right and −∞ from the left, so it has no two-sided limit at all.
A limit at infinity asks what f(x) approaches as x itself grows without bound. For a rational function, compare the degrees: if they are equal, the limit is the ratio of the leading coefficients, so (2x² + 1)/(x² − 3) → 2 and the line y = 2 is a horizontal asymptote. The calculator handles x → ∞ by substituting x = 1/t and letting t shrink to 0.
When a limit does not exist
There are three common reasons:
- The sides disagree, as with |x|/x at 0.
- The function oscillates. sin(1/x) swings between −1 and 1 infinitely often as x → 0, never settling on any value.
- The function is unbounded. Strictly speaking, a limit of +∞ doesn't exist either, but it describes how the function fails, so it is reported as ∞.
How the calculator estimates a limit
For each side it evaluates f at x = a ± t with t = 0.125, 0.0625, 0.03125 and so on, halving each time. Near a smooth limit the values behave like L + c₁t + c₂t² + …, and Richardson extrapolation combines successive values to cancel the c₁t term, then the c₂t² term, and so on, giving an estimate of L that is far more accurate than the last value on its own. The same table gives an error estimate. Because subtracting nearly equal numbers loses digits, the process stops as soon as the error estimate starts to grow.
A second pass looks at the values at t = 0.1, 0.01, … 10⁻¹⁰. If they all have the same sign and keep growing without the steps between them shrinking, the limit is infinite. If the steps keep changing direction without shrinking, the function oscillates. Limits that converge slowly, like x·ln x → 0, are checked by watching that sequence settle.
Worked example: sin(x)/x as x → 0
The calculator opens with this limit.
- Direct substitution gives sin(0)/0 = 0/0, an indeterminate form, so the value at 0 is undefined.
- Approach table. At x = 0.1 the function is 0.998334; at 0.01, 0.999983; at 0.001, 0.9999998. The left side gives the same values, because sin(x)/x is even.
- Extrapolation gives 1 on each side with an error estimate below 10⁻¹², so the two-sided limit is 1.
- L'Hôpital's rule. Differentiate top and bottom separately: cos(x)/1, which is 1 at x = 0. The check agrees.
L'Hôpital's rule
If f(x)/g(x) gives 0/0 or ±∞/±∞ at a, and the derivatives exist near a, then lim f/g = lim f′/g′, provided the second limit exists. If f′/g′ is still indeterminate, differentiate again. (1 − cos x)/x² needs two rounds: the first gives sin x/(2x), still 0/0, and the second gives cos x/2, which is 1/2 at 0. The rule is easy to misuse: it applies only to quotients in an indeterminate form, and you differentiate the numerator and denominator separately, not as a quotient.
Limits of a numeric approach
A numeric method can be fooled by a function that changes behaviour only very close to the point, or that oscillates faster than the sample points can resolve. It also gives exact answers as decimals: √2/2 appears as 0.7071067812, not as a surd. Use the approach table and the graph to check a surprising result, and an algebraic method when you need the exact form.
More questions
What is an indeterminate form?
An expression such as 0/0 or ∞/∞ that you get by plugging the point into a formula, but that doesn't tell you the limit. sin(x)/x, x/x and x²/x all give 0/0 at 0, yet their limits are 1, 1 and 0. Other indeterminate forms are 0·∞, ∞ − ∞, 1^∞, 0⁰ and ∞⁰; each must be rewritten or handled with L'Hôpital's rule.
Can a function have a limit at a point where it is not defined?
Yes, and that is one of the main reasons limits exist. (x² − 1)/(x − 1) is undefined at x = 1, but for every other x it equals x + 1, so its limit at 1 is 2. The graph has a hole at (1, 2): a removable discontinuity.
What is the epsilon-delta definition of a limit?
The limit of f(x) as x → a is L if for every ε > 0 there is a δ > 0 such that 0 < |x − a| < δ implies |f(x) − L| < ε. In words: you can make f(x) as close to L as you like by taking x close enough to a, but not equal to it. Numeric methods test exactly this idea with ever smaller distances.
How are limits used to define derivatives?
The derivative of f at a is the limit of the difference quotient (f(a + h) − f(a))/h as h → 0. It is always a 0/0 form, which is why limits come first in calculus. For f(x) = x² at a = 3 the quotient is 6 + h, whose limit is 6.
What is the squeeze theorem?
If g(x) ≤ f(x) ≤ h(x) near a and g and h have the same limit L at a, then f also has limit L. It is how textbooks prove that sin(x)/x → 1 and that x·sin(1/x) → 0: the second is squeezed between −|x| and |x|, both of which tend to 0.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.