← Back to modules

Limits & Continuity

Build intuition for approaching values and continuity.

Limits are the foundation of all of calculus. Every derivative and every integral is secretly a limit. Before you can do anything else, you need to master what it means for a function to approach a value.

The notation limxaf(x)=L\lim_{x\to a} f(x) = L means: as xx gets arbitrarily close to aa, the outputs f(x)f(x) get arbitrarily close to LL. Notice we never require f(a)f(a) itself to equal LL, or even to exist.

Continuity is the special case where the limit and the actual value agree. A function is continuous when you can draw it without lifting your pen. Most functions you encounter are continuous, but the interesting calculus happens at the exceptions.

Building intuition: what does 'approaching' mean?

Imagine plugging in values of xx that get closer and closer to aa. For f(x)=(x21)/(x1)f(x) = (x^2-1)/(x-1), try x=0.9,0.99,0.999,1.001,1.01,1.1x=0.9, 0.99, 0.999, 1.001, 1.01, 1.1. You'll see the outputs cluster around 22, even though f(1)f(1) is undefined.

That clustering is the limit. Formally, limx1x21x1=2\lim_{x\to 1} \frac{x^2-1}{x-1} = 2 because the outputs can be made as close to 22 as we like by choosing xx close enough to 11.

The limit cares about the neighborhood around a point, not the point itself. This is why limits are useful: they let us analyze behavior at places where the function might break.


One-sided limits

The left-hand limit limxaf(x)\lim_{x\to a^-} f(x) only uses xx-values less than aa (approaching from the left). The right-hand limit limxa+f(x)\lim_{x\to a^+} f(x) only uses values greater than aa.

The two-sided limit limxaf(x)\lim_{x\to a} f(x) exists if and only if both one-sided limits exist and are equal.

Example: for f(x)=x/xf(x) = |x|/x, we have limx0f(x)=1\lim_{x\to 0^-} f(x) = -1 and limx0+f(x)=1\lim_{x\to 0^+} f(x) = 1. Since they disagree, the two-sided limit at 00 does not exist.

One-sided limits are essential for piecewise functions, absolute value expressions, and functions with jumps.


Evaluating limits: direct substitution

Always try direct substitution first. If ff is continuous at aa, then limxaf(x)=f(a)\lim_{x\to a} f(x) = f(a). You're done.

Polynomials, rational functions (away from zeros of the denominator), exe^x, lnx\ln x (for x>0x>0), sinx\sin x, cosx\cos x, and tanx\tan x (away from asymptotes) are all continuous on their domains.

Direct substitution fails when you get an undefined expression like 0/00/0. That's when you need the techniques below.


Indeterminate forms and algebraic tricks

The expression 0/00/0 is called indeterminate because the limit could be anything: 00, 55, \infty, or it might not exist. You must simplify.

Factor and cancel: if the numerator and denominator share a common factor like (xa)(x-a), cancel it and try substitution again.

Rationalize: when you see a square root, multiply by the conjugate. For example, x+11x\frac{\sqrt{x+1}-1}{x} times x+1+1x+1+1\frac{\sqrt{x+1}+1}{\sqrt{x+1}+1} simplifies the radical.

Combine fractions: if the expression has two fractions being subtracted, find a common denominator to combine them into a single fraction.

Use trig identities: rewrite expressions using sin2x+cos2x=1\sin^2 x + \cos^2 x = 1, double-angle formulas, or the identity 1cosx=2sin2(x/2)1-\cos x = 2\sin^2(x/2) to simplify.

1

Factoring a removable discontinuity

  1. Compute limx3x29x3\lim_{x\to 3} \frac{x^2-9}{x-3}.
  2. First, try direct substitution: plugging in x=3x=3 gives 9933=00\frac{9-9}{3-3} = \frac{0}{0}. This is indeterminate, so we need to simplify.
  3. Recognize that the numerator is a difference of squares: x29=(x3)(x+3)x^2 - 9 = (x-3)(x+3).
  4. Rewrite: (x3)(x+3)x3\frac{(x-3)(x+3)}{x-3}. Since we're taking the limit as x3x \to 3 (not evaluating at x=3x=3), x3x \neq 3, so we can cancel the (x3)(x-3) terms.
  5. After canceling: limx3(x+3)\lim_{x\to 3} (x+3).
  6. Now direct substitution works: 3+3=63 + 3 = 6.
  7. The limit is 66. The original function has a hole at x=3x=3, but the limit 'sees through' the hole to the value the function approaches.
2

Rationalizing a radical expression

  1. Compute limx01+x1x\lim_{x\to 0} \frac{\sqrt{1+x} - 1}{x}.
  2. Direct substitution: 110=00\frac{\sqrt{1}-1}{0} = \frac{0}{0}. Indeterminate.
  3. The trouble is the square root in the numerator. To eliminate it, multiply by the conjugate: 1+x1x1+x+11+x+1\frac{\sqrt{1+x}-1}{x} \cdot \frac{\sqrt{1+x}+1}{\sqrt{1+x}+1}.
  4. The numerator becomes (1+x)212=(1+x)1=x(\sqrt{1+x})^2 - 1^2 = (1+x) - 1 = x (difference of squares pattern).
  5. So the expression simplifies to xx(1+x+1)=11+x+1\frac{x}{x(\sqrt{1+x}+1)} = \frac{1}{\sqrt{1+x}+1}.
  6. Now substitute x=0x=0: 11+1=12\frac{1}{\sqrt{1}+1} = \frac{1}{2}.
  7. The limit is 12\frac{1}{2}. The conjugate trick is your go-to whenever you see somethingnumber\sqrt{\text{something}} - \text{number} in a limit.

Key trigonometric limits

These special limits appear constantly and should be memorized:

limx0sinxx=1\lim_{x\to 0} \frac{\sin x}{x} = 1. This is the most important trig limit in calculus. It's proven using the Squeeze Theorem.

limx01cosxx=0\lim_{x\to 0} \frac{1-\cos x}{x} = 0. You can derive this by multiplying by 1+cosx1+cosx\frac{1+\cos x}{1+\cos x} and using the first limit.

limx0tanxx=1\lim_{x\to 0} \frac{\tan x}{x} = 1. This follows from tanxx=sinxx1cosx\frac{\tan x}{x} = \frac{\sin x}{x} \cdot \frac{1}{\cos x}.

Generalization: limx0sin(kx)x=k\lim_{x\to 0} \frac{\sin(kx)}{x} = k for any constant kk. Factor out the kk or substitute u=kxu=kx.

Another useful limit: limx0ex1x=1\lim_{x\to 0} \frac{e^x - 1}{x} = 1. This shows up in many exponential limit problems.

1

Using the generalized sin(kx)/x limit

  1. Compute limx0sin(5x)3x\lim_{x\to 0} \frac{\sin(5x)}{3x}.
  2. This doesn't match sinxx\frac{\sin x}{x} exactly, but we can manipulate it to use the standard limit.
  3. Rewrite: sin(5x)3x=53sin(5x)5x\frac{\sin(5x)}{3x} = \frac{5}{3} \cdot \frac{\sin(5x)}{5x}. We multiplied and divided by 55 to create the form sin(stuff)stuff\frac{\sin(\text{stuff})}{\text{stuff}}.
  4. Now as x0x \to 0, the expression 5x05x \to 0 as well, so sin(5x)5x1\frac{\sin(5x)}{5x} \to 1 by the standard trig limit.
  5. Therefore: 531=53\frac{5}{3} \cdot 1 = \frac{5}{3}.
  6. Key takeaway: whenever you see sin(kx)mx\frac{\sin(kx)}{mx}, the answer is km\frac{k}{m}. Just match the argument of sin\sin with the denominator.

The Squeeze Theorem

If g(x)f(x)h(x)g(x) \leq f(x) \leq h(x) near aa, and limxag(x)=limxah(x)=L\lim_{x\to a} g(x) = \lim_{x\to a} h(x) = L, then limxaf(x)=L\lim_{x\to a} f(x) = L.

The function ff is 'squeezed' between two functions that both approach the same value, so ff has no choice but to approach that value too.

Classic example: limx0x2sin(1/x)\lim_{x\to 0} x^2 \sin(1/x). We know x2x2sin(1/x)x2-x^2 \leq x^2\sin(1/x) \leq x^2, and both x2-x^2 and x2x^2 approach 00, so the limit is 00.

The Squeeze Theorem is how we rigorously prove limx0sinxx=1\lim_{x\to 0} \frac{\sin x}{x} = 1 using geometry of the unit circle.

💡Explain it simply

Imagine you're walking between two friends on a sidewalk. Both friends are heading toward the same coffee shop. Since you're stuck between them, you have to end up at the same coffee shop too — you have no choice.

That's the Squeeze Theorem. If a wiggly, hard-to-track function is trapped between two simpler functions, and those simpler functions both go to the same place, the wiggly one must go there too.

It's especially handy when a function oscillates wildly (like sin(1/x)\sin(1/x) near zero) but is being multiplied by something that shrinks to zero (like x2x^2). The shrinking part forces everything to zero.

1

Squeeze Theorem with an oscillating function

  1. Compute limx0x2cos(1/x)\lim_{x\to 0} x^2 \cos(1/x).
  2. The problem: cos(1/x)\cos(1/x) oscillates wildly between 1-1 and 11 as x0x \to 0. We can't evaluate cos(1/0)\cos(1/0). So direct substitution is hopeless.
  3. But we know 1cos(1/x)1-1 \leq \cos(1/x) \leq 1 for all x0x \neq 0.
  4. Multiply the entire inequality by x2x^2 (which is positive, so the inequality direction stays the same): x2x2cos(1/x)x2-x^2 \leq x^2\cos(1/x) \leq x^2.
  5. Now evaluate the outer limits: limx0(x2)=0\lim_{x\to 0} (-x^2) = 0 and limx0x2=0\lim_{x\to 0} x^2 = 0.
  6. Both sides squeeze to 00, so by the Squeeze Theorem: limx0x2cos(1/x)=0\lim_{x\to 0} x^2\cos(1/x) = 0.
  7. The insight: even though cos(1/x)\cos(1/x) is chaotic, x2x^2 is shrinking to zero so fast that it forces the entire product to zero. The x2x^2 'tames' the oscillation.

Continuity

A function is continuous at x=ax=a when three conditions all hold: (1) f(a)f(a) is defined, (2) limxaf(x)\lim_{x\to a} f(x) exists, and (3) limxaf(x)=f(a)\lim_{x\to a} f(x) = f(a).

If any condition fails, we have a discontinuity. Types of discontinuity:

Removable discontinuity (hole): the limit exists but f(a)f(a) is either undefined or disagrees with the limit. Example: f(x)=(x21)/(x1)f(x) = (x^2-1)/(x-1) at x=1x=1.

Jump discontinuity: the left and right limits exist but are different. Example: f(x)=xf(x) = \lfloor x \rfloor (floor function) at every integer.

Infinite discontinuity: the function blows up to ±\pm\infty. Example: f(x)=1/xf(x) = 1/x at x=0x=0.

A function continuous on a closed interval [a,b][a,b] is guaranteed to hit every yy-value between f(a)f(a) and f(b)f(b) (Intermediate Value Theorem). This is used to prove equations have solutions.

💡Explain it simply

A continuous function is one you can draw without lifting your pen off the paper. No gaps, no jumps, no sudden teleporting.

A hole (removable discontinuity) is like a missing stepping stone in a path — the path clearly continues, but one stone is gone. A jump is like a staircase — you suddenly leap to a different height. An infinite discontinuity is like a cliff — the ground drops away forever.

The Intermediate Value Theorem is common sense: if it's 30°F in the morning and 70°F in the afternoon, at some point during the day it must have been exactly 50°F. Temperature doesn't teleport — it's continuous.


Evaluating limits of piecewise functions

For a piecewise function, you must check the left-hand and right-hand limits separately at each boundary point.

Use the piece that applies for x<ax < a to compute limxa\lim_{x\to a^-}, and the piece that applies for x>ax > a to compute limxa+\lim_{x\to a^+}.

If limxaf(x)=limxa+f(x)=L\lim_{x\to a^-} f(x) = \lim_{x\to a^+} f(x) = L, then limxaf(x)=L\lim_{x\to a} f(x) = L. For continuity, you also need f(a)=Lf(a) = L.

Example: if f(x)=x2f(x) = x^2 for x<2x < 2 and f(x)=3x2f(x) = 3x-2 for x2x \geq 2, then limx2f(x)=4\lim_{x\to 2^-} f(x) = 4 and limx2+f(x)=4\lim_{x\to 2^+} f(x) = 4, so the limit exists and equals 44. Since f(2)=4f(2)=4, the function is continuous at x=2x=2.


Infinite limits and vertical asymptotes

An infinite limit like limxaf(x)=\lim_{x\to a} f(x) = \infty means the outputs grow without bound as xx approaches aa. The limit technically does not exist as a real number, but we write \infty to describe the behavior.

Vertical asymptotes occur where the denominator approaches 00 but the numerator does not.

Check signs carefully: limx0+1/x=+\lim_{x\to 0^+} 1/x = +\infty but limx01/x=\lim_{x\to 0^-} 1/x = -\infty. The one-sided behavior can differ.

For rational functions, factor the denominator to find all vertical asymptotes. Cancel common factors first (those give removable discontinuities, not asymptotes).


Limits at infinity and horizontal asymptotes

Limits as xx\to \infty describe long-run behavior. A horizontal asymptote y=Ly=L means limxf(x)=L\lim_{x\to \infty} f(x) = L or limxf(x)=L\lim_{x\to -\infty} f(x) = L.

For rational functions p(x)q(x)\frac{p(x)}{q(x)}, compare the degrees: if deg(p)<deg(q)\deg(p) < \deg(q), the limit is 00. If deg(p)=deg(q)\deg(p) = \deg(q), the limit is the ratio of leading coefficients. If deg(p)>deg(q)\deg(p) > \deg(q), the limit is ±\pm\infty (no horizontal asymptote).

Technique: divide every term by the highest power of xx in the denominator. As xx\to \infty, terms like 1/x1/x, 1/x21/x^2, etc. all go to 00.

For expressions with radicals, factor out the dominant term. Example: limx4x2+1x=limxx4+1/x2x=2\lim_{x\to \infty} \frac{\sqrt{4x^2+1}}{x} = \lim_{x\to \infty} \frac{x\sqrt{4+1/x^2}}{x} = 2.

1

Rational function limit at infinity

  1. Compute limx2x2+3x+1x24\lim_{x\to \infty} \frac{2x^2 + 3x + 1}{x^2 - 4}.
  2. Both numerator and denominator grow without bound, so we get /\infty / \infty. We need to compare how fast each grows.
  3. Technique: divide every term by the highest power of xx in the denominator, which is x2x^2.
  4. 2x2+3x+1x24=2+3/x+1/x214/x2\frac{2x^2 + 3x + 1}{x^2 - 4} = \frac{2 + 3/x + 1/x^2}{1 - 4/x^2}.
  5. As xx \to \infty: 3/x03/x \to 0, 1/x201/x^2 \to 0, and 4/x204/x^2 \to 0.
  6. So the expression approaches 2+0+010=2\frac{2 + 0 + 0}{1 - 0} = 2.
  7. The horizontal asymptote is y=2y = 2. Quick rule: when the degrees are equal, the limit is just the ratio of the leading coefficients (2/1=22/1 = 2).

L'Hôpital's Rule

When direct substitution gives 0/00/0 or /\infty/\infty, L'Hôpital's Rule says: limxaf(x)g(x)=limxaf(x)g(x)\lim_{x\to a} \frac{f(x)}{g(x)} = \lim_{x\to a} \frac{f'(x)}{g'(x)}, provided the right-hand limit exists.

Important: differentiate the numerator and denominator separately. Do not use the quotient rule.

You may need to apply the rule multiple times if the result is still indeterminate.

For other indeterminate forms like 00 \cdot \infty, \infty - \infty, 11^\infty, 000^0, or 0\infty^0, rewrite the expression into a 0/00/0 or /\infty/\infty form first.

Example: for limx0+xlnx\lim_{x\to 0^+} x\ln x (0()0 \cdot (-\infty) form), rewrite as limx0+lnx1/x\lim_{x\to 0^+} \frac{\ln x}{1/x} (/-\infty / \infty form) and apply L'Hôpital.

💡Explain it simply

When you plug in the number and get 0/00/0, it's like asking 'what's nothing divided by nothing?' — the answer is genuinely unclear. It could be anything.

L'Hôpital's Rule says: instead of looking at the original functions, look at how fast each one is approaching zero. The one that's racing to zero faster 'wins.' Taking derivatives measures exactly that speed.

Think of two cars both approaching a finish line (zero). The question 'what's the ratio?' depends on their speeds. L'Hôpital says: compare the speedometers (derivatives) instead of the positions.

1

Applying L'Hôpital's Rule to 0/0

  1. Compute limx0ex1sinx\lim_{x\to 0} \frac{e^x - 1}{\sin x}.
  2. Direct substitution: e01sin0=00\frac{e^0 - 1}{\sin 0} = \frac{0}{0}. Indeterminate.
  3. Since both numerator f(x)=ex1f(x) = e^x - 1 and denominator g(x)=sinxg(x) = \sin x approach 00, L'Hôpital's Rule applies.
  4. Differentiate the numerator: f(x)=exf'(x) = e^x.
  5. Differentiate the denominator: g(x)=cosxg'(x) = \cos x.
  6. So limx0ex1sinx=limx0excosx\lim_{x\to 0} \frac{e^x - 1}{\sin x} = \lim_{x\to 0} \frac{e^x}{\cos x}.
  7. Now direct substitution works: e0cos0=11=1\frac{e^0}{\cos 0} = \frac{1}{1} = 1.
  8. The limit is 11. This confirms what we'd expect: near 00, both ex1e^x - 1 and sinx\sin x behave approximately like xx, so their ratio approaches 11.
2

Converting a 0 · ∞ form for L'Hôpital

  1. Compute limx0+xlnx\lim_{x\to 0^+} x \ln x.
  2. As x0+x \to 0^+: x0x \to 0 and lnx\ln x \to -\infty. So this is a 0()0 \cdot (-\infty) form — not directly eligible for L'Hôpital.
  3. Rewrite as a fraction: xlnx=lnx1/xx \ln x = \frac{\ln x}{1/x}. Now as x0+x \to 0^+, the numerator lnx\ln x \to -\infty and the denominator 1/x1/x \to \infty. This is /-\infty / \infty — L'Hôpital applies.
  4. Differentiate numerator: ddxlnx=1x\frac{d}{dx} \ln x = \frac{1}{x}.
  5. Differentiate denominator: ddx(1/x)=1x2\frac{d}{dx} (1/x) = -\frac{1}{x^2}.
  6. So limx0+lnx1/x=limx0+1/x1/x2=limx0+1/xx21=limx0+(x)=0\lim_{x\to 0^+} \frac{\ln x}{1/x} = \lim_{x\to 0^+} \frac{1/x}{-1/x^2} = \lim_{x\to 0^+} \frac{1/x \cdot x^2}{-1} = \lim_{x\to 0^+} (-x) = 0.
  7. The limit is 00. Even though lnx\ln x goes to -\infty, xx goes to 00 fast enough to win the tug-of-war.

⚠️

Common Mistakes to Avoid

  • Plugging in the value too early before simplifying an indeterminate form. Always check for 0/00/0 or /\infty/\infty first.
  • Concluding the limit does not exist just because f(a)f(a) is undefined. The function not being defined at aa says nothing about the limit.
  • Ignoring one-sided limits for piecewise functions and absolute values. You must check both sides.
  • Confusing continuity with differentiability. Continuity means no jumps or holes; differentiability means no sharp corners either. x|x| is continuous at 00 but not differentiable.
  • Forgetting to cancel common factors before declaring a vertical asymptote. A common factor means a hole, not an asymptote.
  • Using L'Hôpital's Rule when the form is not indeterminate. It only applies to 0/00/0 or /\infty/\infty.
  • Applying the quotient rule instead of differentiating numerator and denominator separately in L'Hôpital's Rule.

Worked Practice Problems (5 examples)

Study these solved examples to understand the techniques. Then head to Practice to try problems on your own.

Practice on your own →
1

Problem 1

Compute: limx3(2x+1)\lim_{x\to 3} (2x + 1)

Step-by-Step Solution

1

This is a polynomial, so we can use direct substitution.

2

Substitute x=3x = 3: 2(3)+1=6+1=72(3) + 1 = 6 + 1 = 7.

Final Answer: 77

2

Problem 2

Compute: limx2(x21)\lim_{x\to 2} (x^2 - 1)

Step-by-Step Solution

1

Since x21x^2 - 1 is a polynomial, we substitute directly.

2

221=41=32^2 - 1 = 4 - 1 = 3.

Final Answer: 33

3

Problem 3

Evaluate: limx0sin(3x)x\lim_{x\to 0} \frac{\sin(3x)}{x}

Step-by-Step Solution

1

Recall the standard limit limu0sinuu=1\lim_{u\to 0} \frac{\sin u}{u} = 1.

2

Rewrite as 3sin(3x)3x3 \cdot \frac{\sin(3x)}{3x}.

3

As x0x\to 0, let u=3x0u = 3x \to 0. So this becomes 31=33 \cdot 1 = 3.

Final Answer: 33

4

Problem 4

Compute: limx4x216x4\lim_{x\to 4} \frac{x^2 - 16}{x - 4}

Step-by-Step Solution

1

Direct substitution gives 00\frac{0}{0}, so we factor.

2

x216=(x4)(x+4)x^2 - 16 = (x-4)(x+4).

3

Cancel (x4)(x-4): limx4(x+4)=4+4=8\lim_{x\to 4}(x+4) = 4+4 = 8.

Final Answer: 88

5

Problem 5

Evaluate: limx0sin(5x)x\lim_{x\to 0} \frac{\sin(5x)}{x}

Step-by-Step Solution

1

Rewrite as 5sin(5x)5x5 \cdot \frac{\sin(5x)}{5x}.

2

Using limu0sinuu=1\lim_{u\to 0}\frac{\sin u}{u} = 1, this equals 51=55 \cdot 1 = 5.

Final Answer: 55

Ready to practice?

Test your understanding with 40 problems on limits & continuity.