Math
Limit calculator
Enter f(x) and the value x approaches. The calculator tries direct substitution first, then algebra for the indeterminate forms, and shows a table of values from each side so you can see the limit being approached.
Use ^ for powers. ln is the natural log; sqrt, abs, sin, cos, tan, e and pi work.
━ f(x) = (1 − cos(x))/x²
| x (from left) | f(x) | x (from right) | f(x) |
|---|---|---|---|
| −0.1 | 0.4995834722 | 0.1 | 0.4995834722 |
| −0.01 | 0.4999958333 | 0.01 | 0.4999958333 |
| −0.001 | 0.4999999583 | 0.001 | 0.4999999583 |
| −0.0001 | 0.499999997 | 0.0001 | 0.499999997 |
| −1.00000000e-5 | 0.5000000414 | 1.00000000e−5 | 0.5000000414 |
| −1.00000000e-6 | 0.5000444503 | 1.00000000e−6 | 0.5000444503 |
| −1.00000000e-7 | 0.4996003611 | 1.00000000e−7 | 0.4996003611 |
Show the working, step by step
Substituting gives the indeterminate form 0/0.
1 − cos(x) → 0, x² → 0
Apply L'Hôpital's rule: differentiate the top and the bottom separately, then simplify.
lim x→0 (sin(x))/(2x) = lim x→0 sin(x)/(2x)
Substituting gives the indeterminate form 0/0.
sin(x) → 0, 2x → 0
Apply L'Hôpital's rule: differentiate the top and the bottom separately, then simplify.
lim x→0 (cos(x))/(2) = lim x→0 cos(x)/2
Substitute x = 0 directly; the expression is continuous there.
lim x→0 cos(x)/2 = 1/2 ≈ 0.5
The table is evidence rather than proof: a numerical sequence can look settled when it is not, and rounding error grows as x gets very close to a.
How a limit is found
lim x→a f(x) = L means f(x) gets as close to L as you like when x is close enough to a (x ≠ a)
What happens at a itself does not matter; only the values near it do. The calculator works through the usual order:
- Substitute. If f is continuous at a (polynomials, sin, eˣ and combinations of them where they are defined), the limit is just f(a).
- Identify the form. A non-zero number over 0 means the function blows up: check the sign on each side. 0/0 or ∞/∞ is indeterminate and needs more work.
- Simplify. Cancel a common factor: (x² − 1)/(x − 1) = x + 1 for x ≠ 1, so the limit at 1 is 2. Multiply by a conjugate for ∞ − ∞ with a square root.
- L’Hôpital’s rule. Differentiate the top and the bottom and try again.
- At ±∞, divide a rational function by the highest power of x in the denominator: the limit is 0, the ratio of leading coefficients, or ±∞, depending on the degrees.
A worked example
The default is the limit of (1 − cos x)/x² as x → 0.
- Substituting gives (1 − 1)/0 = 0/0, which is indeterminate.
- L’Hôpital: differentiate top and bottom to get sin(x)/(2x). Still 0/0 at x = 0.
- Again: cos(x)/2. This is continuous at 0, so substitute: cos(0)/2 = 1/2.
The table agrees: at x = ±0.1 the function is 0.499583, at ±0.01 it is 0.4999958, and at ±0.001 it is 0.49999996.
Standard limits worth knowing
| Limit | Value |
|---|---|
| sin(x)/x as x → 0 | 1 |
| (1 − cos x)/x² as x → 0 | 1/2 |
| (eˣ − 1)/x as x → 0 | 1 |
| (aˣ − 1)/x as x → 0 | ln a |
| (1 + 1/x)ˣ as x → ∞ | e |
| ln(x)/x as x → ∞ | 0 |
| x·ln(x) as x → 0⁺ | 0 |
| xˣ as x → 0⁺ | 1 |
One-sided limits
The left-hand limit (x → a⁻) uses only x < a, and the right-hand limit (x → a⁺) only x > a. The two-sided limit exists exactly when both one-sided limits exist and are equal. Choose a direction when the function is only defined on one side, such as ln(x) or √x at 0, or when you need the behaviour at a jump or an asymptote.
Common mistakes
- Reading 0/0 as 0 or as 1. It is not a value; it means more work is needed.
- Using L’Hôpital’s rule when the form is not 0/0 or ∞/∞. For (x + 1)/x at 0 it would wrongly give 1.
- Applying the quotient rule instead: L’Hôpital differentiates the top and bottom separately.
- Declaring a limit from one side only. 1/x → +∞ from the right but −∞ from the left, so the two-sided limit does not exist.
Common questions
What is L’Hôpital’s rule?
If f(x)/g(x) gives 0/0 or ∞/∞ at a, then lim f/g = lim f′/g′, provided the second limit exists. For sin(x)/x at 0 the derivatives give cos(x)/1, which is 1 at x = 0. The rule can be applied again if the new quotient is still indeterminate, as it is twice for (1 − cos x)/x².
When does a limit not exist?
When the function approaches different values from the left and the right (|x|/x at 0 gives −1 and +1), when it grows to +∞ on one side and −∞ on the other (1/x at 0), or when it oscillates without settling (sin(1/x) at 0). The calculator checks each side separately and reports "does not exist" in those cases.
Is a limit of ∞ a limit that exists?
Strictly, no: ∞ is not a number, so lim 1/x² as x → 0 does not exist as a real number. But writing = ∞ says more than "does not exist", because it tells you how it fails: the values grow without bound. The calculator follows the usual textbook convention and shows ∞ or −∞ when both sides agree.
What are the indeterminate forms?
0/0, ∞/∞, 0·∞, ∞ − ∞, 1^∞, 0⁰ and ∞⁰. Each can come out as any value depending on the functions involved, so substituting tells you nothing. The first two go straight to L’Hôpital’s rule; 0·∞ and ∞ − ∞ are rewritten as a quotient (the calculator uses the conjugate for square roots), and the three power forms are handled by taking logarithms. That is how (1 + 1/x)^x → e is found.
Why is the table of values not enough on its own?
Because rounding error takes over very close to a. In floating point, 1 − cos(x) is exactly 0 once x is below about 10⁻⁸, so the table would suggest the limit of (1 − cos x)/x² is 0 when it is 1/2. And slowly changing functions can look settled when they are not. The algebra is the proof; the table is a check.
Related calculators
-
Derivative
The derivative is itself a limit; differentiate with the rules shown.
-
Infinite series
Limits of partial sums: convergence tests and sums.
-
Integral
Improper integrals are limits of definite integrals.
-
Function calculator
Domain, range and values of a function.