Calculus

Limits Explained: Substitution, Factoring and L'Hôpital's Rule

By Math Solving Space · · 2 min read

On this page
  1. Step 1: Try direct substitution
  2. Step 2: 0/0 means "do more work"
  3. Step 3: L'Hôpital's rule
  4. Limits at infinity
  5. When a limit does not exist
  6. Common mistakes
  7. Practice questions
  8. Frequently asked questions

A limit is the value a function approaches as xx gets close to some number, whether or not the function is defined there. Try direct substitution first. If that gives 00\frac{0}{0}, factor and cancel or use L'Hôpital's rule. For limits at infinity, compare the highest powers.

Step 1: Try direct substitution

If the function is continuous at the point, just plug it in:

lim⁡x→3(x2+1)=9+1=10\lim_{x \to 3} (x^2 + 1) = 9 + 1 = 10

Polynomials, sin⁡\sin, cos⁡\cos and exe^x are continuous everywhere, so substitution always works for them.

Step 2: 0/0 means "do more work"

lim⁡x→2x2−4x−2\lim_{x \to 2} \frac{x^2 - 4}{x - 2}

Substituting gives 00\frac{0}{0}, which is indeterminate: it does not mean the limit fails to exist, only that you need another method.

Factor and cancel:

x2−4x−2=(x−2)(x+2)x−2=x+2(x≠2)\frac{x^2 - 4}{x - 2} = \frac{(x-2)(x+2)}{x-2} = x + 2 \quad (x \ne 2)

So the limit is 2+2=42 + 2 = 4. The graph is the line y=x+2y = x + 2 with a hole at x=2x = 2.

Step 3: L'Hôpital's rule

If substitution gives 00\frac{0}{0} (or ∞∞\frac{\infty}{\infty}), differentiate the top and bottom separately:

lim⁡x→af(x)g(x)=lim⁡x→af′(x)g′(x)\lim_{x \to a}\frac{f(x)}{g(x)} = \lim_{x \to a}\frac{f'(x)}{g'(x)}

The famous one:

lim⁡x→0sin⁡xx=lim⁡x→0cos⁡x1=1\lim_{x \to 0}\frac{\sin x}{x} = \lim_{x \to 0}\frac{\cos x}{1} = 1

Applying it twice:

lim⁡x→01−cos⁡xx2=lim⁡x→0sin⁡x2x=lim⁡x→0cos⁡x2=12\lim_{x \to 0}\frac{1 - \cos x}{x^2} = \lim_{x \to 0}\frac{\sin x}{2x} = \lim_{x \to 0}\frac{\cos x}{2} = \frac{1}{2}

Limits at infinity

For a rational function, compare the highest powers of xx:

Degrees Limit as x→∞x \to \infty
Top < bottom 00
Top = bottom Ratio of leading coefficients
Top > bottom ±∞\pm\infty
lim⁡x→∞3x2+1x2−5=31=3\lim_{x \to \infty}\frac{3x^2 + 1}{x^2 - 5} = \frac{3}{1} = 3

When a limit does not exist

lim⁡x→01x\lim_{x \to 0}\frac{1}{x} does not exist: from the right the values shoot up to +∞+\infty, from the left down to −∞-\infty. A two-sided limit only exists if both sides agree.

Common mistakes

  • Saying "the limit is undefined" as soon as you see 00\frac{0}{0}.
  • Using L'Hôpital's rule when substitution already gives a number.
  • Forgetting to check both sides for piecewise or 1x\frac{1}{x}-type functions.

Practice questions

  1. lim⁡x→1x2−1x−1\lim_{x \to 1}\frac{x^2 - 1}{x - 1}
  2. lim⁡x→∞5x+2x2\lim_{x \to \infty}\frac{5x + 2}{x^2}
  3. lim⁡x→0ex−1x\lim_{x \to 0}\frac{e^x - 1}{x}

Answers: 1) 22 2) 00 3) 11

The limit calculator tries substitution, then L'Hôpital's rule, and checks the answer by approaching from both sides. It uses the same differentiation engine as the derivative calculator. See also derivatives for beginners.

Frequently asked questions

Is 0/0 equal to 0 or 1?

Neither. 0/0 is indeterminate: the limit could be any number, or not exist, depending on the functions.

Can a function have a limit where it is undefined?

Yes. (x² − 4)/(x − 2) is undefined at x = 2, but its limit there is 4.

When can I use L'Hôpital's rule?

Only when direct substitution gives 0/0 or ∞/∞, and the derivatives exist near the point.

Open the calculator →

#calculus#limits