Continuity

The three-part continuity check

A function ff is continuous at x=ax = a when all three of these hold:

  1. f(a)f(a) is defined.
  2. lim⁡x→af(x)\lim_{x \to a} f(x) exists, meaning the left-hand and right-hand limits are equal.
  3. That limit equals f(a)f(a).

Each kind of discontinuity is a different one of these failing:

Kinds of discontinuity and the condition each one breaks
TypeWhat failsExample
JumpLeft and right limits exist but differ⌊x⌋\lfloor x \rfloor at any integer
RemovableThe limit exists but f(a)f(a) is missing or differentx2−1x−1\dfrac{x^2 - 1}{x - 1} at x=1x = 1
InfiniteThe function grows without bound1x\dfrac{1}{x} at x=0x = 0
One graph with three trouble spots: a jump at x equals 2 where the left and right limits differ, a removable gap at x equals 5 where the limit exists but the point is missing, and a corner at x equals 7.5 where the graph is continuous but not differentiable.257.5jumpremovablecornerf(5) defined elsewhere
A jump at x = 2, a removable gap at x = 5 (the curve's point is missing and f(5) sits elsewhere) and a corner at x = 7.5. The corner is continuous; it fails only differentiability.

Worked example: choosing a constant for continuity

Find kk so that f(x)={kx+1,x≤23x−1,x>2f(x) = \begin{cases} kx + 1, & x \le 2 \\ 3x - 1, & x > 2 \end{cases} is continuous at x=2x = 2.

Solution: f(2)=2k+1f(2) = 2k + 1, which is also the left-hand limit. The right-hand limit is 3(2)−1=53(2) - 1 = 5. For continuity they must match:

2k+1=5  ⇒  k=22k + 1 = 5 \;\Rightarrow\; k = 2

A function can be continuous but not differentiable

A function is continuous at a point if there's no break or jump there, but it's only differentiable at that point if the slope approaching from the left matches the slope approaching from the right. The left-hand derivative is:

f′(a−)=lim⁡h→0−f(a+h)−f(a)hf'(a^-) = \lim_{h \to 0^-} \dfrac{f(a+h) - f(a)}{h}

Worked example

Find the left-hand derivative of f(x)=∣x∣f(x) = |x| at x=0x = 0.

Solution: Just to the left of 0, x<0x < 0, so f(x)=∣x∣=−xf(x) = |x| = -x. Differentiating this piece:

f′(x)=−1for x<0f'(x) = -1 \quad \text{for } x < 0

So the left-hand derivative at x=0x=0 is -1. (The right-hand derivative there is +1+1, since f(x)=xf(x)=x for x>0x>0, the two don't match, which is exactly why ∣x∣|x| is continuous at 0 but has a sharp corner there instead of a smooth tangent.)

A function can only be continuous where it's defined

Before asking whether a function is continuous at a point, it has to actually be defined there, so finding a function's domain is usually the first step.

Find the domain of f(x)=cos⁡xf(x) = \sqrt{\cos x} over one full period, [0,2π][0, 2\pi].

Solution: A square root is only defined for a non-negative input, so f(x)f(x) requires cos⁡x≥0\cos x \ge 0. Over [0,2π][0, 2\pi], cosine is non-negative on the first and last quarters of the circle:

[0,π2]∪[3π2,2π]\left[0, \dfrac{\pi}{2}\right] \cup \left[\dfrac{3\pi}{2}, 2\pi\right]

Common mistakes

  • Checking only one side. A piecewise function needs both one-sided limits at the joining point.
  • Assuming continuous means differentiable. ∣x∣|x| is continuous at 0 but has a corner there. Differentiable does imply continuous, though.
  • Calling a point outside the domain a discontinuity. x\sqrt{x} isn't discontinuous at x=−1x = -1. It simply isn't defined there.

Continue learning

A function has to be differentiable, in the sense checked here, before the chain rule can be applied to it.