How to Find the Limit of a Function

Limits are the engine that makes calculus run. Before you can understand derivatives or integrals, you need to understand limits — what they mean, why they matter, and how to find them. This lesson builds from the core idea all the way through L'Hôpital's rule and limits at infinity.

What Is a Limit?

A limit asks a very specific question: as the input to a function gets closer and closer to some value, what does the output get closer and closer to?

Notice what that question does not ask: what the function equals at that value. Only what it approaches.

This distinction matters more than it might seem. Functions can behave strangely at individual points — they might be undefined there, have a hole in the graph, or jump discontinuously. But a limit can still exist in those cases, as long as the function is consistently approaching the same value from both directions.

Here's a concrete example. Consider:

$$f(x) = \frac{x^2 - 1}{x - 1}$$

Try to evaluate this at \(x = 1\): you get \(\frac{0}{0}\) — undefined. But factor the numerator:

$$\frac{x^2 - 1}{x - 1} = \frac{(x-1)(x+1)}{x-1} = x + 1 \quad (x \neq 1)$$

The simplified function equals \(x + 1\) everywhere except \(x = 1\), where there's a hole. But as \(x\) approaches 1 from either side, the output approaches 2. So the limit is 2, even though the function is undefined at \(x = 1\) itself.

That's the essential idea: a limit describes where a function is headed, not necessarily where it lands.

Why limits matter

Limits aren't an abstract curiosity — they're the foundation every other concept in calculus rests on. The definition of a derivative is itself a limit:

$$f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$$

Integrals, continuity, infinite series — all of these are defined in terms of limits. Understanding limits is understanding calculus.

Limit Notation

The standard notation looks like this:

$$\lim_{x \to a} f(x) = L$$

Read it as: "the limit of \(f(x)\) as \(x\) approaches \(a\) equals \(L\)."

The arrow means \(x\) gets arbitrarily close to \(a\) — not that it ever equals \(a\). The question is what value \(f(x)\) closes in on.

For example:

$$\lim_{x \to 3} (2x + 1) = 7$$

As \(x\) approaches 3, \(2x + 1\) approaches 7. Here it also equals 7 at \(x = 3\), but that's a bonus — not a requirement for the limit to exist.

One-Sided Limits

Sometimes a function approaches different values depending on which side you come from. This is where one-sided limits matter.

The left-hand limit (approaching from below) is written:

$$\lim_{x \to a^-} f(x)$$

The right-hand limit (approaching from above) is written:

$$\lim_{x \to a^+} f(x)$$

For a two-sided limit to exist, both one-sided limits must exist and agree. If they differ, the two-sided limit does not exist — written DNE.

Example: Consider \(f(x) = \frac{|x|}{x}\).

  • From the right (positive \(x\)): \(\frac{x}{x} = 1\), so \(\lim_{x \to 0^+} = 1\)
  • From the left (negative \(x\)): \(\frac{-x}{x} = -1\), so \(\lim_{x \to 0^-} = -1\)

The one-sided limits disagree, so \(\lim_{x \to 0} \frac{|x|}{x}\) does not exist.

Method 1: Direct Substitution

The simplest technique: plug in the value that \(x\) is approaching. This works whenever the function is continuous at that point — no holes, jumps, or undefined values.

Always try substitution first. If you get a real number, you're done.

Example 1

$$\lim_{x \to 4} (x^2 - 3x + 1)$$

Substitute \(x = 4\):

$$4^2 - 3(4) + 1 = 16 - 12 + 1 = 5$$

The limit is 5.

Example 2

$$\lim_{x \to 2} \frac{x + 3}{x - 1}$$

Substitute \(x = 2\):

$$\frac{2 + 3}{2 - 1} = \frac{5}{1} = 5$$

The limit is 5.

Example 3

$$\lim_{x \to \pi} \sin(x)$$

Substitute \(x = \pi\):

$$\sin(\pi) = 0$$

The limit is 0.

Method 2: Factoring

If direct substitution gives you \(\frac{0}{0}\) — called an indeterminate form — the limit might still exist. You just need to do some algebra first.

The strategy: factor the numerator (and possibly the denominator) to cancel the term causing the problem, then substitute.

Example 4

$$\lim_{x \to 3} \frac{x^2 - 9}{x - 3}$$

Substituting \(x = 3\) gives \(\frac{0}{0}\). Factor the numerator — it's a difference of squares:

$$\frac{x^2 - 9}{x - 3} = \frac{(x-3)(x+3)}{x-3} = x + 3 \quad (x \neq 3)$$

Now substitute:

$$\lim_{x \to 3} (x + 3) = 6$$

The limit is 6.

Example 5

$$\lim_{x \to 0} \frac{6x^2 - 7x}{x}$$

Substituting gives \(\frac{0}{0}\). Factor \(x\) from the numerator:

$$\frac{6x^2 - 7x}{x} = \frac{x(6x - 7)}{x} = 6x - 7 \quad (x \neq 0)$$

Now substitute:

$$\lim_{x \to 0} (6x - 7) = -7$$

The limit is \(-7\).

One important clarification: even after cancelling, the original function is still undefined at \(x = 0\). The cancellation reveals what the function approaches, not its value at the point. The limit describes the destination; the function may never reach it.

Example 6

$$\lim_{x \to -2} \frac{x^2 + 5x + 6}{x + 2}$$

Substituting gives \(\frac{0}{0}\). Factor the numerator:

$$x^2 + 5x + 6 = (x + 2)(x + 3)$$

$$\frac{(x+2)(x+3)}{x+2} = x + 3 \quad (x \neq -2)$$

Substitute:

$$\lim_{x \to -2} (x + 3) = 1$$

The limit is 1.

Method 3: L'Hôpital's Rule

Sometimes factoring doesn't resolve the \(\frac{0}{0}\) problem — either the algebra doesn't cooperate or the expression can't be factored cleanly. L'Hôpital's rule (pronounced lo-pee-TAHL) gives you another path.

L'Hôpital's Rule: If a limit produces an indeterminate form \(\frac{0}{0}\) or \(\frac{\infty}{\infty}\), then:

$$\lim_{x \to a} \frac{f(x)}{g(x)} = \lim_{x \to a} \frac{f'(x)}{g'(x)}$$

Take the derivative of the numerator and the derivative of the denominator separately, then evaluate the new limit. You can apply the rule repeatedly if you still get an indeterminate form.

Important: L'Hôpital's rule only applies when you have \(\frac{0}{0}\) or \(\frac{\infty}{\infty}\). Don't use it on a perfectly well-defined fraction just because differentiation is easier.

Example 7

$$\lim_{x \to 1} \frac{x^2 - 1}{x - 1}$$

Substituting gives \(\frac{0}{0}\). Apply L'Hôpital's:

  • Derivative of numerator: \(\frac{d}{dx}(x^2 - 1) = 2x\)
  • Derivative of denominator: \(\frac{d}{dx}(x - 1) = 1\)

$$\lim_{x \to 1} \frac{2x}{1} = 2$$

The limit is 2 — same answer as the factoring approach, as it should be.

Example 8

$$\lim_{x \to 0} \frac{\sin x}{x}$$

This is one of the most famous limits in all of calculus. You can't resolve it by factoring, but L'Hôpital's handles it cleanly. Substituting gives \(\frac{0}{0}\).

  • Derivative of \(\sin x\): \(\cos x\)
  • Derivative of \(x\): \(1\)

$$\lim_{x \to 0} \frac{\cos x}{1} = \cos(0) = 1$$

The limit is 1. This result — \(\lim_{x \to 0} \frac{\sin x}{x} = 1\) — appears constantly in calculus, especially in proving the derivative of sine.

Limits at Infinity

A limit as \(x \to \infty\) asks: as \(x\) grows without bound, what value does the function approach? This is exactly where horizontal asymptotes come from.

For rational functions, the relationship between the degrees of numerator and denominator determines the outcome:

Condition Limit as \(x \to \infty\)
Numerator degree < denominator degree 0
Numerator degree = denominator degree ratio of leading coefficients
Numerator degree > denominator degree \(\pm\infty\) (no asymptote)

Technique: Divide every term by the highest power of \(x\) in the denominator, then let the resulting fractions go to zero.

Example 9

$$\lim_{x \to \infty} \frac{3x^2 + 5}{x^2 - 2}$$

Both numerator and denominator are degree 2. Divide every term by \(x^2\):

$$\lim_{x \to \infty} \frac{3 + \frac{5}{x^2}}{1 - \frac{2}{x^2}}$$

As \(x \to \infty\), the fractions \(\frac{5}{x^2}\) and \(\frac{2}{x^2}\) both go to zero:

$$\frac{3 + 0}{1 - 0} = 3$$

The limit is 3, and the function has a horizontal asymptote at \(y = 3\).

Example 10

$$\lim_{x \to \infty} \frac{4x + 1}{x^2 + 3}$$

Numerator is degree 1, denominator is degree 2. Divide by \(x^2\):

$$\lim_{x \to \infty} \frac{\frac{4}{x} + \frac{1}{x^2}}{1 + \frac{3}{x^2}} = \frac{0 + 0}{1 + 0} = 0$$

The limit is 0 — the function approaches the x-axis.

Practice Problems

Evaluate \(\displaystyle\lim_{x \to 5}(3x - 4)\).

Show answerSubstitute directly: \(3(5) - 4 = 11\). The limit is 11.

Evaluate \(\displaystyle\lim_{x \to 2} \frac{x^2 - 4}{x - 2}\).

Show answerSubstitution gives \(\frac{0}{0}\). Factor: \(\frac{(x-2)(x+2)}{x-2} = x+2\). Substitute: \(2+2 = 4\). The limit is 4.

Evaluate \(\displaystyle\lim_{x \to 0} \frac{x^2 + 3x}{x}\).

Show answerFactor out \(x\): \(\frac{x(x+3)}{x} = x+3\). Substitute: \(0+3 = 3\). The limit is 3.

Evaluate \(\displaystyle\lim_{x \to -1} \frac{x^2 - 1}{x + 1}\).

Show answerSubstitution gives \(\frac{0}{0}\). Factor numerator: \(\frac{(x-1)(x+1)}{x+1} = x-1\). Substitute: \(-1-1 = -2\). The limit is \(-2\).

Use L'Hôpital's rule to evaluate \(\displaystyle\lim_{x \to 0} \frac{x^2}{x}\).

Show answerThis gives \(\frac{0}{0}\). Differentiate: numerator becomes \(2x\), denominator becomes \(1\). New limit: \(\frac{2(0)}{1} = 0\). The limit is 0.

Evaluate \(\displaystyle\lim_{x \to \infty} \frac{7x^2 - 3}{2x^2 + 5}\).

Show answerBoth degree 2. The limit equals the ratio of leading coefficients: \(\frac{7}{2}\).

Does \(\displaystyle\lim_{x \to 0} \frac{1}{x}\) exist? Explain.

Show answerNo. From the right, \(\frac{1}{x} \to +\infty\). From the left, \(\frac{1}{x} \to -\infty\). The one-sided limits disagree, so the two-sided limit does not exist (DNE).

You can verify any of these using our Limit Calculator.