Calculus I

2.4 Continuity: Understanding the Flow of Functions

Imron Rosyadi

Continuity in Calculus

A Smooth Journey Through Functions

What is Continuity?

Connecting the Dots

Functions are everywhere in science and engineering. But how do we know if a function’s behavior is predictable and “well-behaved”? This is where continuity comes in.

Note

A function is continuous if its graph can be drawn without lifting your pencil from the paper. It means there are no breaks, jumps, or holes.

Continuity at a Point

The Three Conditions

For a function \(f(x)\) to be continuous at a specific point \(x=a\), three crucial conditions must be met:

  1. \(f(a)\) is defined.
    • The function must have a value at \(x=a\). No holes allowed!
  2. \(\lim_{x \to a} f(x)\) exists.
    • The limit of the function as \(x\) approaches \(a\) from both the left and right must be the same (and a finite number). No breaks or jumps!
  3. \(\lim_{x \to a} f(x) = f(a)\).
    • The limit value must be equal to the function’s value at that point. No detached points!

Visualizing Discontinuity: Condition 1 Failure

Hole in the Graph

Here, \(f(a)\) is undefined. The limit might exist, but the function value itself is missing.

graph TD
    A[Function defined at a point?] -->|No| B(Discontinuous!)
    B --> C{"Example: 
    $$f(x) = (x^2 - 4) / (x - 2)$$ 
    at x=2"};
    C --> D["$$f(2)$$ is undefined (0/0)"];
    D --> E[Graph has a hole at x=2];

Condition 1 Failure: Example

Let’s examine \(f(x) = \frac{x^2 - 4}{x - 2}\) at \(x=2\).

  1. Is \(f(2)\) defined?

    • \(f(2) = \frac{2^2 - 4}{2 - 2} = \frac{0}{0}\).
    • This is an indeterminate form, meaning \(f(2)\) is undefined.

This function is discontinuous at \(x=2\) because the first condition is not met.

Important

Even if the limit exists, the function value must also exist for continuity.

Pyodide Example: Condition 1

We can use Python to verify this.

Visualizing Discontinuity: Condition 2 Failure

Jump in the Graph

Here, \(f(a)\) might be defined, but the limit \(\lim_{x \to a} f(x)\) does not exist. This often happens with piecewise functions.

graph TD
    A[Function defined at a point?] -->|Yes| B[Does the limit exist?]
    B -->|No| C(Discontinuous!)
    C --> D{Example: Piecewise function 
    at junction point};
    D --> E[LHS limit ≠  RHS limit];
    E --> F[Graph has a jump at x=a];

Condition 2 Failure: Example

Consider the piecewise function:

\(f(x) = \begin{cases} -x^2+4 & \text{if } x \le 3 \\ 4x-8 & \text{if } x > 3 \end{cases}\)

at \(x=3\).

  1. Is \(f(3)\) defined?
    • \(f(3) = -(3^2) + 4 = -9 + 4 = -5\). Yes, it’s defined.
  2. Does \(\lim_{x \to 3} f(x)\) exist?
    • \(\lim_{x \to 3^-} f(x) = \lim_{x \to 3^-} (-x^2+4) = -(3^2)+4 = -5\).
    • \(\lim_{x \to 3^+} f(x) = \lim_{x \to 3^+} (4x-8) = 4(3)-8 = 12-8 = 4\).
    • Since \(-5 \neq 4\), \(\lim_{x \to 3} f(x)\) does not exist.

This function is discontinuous at \(x=3\) due to a jump.

Pyodide Example: Condition 2

Test the piecewise function’s limits.

Visualizing Discontinuity: Condition 3 Failure

Detached Point

In this case, \(f(a)\) is defined, \(\lim_{x \to a} f(x)\) exists, but they are not equal.

graph TD
    A[Function defined at a point?] -->|Yes| B[Does the limit exist?]
    B -->|Yes| C["Is limit = f(a)?"]
    C -->|No| D(Discontinuous!)
    D --> E{Example: Point defined 
    separately from curve};

Condition 3 Failure: Example

Consider the function:

\(f(x) = \begin{cases} \frac{\sin x}{x} & \text{if } x \neq 0 \\ 2 & \text{if } x = 0 \end{cases}\)

at \(x=0\).

  1. Is \(f(0)\) defined?

    • \(f(0) = 2\). Yes, it’s defined.
  2. Does \(\lim_{x \to 0} f(x)\) exist?

    • We know \(\lim_{x \to 0} \frac{\sin x}{x} = 1\). Yes, the limit exists.
  3. Is \(\lim_{x \to 0} f(x) = f(0)\)?

    • \(1 \neq 2\). No, they are not equal.

This function is discontinuous at \(x=0\) because the third condition is violated.

Pyodide Example: Condition 3

Confirm the limit and function value using math.sin.

Summary of Continuity at a Point

Conditions for Continuity at \(x=a\):

  1. \(f(a)\) is defined.
  2. \(\lim_{x \to a} f(x)\) exists.
  3. \(\lim_{x \to a} f(x) = f(a)\).

Tip

All three must hold true for \(f(x)\) to be continuous at \(a\).

When \(f(x)\) is NOT continuous at \(x=a\):

  • Hole: \(f(a)\) undefined.
  • Jump: \(\lim_{x \to a} f(x)\) does not exist (left and right limits differ).
  • Detached Point: \(f(a)\) is defined and \(\lim_{x \to a} f(x)\) exists, but they are not equal.

Types of Discontinuities

Discontinuities can be further classified into common categories:

  1. Removable Discontinuity:

    • Occurs when \(\lim_{x \to a} f(x)\) exists but \(f(a)\) is either undefined or \(f(a) \neq \lim_{x \to a} f(x)\).
    • Looks like a “hole” in the graph that could theoretically be filled.
  2. Jump Discontinuity:

    • Occurs when \(\lim_{x \to a^-} f(x)\) and \(\lim_{x \to a^+} f(x)\) both exist but are not equal.
    • The graph “jumps” from one value to another.
  3. Infinite Discontinuity:

    • Occurs when \(\lim_{x \to a^-} f(x)\) or \(\lim_{x \to a^+} f(x)\) (or both) approach \(\pm \infty\).
    • Typically seen at vertical asymptotes.

Diagram: Types of Discontinuities

graph TD
    A[Discontinuity at x=a] --> B{"Does $$lim(x->a) f(x)$$ exist?"};
    B -->|"Yes| C{Is f(a) defined and equal to limit?"};
    C -->|No| D(Removable Discontinuity);
    B -->|No| E{Do one-sided limits exist but are unequal?};
    E -->|Yes| F(Jump Discontinuity);
    E -->|No| G("Infinite Discontinuity - at 
    least one one-sided 
    limit is +/- infinity");

Example: Classifying Discontinuities

Let’s classify the discontinuity of \(f(x) = \frac{x+2}{x+1}\) at \(x=-1\).

  1. Is \(f(-1)\) defined?

    • \(f(-1) = \frac{-1+2}{-1+1} = \frac{1}{0}\), which is undefined. So, it’s discontinuous.
  2. What about the limit?

    • \(\lim_{x \to -1^-} \frac{x+2}{x+1}\): approaches \(\frac{1}{0^-}\), which is \(-\infty\).
    • \(\lim_{x \to -1^+} \frac{x+2}{x+1}\): approaches \(\frac{1}{0^+}\), which is \(+\infty\).

Since both one-sided limits approach \(\pm \infty\), this is an Infinite Discontinuity.

Continuity over an Interval

Expanding our concept from a point to an interval.

  • Continuous on an Open Interval \((a,b)\):

    • A function is continuous on \((a,b)\) if it is continuous at every single point \(x\) in that interval.
  • Continuous from the Right at \(a\):

    • \(\lim_{x \to a^+} f(x) = f(a)\).
    • The function approaches the point \(f(a)\) from the right side.
  • Continuous from the Left at \(b\):

    • \(\lim_{x \to b^-} f(x) = f(b)\).
    • The function approaches the point \(f(b)\) from the left side.
  • Continuous on a Closed Interval \([a,b]\):

    • Requires continuity on the open interval \((a,b)\), plus continuity from the right at \(a\) and continuity from the left at \(b\).

Example: Continuity on an Interval

State the interval(s) over which \(f(x)=\sqrt{4-x^2}\) is continuous.

  1. Domain: For \(\sqrt{4-x^2}\) to be real, we need \(4-x^2 \ge 0\).

    • \(x^2 \le 4 \implies -2 \le x \le 2\).
    • The domain is \([-2, 2]\).
  2. Continuity within the Open Interval \((-2,2)\):

    • The square root function is continuous wherever its argument is non-negative.
    • For \(x \in (-2,2)\), \(4-x^2 > 0\), so \(f(x)\) is continuous there.
  3. Continuity at Endpoints:

    • At \(x=-2\): We need \(\lim_{x \to -2^+} \sqrt{4-x^2} = f(-2)\).
      • \(f(-2) = \sqrt{4 - (-2)^2} = \sqrt{0} = 0\).
      • \(\lim_{x \to -2^+} \sqrt{4-x^2} = \sqrt{4 - (-2)^2} = 0\). (Continuous from the right)
    • At \(x=2\): We need \(\lim_{x \to 2^-} \sqrt{4-x^2} = f(2)\).
      • \(f(2) = \sqrt{4 - 2^2} = \sqrt{0} = 0\).
      • \(\lim_{x \to 2^-} \sqrt{4-x^2} = \sqrt{4 - 2^2} = 0\). (Continuous from the left)

Therefore, \(f(x)\) is continuous over the closed interval \([-2, 2]\).

Theorems on Continuity

Power of Knowing Continuity

Knowing a function is continuous allows us to use powerful theorems that simplify calculations and predict behavior.

  • Continuity of Polynomials and Rational Functions:

    • Polynomials are continuous everywhere.
    • Rational functions are continuous at every point in their domain.
  • Composite Function Theorem:

    • If \(g(x)\) is continuous at \(a\), and \(f(x)\) is continuous at \(g(a)\), then the composite function \(F(x) = f(g(x))\) is continuous at \(a\).
    • Essentially, “a continuous function of a continuous function is continuous.”
  • Continuity of Trigonometric Functions:

    • Trigonometric functions (sine, cosine) are continuous over their entire domains. (e.g., \(\sin(x)\) and \(\cos(x)\) are continuous everywhere).

Pyodide Example: Composite Function Theorem

Evaluate \(\lim_{x \to \pi/2} \cos(x - \pi/2)\).

Using the Composite Function Theorem: Let \(g(x) = x - \pi/2\) and \(f(u) = \cos(u)\).

  1. Is \(g(x)\) continuous at \(x=\pi/2\)?

    • Yes, \(g(x)\) is a polynomial (linear function), so it’s continuous everywhere.
    • \(\lim_{x \to \pi/2} g(x) = \pi/2 - \pi/2 = 0\).
  2. Is \(f(u)\) continuous at \(u=g(\pi/2)=0\)?

    • Yes, \(\cos(u)\) is a trigonometric function, continuous everywhere.

Therefore, we can apply the theorem: \(\lim_{x \to \pi/2} \cos(x - \pi/2) = \cos(\lim_{x \to \pi/2} (x - \pi/2)) = \cos(0) = 1\).

The Intermediate Value Theorem (IVT)

Guaranteeing Values

The IVT applies to continuous functions over a closed interval and guarantees the existence of certain function values.

Theorem Statement: Let \(f\) be continuous over a closed, bounded interval \([a,b]\). If \(z\) is any real number between \(f(a)\) and \(f(b)\), then there exists at least one number \(c\) in \([a,b]\) such that \(f(c) = z\).

graph TD
    A[Function f is continuous] --> B{"Over closed interval [a,b]"};
    B --> C{"Choose any z between f(a) and f(b)"};
    C --> D["IVT guarantees a 'c' in [a,b]"];
    D --> E["Such that f(c) = z"];

IVT Case Study: Finding Zeros

Real-World Application

A common application of IVT is to show that an equation has a solution (or a function has a zero) within a given interval.

Problem: Show that \(f(x) = x - \cos x\) has at least one zero.

  1. Is \(f(x)\) continuous?

    • \(x\) is continuous everywhere. \(\cos x\) is continuous everywhere.
    • Differences of continuous functions are continuous.
    • So, \(f(x)\) is continuous everywhere.
  2. Find an interval \([a,b]\) where \(f(a)\) and \(f(b)\) have opposite signs.

    • Let \(a=0\): \(f(0) = 0 - \cos(0) = -1\). (Negative)
    • Let \(b=\pi/2\): \(f(\pi/2) = \pi/2 - \cos(\pi/2) = \pi/2 - 0 \approx 1.57\). (Positive)

Since \(f(0) < 0\) and \(f(\pi/2) > 0\), and \(f(x)\) is continuous on \([0, \pi/2]\), the IVT guarantees there exists a \(c \in [0, \pi/2]\) such that \(f(c) = 0\).

IVT Pitfalls: When it Does NOT Apply

Pitfall 1: Discontinuity

  • For \(f(x) = 1/x\), \(f(-1)=-1\) and \(f(1)=1\).
  • \(f(x)\) changes sign, but does it have a zero in \([-1,1]\)? No.
  • Why? \(f(x)\) is not continuous on \([-1,1]\) because of an infinite discontinuity at \(x=0\).

Caution

Continuity over the entire closed interval is a non-negotiable condition for IVT.

Pitfall 2: Only Guarantees Existence

  • If \(f(0) > 0\) and \(f(2) > 0\), can we conclude \(f(x)\) has no zeros in \([0,2]\)? No.
  • Consider \(f(x)=(x-1)^2+0.1\). \(f(0)=1.1 > 0\), \(f(2)=1.1 > 0\). No zeros.
  • Consider \(g(x) = (x-1)\). \(g(0)=-1\), \(g(2)=1\). Zero at \(x=1\).
  • Or \(h(x)=(x-0.5)(x-1.5)\). \(h(0)=0.75\), \(h(2)=0.75\). Zeros at \(x=0.5, 1.5\).

Warning

The IVT only guarantees existence, not non-existence or uniqueness.

Contemporary Relevance: Engineering and Physics

Continuity is not just abstract math; it’s fundamental to modeling the real world.

  • Fluid Dynamics: The flow of water is generally assumed to be continuous. Discontinuities would imply cavitation or sudden changes that break physical laws.
  • Control Systems: For a robot arm to move smoothly, the functions describing its joint angles and positions must be continuous. Discontinuities would lead to jerky, unpredictable movements.
  • Signal Processing: Sound waves and electrical signals are often modeled as continuous functions. Sudden, non-continuous changes would represent distortion or noise.
  • Computer Graphics: Smooth animations and realistic object rendering rely on continuous functions to describe curves and surfaces.

Summary and Key Takeaways

Building a Strong Foundation

  • Continuity at a Point: Three conditions must be met: \(f(a)\) defined, limit exists, and limit equals \(f(a)\).
  • Types of Discontinuities: Identifiable breaks like removable (holes), jump, and infinite (asymptotes).
  • Continuity over Intervals: Extends point continuity, with special attention to endpoints for closed intervals.
  • Powerful Theorems: Polynomials, rational functions, and trigonometric functions have inherent continuity properties. The Composite Function Theorem simplifies complex limits.
  • Intermediate Value Theorem (IVT): Guarantees the existence of values for continuous functions over closed intervals, crucial for finding roots and understanding behaviors.

Note

Continuity is more than just smooth graphs; it underpins the predictability and tractability of functions in calculus and beyond.