Chapter 4a: Limits and Continuity
Understanding fundamental concepts in Calculus.

What happens to \(f(x)\) for values of \(x\) near 2, when \(f(x) = x^2\)?
1. Computational Approach
Let’s look at values of \(f(x)\) as \(x\) gets closer to 2.
| x | x² | x | x² |
|---|---|---|---|
| 2.1 | 4.41 | 1.9 | 3.61 |
| 2.01 | 4.0401 | 1.99 | 3.9601 |
| 2.001 | 4.004001 | 1.999 | 3.996001 |
| 2.0001 | 4.00040001 | 1.9999 | 3.99960001 |
As \(x\) approaches 2, \(f(x)\) approaches 4.
2. Graphical Approach

Observe the points on the graph of \(y=f(x)\) as \(x\) approaches 2. The y-values on the graph get closer to 4.
We write this as: \[\lim_{x \to 2} (x^2) = 4\]
Suppose \(f\) is defined near \(x = a\) (but not necessarily at \(x=a\)).
We say that \(f(x)\) approaches the limit \(L\) as \(x\) tends to \(a\), if we can make \(f(x)\) arbitrarily close to \(L\) by choosing \(x\) sufficiently close to \(a\).
We express this by writing: \[\lim_{x \to a} f(x) = L\]
Note
Key Points:
Consider the function \(f(x) = \frac{1 - x^2}{1 - x}\).
1. Is \(f(1)\) defined?
2. Guess the value of \(\lim_{x \to 1} f(x)\).
Let’s substitute values of \(x\) near 1:
| x > 1 | f(x) | x < 1 | f(x) |
|---|---|---|---|
| 1.5 | 2.5 | 0.5 | 1.5 |
| 1.1 | 2.1 | 0.9 | 1.9 |
| 1.01 | 2.01 | 0.99 | 1.99 |
| 1.001 | 2.001 | 0.999 | 1.999 |
| 1.0001 | 2.0001 | 0.9999 | 1.9999 |
As \(x\) approaches 1 from both sides, \(f(x)\) approaches 2. So, \(\lim_{x \to 1} f(x) = 2\).
Important
Even though \(f(1)\) is undefined, the limit \(\lim_{x \to 1} f(x)\) can still exist. This is a key distinction between function value and limit.
Does \(\lim_{x \to 0} \sin \left(\frac{1}{x}\right)\) exist?
Computational Approach
Let’s look at values of \(\sin(1/x)\) as \(x\) approaches 0.
| x | sin(1/x) | x | sin(1/x) |
|---|---|---|---|
| \(1/\pi\) | 0 | \(2/\pi\) | 1 |
| \(1/(2\pi)\) | 0 | \(2/(5\pi)\) | \(\approx 0.58\) |
| \(1/(3\pi)\) | 0 | \(2/(9\pi)\) | \(\approx -0.98\) |
| \(1/(4\pi)\) | 0 | \(2/(13\pi)\) | \(\approx 0.74\) |
| \(1/(5\pi)\) | 0 | \(2/(17\pi)\) | \(\approx -0.99\) |
As \(x\) approaches 0, \(f(x)\) does not settle on a single value; it oscillates infinitely between -1 and 1.
Graphical Approach

The graph oscillates wildly near \(x=0\), never settling to a single y-value.
Warning
Since \(f(x)\) does not approach a single real number as \(x \to 0\), the limit \(\lim_{x \to 0} \sin \left(\frac{1}{x}\right)\) does not exist.
Consider the function: \[ f (x) = \left\{ \begin{array}{cc} - 1 & x < 2 \\ 1 & x \geq 2 \end{array} \right. \] Is there a real number where \(f(x)\) approaches as \(x\) approaches 2?
Approaching from the Left (x < 2)
| x | f(x) |
|---|---|
| 0.5 | -1 |
| 1.9 | -1 |
| 1.99 | -1 |
| 1.999 | -1 |
| 1.9999 | -1 |
As \(x \to 2\) from the left, \(f(x) \to -1\). We write this as: \[\lim_{x \to 2^-} f(x) = -1\] This is the Left-hand Limit.
Approaching from the Right (x > 2)
| x | f(x) |
|---|---|
| 2.5 | 1 |
| 2.1 | 1 |
| 2.01 | 1 |
| 2.001 | 1 |
| 2.0001 | 1 |
As \(x \to 2\) from the right, \(f(x) \to 1\). We write this as: \[\lim_{x \to 2^+} f(x) = 1\] This is the Right-hand Limit.
Warning
Since \(\lim_{x \to 2^-} f(x) \neq \lim_{x \to 2^+} f(x)\), the limit \(\lim_{x \to 2} f(x)\) does not exist. There is no single value \(f(x)\) approaches as \(x \to 2\).
The following theorem connects the existence of a general limit to its one-sided counterparts.
Tip
Theorem 4.2.2 (Equal One-sided Limits)
\(\lim_{x \to a} f(x) = L\) if and only if \(\lim_{x \to a^-} f(x) = L\) and \(\lim_{x \to a^+} f(x) = L\).
Remark: This result is extremely useful for evaluating limits at a point \(a\) if the function has different mathematical expressions for \(x < a\) and \(x > a\) when \(x\) is near \(a\).
Example: Let \(g(x) = \left\{ \begin{array}{ll} x^2 & \text{if } 0 < x \leq 1 \\ 0.5 & \text{if } x = 0 \\ \sin x & \text{if } -1 \leq x < 0 \end{array} \right.\) Does \(\lim_{x \to 0} g(x)\) exist?
Left-hand limit: \(\lim_{x \to 0^-} g(x) = \lim_{x \to 0^-} \sin x = \sin(0) = 0\).
Right-hand limit: \(\lim_{x \to 0^+} g(x) = \lim_{x \to 0^+} x^2 = (0)^2 = 0\).
Since \(\lim_{x \to 0^-} g(x) = 0\) and \(\lim_{x \to 0^+} g(x) = 0\), both one-sided limits are equal to 0.
Therefore, by Theorem 4.2.2, \(\lim_{x \to 0} g(x) = 0\).
Let \(f\) be a function defined on both sides of \(a\), except possibly at \(a\) itself.
We write \(\lim_{x \to a} f(x) = \infty\) (or \(f(x) \to \infty\) as \(x \to a\)) if the values of \(f(x)\) can be made arbitrarily large (as large as we like) by taking \(x\) sufficiently close to \(a\) (but not equal to \(a\)).
Similarly, \(\lim_{x \to a} f(x) = -\infty\) means \(f(x)\) can be made arbitrarily negatively large.
Example 4.3.1: What is \(\lim_{x \to 0} \frac{1}{x^2}\)?
Let’s evaluate \(f(x) = \frac{1}{x^2}\) for small values of \(x\):
| x | f(x) | x | f(x) |
|---|---|---|---|
| 0.1 | 100 | -0.1 | 100 |
| 0.01 | 10,000 | -0.01 | 10,000 |
| 0.001 | 1,000,000 | -0.001 | 1,000,000 |
| 0.0001 | 10^8 | -0.0001 | 10^8 |
As \(x\) becomes close to 0, \(\frac{1}{x^2}\) becomes very large.

The graph shows that as \(x\) approaches 0 from either side, \(y\) increases without bound.
Note
The limit \(\lim_{x \to 0} \frac{1}{x^2}\) technically does not exist in terms of a finite real number. However, to describe this specific “blow-up” behavior, we write: \[\lim_{x \to 0} \frac{1}{x^2} = \infty\]
The vertical line \(x = a\) is called a vertical asymptote of the curve \(y = f(x)\) if at least one of the following statements is true:
\[ \begin{array}{lll} \lim_{x \to a} f(x) = \infty & \lim_{x \to a^-} f(x) = \infty & \lim_{x \to a^+} f(x) = \infty \\ \lim_{x \to a} f(x) = -\infty & \lim_{x \to a^-} f(x) = -\infty & \lim_{x \to a^+} f(x) = -\infty \end{array} \]
Examples of Vertical Asymptotes:
(As seen in the previous slide, \(\lim_{x \to 0} \frac{1}{x^2} = \infty\))
(Think about the unit circle or the graph of tangent; it “blows up” at these points)
(The natural logarithm is only defined for \(x>0\), and as \(x \to 0^+\), \(\ln x \to -\infty\))

Let \(f(x)\) be a function defined on some interval \((a, \infty)\) (for large positive \(x\)) or \((-\infty, a)\) (for large negative \(x\)).
We write \(\lim_{x \to \infty} f(x) = L\) (or \(\lim_{x \to -\infty} f(x) = L\)) if the values of \(f(x)\) can be made as close to \(L\) as we like by taking \(x\) sufficiently large (or sufficiently negatively large).
Example 4.4.1: For the function \(f(x) = \frac{1}{x}\), what happens to the values of \(f(x)\) as \(x\) increases to large positive values?
| x | f(x) |
|---|---|
| 10 | 0.1 |
| 100 | 0.01 |
| 1,000 | 0.001 |
| 10,000 | 0.0001 |
| … | … |
| \(10^N\) | \(10^{-N}\) |
As \(x \to \infty\), \(f(x)\) approaches 0. \[\lim_{x \to \infty} \frac{1}{x} = 0\]

The graph shows that as \(x\) gets very large (positive or negative), \(y\) approaches 0. Similarly, \(\lim_{x \to -\infty} \frac{1}{x} = 0\).
The horizontal line \(y = b\) is called a horizontal asymptote of the curve \(y = f(x)\) if:
\[ \lim_{x \to \infty} f(x) = b \quad \text{or} \quad \lim_{x \to -\infty} f(x) = b. \]
Examples of Horizontal Asymptotes:
The horizontal line \(y = 0\) (the \(x\)-axis) is a horizontal asymptote of \(y = \frac{1}{x^n}\).
(As \(x\) goes to positive infinity, \(e^x\) goes to infinity, so no horizontal asymptote there)
(These functions either oscillate, grow infinitely large, or are undefined for large negative values)
Limit laws simplify the evaluation of complex limits by breaking them down into simpler components.
Important
Theorem 4.5.1 (Basic Limits)
Theorem 4.5.2 (Arithmetic of Limits)
Example 4.5.3:
Important
Theorem 4.5.4 (Product and Power Laws)
Example 4.5.5:
Important
Theorem 4.5.6 (Quotient Law)
Example 4.5.7:
Tip
All the above Limit Laws hold for one-sided limits (\(\lim_{x \to a^+}\), \(\lim_{x \to a^-}\)) and limits at infinity (\(\lim_{x \to \infty}\), \(\lim_{x \to -\infty}\)).
Important
Theorem 4.5.9: For a polynomial \(p(x) = a_n x^n + a_{n-1} x^{n-1} + \dots + a_1 x + a_0\),
we have \(\lim_{x \to a} p(x) = p(a)\).
This means we can simply substitute the value of \(a\) into the polynomial \(p(x)\) to obtain the limit of \(p(x)\) at \(a\).
Example 4.5.10:
\(\lim_{x \to 1}\left(2x^5 -\pi x^3 +\frac{1}{9} x - \sqrt{5}\right) = 2(1)^5 - \pi(1)^3 + \frac{1}{9}(1) - \sqrt{5} = 2 - \pi +\frac{1}{9} -\sqrt{5}.\)
A function \(f(x)\) is a rational function if it is a quotient of two polynomials, i.e., \(f(x) = \frac{p(x)}{q(x)}\).
Important
Theorem 4.5.11: If \(f(x) = \frac{p(x)}{q(x)}\) and \(a\) is such that \(q(a) \neq 0\), then: \[ \lim_{x \to a} \frac{p(x)}{q(x)} = \frac{p(a)}{q(a)}. \]
Again, we can simply substitute \(a\) into the function, provided the denominator is not zero.
Example 4.5.12:
Evaluate \(\lim_{x \to 3}\frac{3x + 6}{x^2 - 4}\).
Here, \(p(x) = 3x+6\) and \(q(x) = x^2-4\).
Since \(q(3) = 3^2 - 4 = 9 - 4 = 5 \neq 0\), we can substitute:
\(\lim_{x \to 3}\frac{3x + 6}{x^2 - 4} = \frac{3(3) + 6}{3^2 - 4} = \frac{9 + 6}{9 - 4} = \frac{15}{5} = 3\).
We cannot apply direct substitution to find limits like: \[ \lim_{x \to 3} \frac{x^2 - 2x - 3}{x^2 - 9} \] Why?
Because if we substitute \(x=3\) into the denominator, we get \(3^2 - 9 = 9 - 9 = 0\).
Similarly, substituting \(x=3\) into the numerator gives \(3^2 - 2(3) - 3 = 9 - 6 - 3 = 0\).
This gives us the indeterminate form \(\frac{0}{0}\).
Warning
In general, we cannot simply substitute values of \(a\) directly into the function \(f(x)\) to obtain the limit of \(f(x)\) at \(a\). Such substitution holds when the functions involved are continuous at \(a\). We shall discuss this concept of continuity in the next section.
Most functions you’ve encountered in pre-university math are “nice” in the sense that their graphs are continuous.
Such functions allow us to substitute the value \(c\) directly into \(f(x)\) to evaluate \(\lim_{x \to c} f(x)\).
This “niceness” has a mathematical name: continuity at \(x = c\).
Important
Definition 4.6.1 (Continuity at a Point)
Let \(f\) be a function defined on an interval \(I\) and let \(c\) be an interior point of \(I\). We say that \(f\) is continuous at \(x = c\) if \[ \lim_{x \to c} f(x) = f(c). \]
In words, this definition means three things must be true for \(f\) to be continuous at \(x = c\):
Tip
Continuity at \(x=c\) means we can interchange the order of “lim” and “f”:
\(\lim_{x \to c} f(x) = f(\lim_{x \to c} x) = f(c)\).
Many common functions are continuous on their natural domains.
Note
Basic Functions Continuous on their Domains:
Polynomials, rational functions (where denominator \(\neq 0\)), \(\sqrt[n]{x}\), \(\sin x\), \(\cos x\), \(\tan x\) (where defined), \(e^x\), and \(\ln x\) (where defined) are continuous at every point in their domain.
Since these functions are continuous, their limits can be found by direct substitution:
Example 4.6.2:
To check if a function \(f\) is continuous at \(x = c\), we must verify all three conditions:
Example 4.6.4:
Consider \(f(x) = \frac{1 - x^2}{1 - x}\). Is \(f\) continuous at \(x = 1\)?
\(f(1)\) is defined? No, \(f(1) = \frac{0}{0}\) (undefined).
Therefore, \(f\) is not continuous at \(x = 1\).
(Note: We previously found \(\lim_{x \to 1} f(x) = 2\), so (ii) exists, but (i) fails.)
Example 4.6.5:
Let \(f: \mathbb{R} \to \mathbb{R}\) be defined by \(f(x) = \left\{ \begin{array}{ll} 1 & \text{for } x = 2 \\ 0 & \text{for } x \neq 2 \end{array} \right.\). Is \(f\) continuous at \(x = 2\)?
\(f(2)\) is defined? Yes, \(f(2) = 1\).
\(\lim_{x \to 2} f(x)\) exists?
As \(x \to 2\) from left or right, \(x \neq 2\), so \(f(x) = 0\). Thus, \(\lim_{x \to 2} f(x) = 0\).
\(f(2) = \lim_{x \to 2} f(x)\)? No, \(1 \neq 0\).
Therefore, \(f\) is not continuous at \(x = 2\). This is a removable discontinuity (a “point discontinuity”).
Example 4.6.6:
Let \(f(x) = \left\{ \begin{array}{ll} \sin \frac{1}{x} & \text{for } x \neq 0 \\ 1 & \text{for } x = 0 \end{array} \right.\). Is \(f\) continuous at \(x = 0\)?
\(f(0)\) is defined? Yes, \(f(0) = 1\).
\(\lim_{x \to 0} f(x)\) exists? No, as seen before, \(\lim_{x \to 0} \sin \frac{1}{x}\) does not exist.
Therefore, \(f\) is not continuous at \(x = 0\). This is an oscillating discontinuity.
Sometimes, a function is continuous only from one side at a boundary point of its domain.
Important
Definition 4.7.1 (One-sided Continuity)
Example 4.7.2: Discuss the continuity of the Heaviside function \(H\) at \(x = 0\): \[ H(x) = \left\{ \begin{array}{ll} 0 & \text{for } x < 0 \\ 1 & \text{for } x \geq 0 \end{array} \right. \]
Therefore, \(H(x)\) is not continuous at \(x = 0\).
One-sided continuity check:
Continuous from the right? \(\lim_{x \to 0^+} H(x) = 1\) and \(H(0) = 1\). Since \(\lim_{x \to 0^+} H(x) = H(0)\), \(H\) is continuous from the right at \(x = 0\).
Continuous from the left? \(\lim_{x \to 0^-} H(x) = 0\) and \(H(0) = 1\). Since \(\lim_{x \to 0^-} H(x) \neq H(0)\), \(H\) is not continuous from the left at \(x = 0\).
Just like limit laws, continuity has properties that apply to combinations of functions.
Important
If \(f\) and \(g\) are continuous at \(x = c\), then the following combinations are also continuous at \(x = c\):
Proof Sketch (for Sum/Difference): \[ \begin{aligned} \lim_{x \to c} (f \pm g)(x) &= \lim_{x \to c} f(x) \pm \lim_{x \to c} g(x) & \text{(by Limit Law 2)} \\ &= f(c) \pm g(c) & \text{(since } f, g \text{ are continuous at } c) \\ &= (f \pm g)(c) & \text{(by definition of sum/difference)} \end{aligned} \] This matches the definition of continuity at \(c\).
Example 4.8.1:
Evaluate \(\lim_{x \to 1}\left(x^{-2} - 4x^{1 / 7} - 5x^5 +\sqrt{2} x + \pi\right)\).
Each term (\(x^{-2}\), \(4x^{1/7}\), \(5x^5\), \(\sqrt{2}x\), \(\pi\)) is continuous at \(x = 1\).
Therefore, the entire function (a sum/difference of continuous functions) is continuous at \(x = 1\).
So, we can evaluate by direct substitution: \[ \begin{aligned} &= 1^{-2} - 4(1^{1/7}) - 5(1^5) + \sqrt{2}(1) + \pi \\ &= 1 - 4 - 5 + \sqrt{2} + \pi \\ &= -8 + \sqrt{2} + \pi. \end{aligned} \]
The limit law for composite functions requires the outermost function to be continuous.
Important
Theorem 4.8.2 (Limit of Composite Functions)
Suppose that \(\lim_{x \to c} g(x) = b\) and \(f\) is continuous at \(b\).
Then \[ \lim_{x \to c} f(g(x)) = \lim_{y \to b} f(y) = f(b). \] That is, \(\lim_{x \to c} f(g(x)) = f\left(\lim_{x \to c} g(x)\right) = f(b)\).
This theorem says we can interchange the order of taking the limit and applying the function \(f\) (we can “bring the limit inside” \(f(\cdot)\)).
Corollary 4.8.3 (Applications):
Example 4.8.4:
The following functions are continuous at the specified \(x = c\). Hence, the limits can be evaluated by direct substitution.