Skip to content

Limits & Continuity

πŸ”’ Limits & Continuity

Limits and continuity form the rigorous foundation of all calculus. They allow us to talk about the behavior of functions β€œinfinitely close” to a point, even if the function isn’t defined there.


🟒 1. The Concept of a Limit

Definition

The limit of a function f(x)f(x) as xx approaches cc is the value LL that f(x)f(x) gets closer and closer to as xx gets closer and closer to cc (but not necessarily at cc). lim⁑xβ†’cf(x)=L\lim_{x \to c} f(x) = L

Computing Limits

  • Direct Substitution: If f(c)f(c) is defined and ff is β€œnice” (polynomial, rational, etc.), then lim⁑xβ†’cf(x)=f(c)\lim_{x \to c} f(x) = f(c).
  • Factoring and Canceling: For indeterminate forms like 00\frac{0}{0}.
    • Example: lim⁑xβ†’2x2βˆ’4xβˆ’2=lim⁑xβ†’2(xβˆ’2)(x+2)xβˆ’2=lim⁑xβ†’2(x+2)=4\lim_{x \to 2} \frac{x^2 - 4}{x - 2} = \lim_{x \to 2} \frac{(x-2)(x+2)}{x-2} = \lim_{x \to 2} (x+2) = 4.
  • Rationalization: Using the conjugate to simplify square roots.
  • L’HΓ΄pital’s Rule: (Advanced) Used for 00\frac{0}{0} or ∞∞\frac{\infty}{\infty} using derivatives.

🟑 2. Continuity

The Three-Part Definition

A function f(x)f(x) is continuous at a point cc if and only if all three of the following are true:

  1. f(c)f(c) is defined.
  2. lim⁑xβ†’cf(x)\lim_{x \to c} f(x) exists.
  3. lim⁑xβ†’cf(x)=f(c)\lim_{x \to c} f(x) = f(c).

Types of Discontinuity

  • Removable: A β€œhole” in the graph that can be filled by redefining one point.
  • Jump: The left and right limits are different (e.g., step functions).
  • Infinite: The function goes to ±∞\pm \infty at that point (e.g., 1x\frac{1}{x} at x=0x=0).

πŸ”΄ 3. The Intermediate Value Theorem (IVT)

If ff is continuous on the closed interval [a,b][a, b] and kk is any number between f(a)f(a) and f(b)f(b), then there exists at least one number cc in [a,b][a, b] such that f(c)=kf(c) = k.

Example Code: Finding a Root numerically

A common way to use IVT in programming is the Bisection Method.

def bisection(f, a, b, tol):
    if f(a) * f(b) >= 0:
        return None # IVT might not apply
    
    while (b - a) / 2.0 > tol:
        midpoint = (a + b) / 2.0
        if f(midpoint) == 0:
            return midpoint
        elif f(a) * f(midpoint) < 0:
            b = midpoint
        else:
            a = midpoint
    return (a + b) / 2.0

# Example: f(x) = x^2 - 2 (finding sqrt(2))
root = bisection(lambda x: x**2 - 2, 1, 2, 0.0001)
print(f"Approximated root: {root}")

πŸ’‘ Key Takeaways

  • Limits describe behavior near a point.
  • Continuity requires the limit to match the function value.
  • IVT guarantees β€œexistence” of values in continuous functions.