acalculator

What is the limit of a function?

Type a function and the number x approaches, or inf for infinity. The page gives the limit exactly and as a decimal, after checking it against values of the function on both sides.

Your numbers

Use + - * / ^, sqrt, ln, sin, pi, e and one letter.
Limit
3/7

The limit of (x^2 - 3x)/(2x^2 - 5x - 3) as the variable approaches 3 is 3/7.

As a decimal
0.4285714286

Limit: 3/7. The limit of (x^2 - 3x)/(2x^2 - 5x - 3) as the variable approaches 3 is 3/7.

How to calculate

Finds the limit of a function at a number or infinity, checked from both sides.

Example with the default inputs (Function f(x) (x^2 - 3x)/(2x^2 - 5x - 3), x approaches 3): The limit of (x^2 - 3x)/(2x^2 - 5x - 3) as the variable approaches 3 is 3/7.

Method: A computer algebra system finds the limit; it shows only after f is checked near the point on each side.

  • The limit is two-sided and finite.
  • One variable letter (x if none); radians; ln is the natural logarithm.
  • An answer that fails its check is not shown.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Function f(x) (x^2 - 3x)/(2x^2 - 5x - 3), x approaches 3 gives Limit 3/7, As a decimal 0.428571.Source: OpenStax Calculus Vol. 1, 2.3, Ex. 2.17. https://openstax.org/books/calculus-volume-1/pages/2-3-the-limit-laws
  2. Function f(x) 1/x + 5/(x (x - 5)), x approaches 0 gives Limit -1/5, As a decimal -0.2.
  3. Function f(x) (3x - 1)/(2x + 5), x approaches inf gives Limit 3/2, As a decimal 1.5.
  4. Function f(x) (sqrt(x + 2) - 1)/(x + 1), x approaches -1 gives Limit 1/2, As a decimal 0.5.

How it works

The limit calculator finds lim f(x) as x → a, where a is a number or ±∞. A computer algebra system (nerdamer, open source) finds the limit; the page shows it only after checking it with numbers. The algebra runs after you start typing, in the background.

Tries. The algebra tries the function as you typed it. If that gives no checked answer, it tries again with f written as one fraction (every fraction inside multiplied out), then with f simplified; each form is the same function wherever both are defined, so it has the same limit. At ±∞ it also tries x = 1/t² (or −1/t² for −∞) with t → 0: as t approaches 0 from either side, x grows without bound.

The check. Let a be a finite point. At x = a ± 0.0001, a ± 0.00001 and a ± 0.000001 (each step times max(1, |a|)), on each side where f is a real number, f must be within 0.001 × max(1, |L|) of the limit L at the closest point, and closer at each step towards a. At least one side must have real values. For x → +∞ the points are 10⁴, 10⁵ and 10⁶ (negative for −∞). A limit that fails is never shown; the page says "No verified answer".

What you can type

  • The function, in one lowercase letter: x, t, and so on. With no letter the function is a constant. Two different letters give no answer. The letter e is Euler’s number, and pi (or π) is π.
  • Numbers can have decimals (2.5) and powers of ten (1e-3).
  • Operations: + − * / and ^ for powers. Brackets group. A number or bracket next to a letter multiplies: 2x, 3(x + 1), x sin(x).
  • Functions: sqrt, cbrt, ln (and log, the same natural logarithm), log10, exp, abs (or |x|), sin, cos, tan, sec, csc, cot, asin, acos, atan (arcsin, arccos, arctan also work), sinh, cosh, tanh and their inverses. Angles are in radians.
  • The point a: a number or a constant expression (0, −1, 2.5, pi/2, e), or inf, infinity, ∞ or oo for +∞, with a minus sign for −∞.

How answers are written

  • Limit is exact, in the syntax you type: 3/7, 1/2, sin(1), e. Fractions are in lowest terms.
  • As a decimal is the same limit to 10 significant figures.
  • If the algebra returns a rounded number in place of an exact one (a fraction whose denominator, after removing factors 2 and 5, is over 1,000,000, or whose numerator times that denominator is over 10¹², or a decimal with more than 12 significant digits), only the decimal is shown.
  • If the algebra's exact form holds ∞ (it writes the limit of eˣ at −∞ as 1/e^∞), the limit is written as its value when that is a whole number (0), else only the decimal is shown.

What gets no answer

  • A limit that is infinite (1/x² at 0), or that does not exist because the two sides differ or f keeps oscillating (1/x at 0, sin(1/x) at 0). When f is real on one side of a only (√x at 0), the limit from that side is the answer.
  • A limit the algebra does not find, one whose check fails (the check can fail on a correct limit when f loses its digits to rounding near a, as (1 − cos x)/x² does), and one that takes over 3 seconds.

Assumptions

  • Limits are two-sided and finite. Angles are in radians; ln and log are the natural logarithm.

Worked examples by hand

lim (x² − 3x)/(2x² − 5x − 3) as x → 3 (OpenStax Calculus Volume 1, section 2.3, Example 2.17). At x = 3 both top and bottom are 0. Factor: x² − 3x = x(x − 3) and 2x² − 5x − 3 = (2x + 1)(x − 3). For x ≠ 3 the function equals x/(2x + 1), which is continuous at 3, so the limit is 3/(2 × 3 + 1) = 3/7 ≈ 0.4285714286.

lim (1/x + 5/(x(x − 5))) as x → 0 (OpenStax Calculus Volume 1, section 2.3, Example 2.20). Over a common denominator: (x − 5 + 5)/(x(x − 5)) = x/(x(x − 5)) = 1/(x − 5) for x ≠ 0. So the limit is 1/(0 − 5) = −1/5.

lim (3x − 1)/(2x + 5) as x → ∞ (OpenStax Calculus Volume 1, section 4.6, Example 4.25). Divide top and bottom by x: (3 − 1/x)/(2 + 5/x). As x → ∞, 1/x → 0, so the limit is 3/2.

lim (√(x + 2) − 1)/(x + 1) as x → −1 (OpenStax Calculus Volume 1, section 2.3, Example 2.18). Multiply top and bottom by √(x + 2) + 1: the top becomes (x + 2) − 1 = x + 1, which cancels, leaving 1/(√(x + 2) + 1). At x = −1 that is 1/(1 + 1) = 1/2.

Other questions people ask

What is a limit?

The limit of f(x) as x approaches a is the value f(x) gets close to when x gets close to a, from both sides, whatever f does at a itself. (x² − 9)/(x − 3) is not defined at 3, but for x near 3 it equals x + 3, so its limit as x → 3 is 6.

How do I enter infinity?

Type inf, infinity, ∞ or oo for +∞, and -inf for −∞. The limit of (3x − 1)/(2x + 5) as x → ∞ is 3/2: for large x the leading terms 3x/2x dominate.

Why do I get no answer for 1/x at 0?

The page gives two-sided limits only. 1/x grows without bound to the right of 0 and falls without bound to the left, so the two-sided limit does not exist. Infinite limits (1/x² at 0 is +∞) are not given either. Where f is defined on one side only, as √x at 0, the limit from that side is given.

How is the limit checked?

The page evaluates f at a ± 0.0001, 0.00001 and 0.000001 (scaled by the size of a) on each side where f is a real number. At every one of those points f must be within 0.1% of the limit and get closer as x gets closer. For x → ∞ the points are 10,000, 100,000 and 1,000,000. A limit that fails is not shown.

What is the difference between the limit and the value at the point?

The value f(a) is what f gives at a; the limit is what f approaches near a. For a continuous function such as x² + 1 they are equal. They differ at a hole, a jump, or a point where f is not defined: sin(x)/x has no value at 0, but its limit there is 1.

Why does the page say "No verified answer"?

The algebra system found no formula, its answer failed the numeric check, or the work took over 3 seconds. Some correct limits still fail the check, because f cannot be computed accurately that close to a: (1 − cos x)/x² near 0 loses its digits to rounding. The page does not guess.