← 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.

Functional representations: the language before the calculus

Before studying limits, you need fluency with the functions that calculus operates on. Every model in science begins with choosing the right function family.

Linear functions f(x)=mx+bf(x) = mx + b model constant rates of change. Their graphs are straight lines, and their simplicity is what derivatives approximate locally — the tangent line is a linear approximation.

Power functions f(x)=xnf(x) = x^n produce polynomial behavior. Quadratics model projectile motion, cubics model inflection-style curves. Polynomials are the most 'well-behaved' functions: continuous, differentiable, no surprises.

Exponential functions f(x)=axf(x) = a^x (especially exe^x) model growth and decay — population, radioactivity, compound interest. Their defining property: the rate of growth is proportional to the current value. This is why exe^x is its own derivative.

Logarithmic functions f(x)=loga(x)f(x) = \log_a(x) are the inverses of exponentials. lnx\ln x grows without bound, but incredibly slowly. It takes center stage in integration (1/xdx=lnx+C\int 1/x\,dx = \ln|x| + C).

Trigonometric functions sinx\sin x, cosx\cos x, tanx\tan x model periodic phenomena — waves, oscillations, circular motion. Their derivatives cycle through each other, and their limits (especially limx0sinx/x=1\lim_{x\to 0} \sin x / x = 1) are foundational.

Inverse functions reverse input and output. If f(x)=exf(x) = e^x, then f1(x)=lnxf^{-1}(x) = \ln x. For inverses to exist, ff must be one-to-one. The derivative of an inverse function satisfies (f1)(x)=1f(f1(x))(f^{-1})'(x) = \frac{1}{f'(f^{-1}(x))}.

Piecewise functions are defined by different rules on different intervals. They are the natural setting for studying one-sided limits, continuity, and differentiability — the exact concepts coming next.

Helpful?

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.

The formal ε\varepsilon-δ\delta definition makes this precise: limxaf(x)=L\lim_{x\to a} f(x) = L means for every ε>0\varepsilon > 0, there exists a δ>0\delta > 0 such that if 0<xa<δ0 < |x - a| < \delta then f(x)L<ε|f(x) - L| < \varepsilon. You pick a tolerance ε\varepsilon for the output, and the definition guarantees a tolerance δ\delta for the input that works.

Helpful?

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. This is the bridge between one-sided behavior and a 'full' limit.

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. They also arise naturally at domain boundaries — for instance, limx0+lnx=\lim_{x\to 0^+} \ln x = -\infty, and asking about the left-hand limit doesn't make sense since lnx\ln x is undefined for x<0x < 0.

Helpful?

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. This is the simplest and fastest method.

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. Compositions, sums, and products of continuous functions are also continuous.

Direct substitution fails when you get an undefined expression like 0/00/0 or /\infty/\infty. These are called indeterminate forms, and they signal that the function's behavior at that point is more complex — the limit might exist, but you need algebraic techniques or L'Hôpital's Rule to find it.

If substitution gives something like 5/05/0 (nonzero over zero), the limit doesn't exist as a finite number — the function blows up. This typically signals a vertical asymptote.

Helpful?

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.

Helpful?

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.

Helpful?

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.

Helpful?

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.

Helpful?

Evaluating limits of piecewise functions

For a piecewise function, you must check the left-hand and right-hand limits separately at each boundary point. Each side of the boundary uses a different formula.

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 additionally need f(a)=Lf(a) = L — the actual function value at the boundary must match.

Three outcomes at a boundary: (1) both sides match and equal f(a)f(a) — continuous; (2) both sides match but f(a)f(a) differs — removable discontinuity; (3) the sides disagree — jump discontinuity.

Helpful?

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. The graph shoots upward or downward near these points.

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, so always examine both sides. If the two sides have opposite signs, the graph has an asymptote going in both directions.

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

For functions like lnx\ln x, tanx\tan x, and cscx\csc x, the asymptotes come from the nature of the function rather than a denominator. For example, tanx\tan x has vertical asymptotes at x=±π/2,±3π/2,x = \pm \pi/2, \pm 3\pi/2, \ldots

Helpful?

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.

Helpful?

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 — not as a single fraction. This is not the quotient rule.

After applying the rule once, check whether the new limit is still indeterminate. If it is, apply L'Hôpital's Rule again. Repeat until you reach a form where substitution gives a definite value. For example, limx0ex1xx2\lim_{x\to 0} \frac{e^x - 1 - x}{x^2} requires two applications: the first gives ex12x\frac{e^x - 1}{2x} (still 0/00/0), and the second gives ex212\frac{e^x}{2} \to \frac{1}{2}.

Before each application, always verify the form is still 0/00/0 or /\infty/\infty. If it isn't — for instance, if the denominator approaches a nonzero constant — stop and evaluate directly. Applying L'Hôpital to a non-indeterminate form produces wrong answers.

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, then apply L'Hôpital.

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.

Helpful?

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

Frequently asked questions about limits & continuity

What is a limit in calculus?
A limit describes the value a function approaches as its input gets closer to a specific point. Limits are the foundation of both derivatives and integrals.
How do you evaluate a limit?
Start with direct substitution. If that gives an indeterminate form like 0/0, try factoring, rationalizing, or applying L'Hôpital's rule.
What is L'Hôpital's rule?
L'Hôpital's rule states that if a limit gives 0/0 or ∞/∞, you can differentiate the numerator and denominator separately and re-evaluate the limit.