Continuity at a point
Loosely, a function is continuous if you can draw its graph without lifting your pen. That is fine for pictures, but exam questions need a test you can calculate. Here it is.
\[\lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x) = f(a)\]
Left-hand limit (LHL) = right-hand limit (RHL) = value of the function. All three must exist and be equal.
So there are three things that can go wrong, and each gives a different kind of break:
- Removable discontinuity: LHL = RHL, but \(f(a)\) is missing or has a different value. A single point is out of place, and redefining \(f(a)\) fixes it.
- Jump discontinuity: LHL and RHL are both finite but different. The graph jumps, as the greatest integer function \([x]\) does at every integer.
- Infinite discontinuity: the function shoots off to \(\pm\infty\), like \(\dfrac{1}{x}\) near \(x = 0\). Since \(\dfrac{1}{x}\) is not defined at 0, some books instead say 0 is outside its domain and call \(\dfrac{1}{x}\) continuous wherever it is defined.
You don't need to test familiar functions point by point. Polynomials, \(\sin x\), \(\cos x\), \(e^x\) and \(|x|\) are continuous everywhere. \(\log x\) is continuous for \(x > 0\), and a rational function is continuous wherever its denominator is not zero. Sums, products and compositions of continuous functions are continuous. The real work is at the join of a piecewise function, where the formula changes.
Left and right derivatives
The derivative at \(a\) is a limit, and like any limit it can be approached from the left or from the right.
Left derivative: \(Lf'(a) = \displaystyle\lim_{h \to 0^-}\frac{f(a + h) - f(a)}{h}\)
Right derivative: \(Rf'(a) = \displaystyle\lim_{h \to 0^+}\frac{f(a + h) - f(a)}{h}\)
\(f\) is differentiable at \(a\) when both exist, are finite, and are equal. Then \(f'(a)\) is that common value.
On a graph, the left derivative is the slope you see arriving at the point and the right derivative is the slope leaving it. If they disagree, the graph has a sharp corner. If the slope blows up to infinity, the graph has a vertical tangent. In both cases there is no single tangent line, so no derivative.
How the two ideas are linked
If \(f\) is differentiable at \(a\), then \(f\) is continuous at \(a\).
Proof in one line. For \(h \ne 0\), write \(f(a + h) - f(a) = \dfrac{f(a + h) - f(a)}{h}\cdot h\). As \(h \to 0\), the fraction tends to \(f'(a)\) and \(h\) tends to 0, so the right side tends to \(f'(a)\cdot 0 = 0\). Hence \(f(a + h) \to f(a)\), which is continuity.
The converse is false. Continuous does not mean differentiable. The standard example is \(f(x) = |x|\) at \(x = 0\). It is continuous there, since both one-sided limits are 0 and \(f(0) = 0\). But \(\dfrac{|h| - 0}{h}\) equals \(-1\) for \(h < 0\) and \(+1\) for \(h > 0\), so \(Lf'(0) = -1\) and \(Rf'(0) = 1\). The V-shaped graph has a corner at the origin.
| Function, point | Continuous? | Differentiable? | Why |
|---|---|---|---|
| \(x^2\), any point | Yes | Yes | smooth curve |
| \(|x|\), at \(0\) | Yes | No | corner: slopes \(-1\) and \(1\) |
| \(x^{1/3}\), at \(0\) | Yes | No | vertical tangent |
| \([x]\), at \(1\) | No | No | jump |
A useful way to remember it: differentiable is the stronger condition. Discontinuous at a point automatically means not differentiable there.
Method for piecewise functions
- Find \(f(a)\) from whichever formula includes \(x = a\) (look for \(\le\) or \(\ge\)).
- Find LHL and RHL by putting \(x = a\) into the left and right formulas (or using a standard limit if the formula is \(\dfrac{0}{0}\) at \(a\)).
- Check continuity: LHL = RHL = \(f(a)\). If this fails, stop. The function is not differentiable at \(a\) either.
- Find \(Lf'(a)\) and \(Rf'(a)\) from the definition. Shortcut: once continuity is confirmed, \(Lf'(a)\) is the derivative of the left formula at \(a\), and \(Rf'(a)\) is the derivative of the right formula at \(a\). This needs each formula to be differentiable at \(a\), which polynomials always are.
- Compare. Equal and finite means differentiable.
For "find \(k\)" questions, steps 1 to 3 give you an equation. For "find \(a\) and \(b\) so that \(f\) is differentiable", continuity gives one equation and equal one-sided derivatives give the other.
Solved examples
Example 1: A removable discontinuity
EasyIs \(f\) continuous at \(x = 2\)? \[f(x) = \begin{cases} \dfrac{x^2 - 4}{x - 2}, & x \ne 2 \\ 3, & x = 2 \end{cases}\]
- For \(x \ne 2\), \(\dfrac{x^2 - 4}{x - 2} = x + 2\), so LHL = RHL = \(4\).
- But \(f(2) = 3 \ne 4\).
- The limit exists, so the break is removable: defining \(f(2) = 4\) would make \(f\) continuous.
AnswerNot continuous at \(x = 2\) (removable discontinuity)
Example 2: Find k
EasyFind \(k\) so that \(f\) is continuous at \(x = 2\). \[f(x) = \begin{cases} kx + 1, & x \le 2 \\ 3x - 1, & x > 2 \end{cases}\]
- \(f(2) = 2k + 1\), and this is also the LHL.
- RHL \(= 3(2) - 1 = 5\).
- Continuity: \(2k + 1 = 5\).
Answer\(k = 2\)
Example 3: Find k with a standard limit
MediumFind \(k\) so that \(f\) is continuous at \(x = 0\). \[f(x) = \begin{cases} \dfrac{\sin 3x}{x}, & x \ne 0 \\ k, & x = 0 \end{cases}\]
- \[\lim_{x \to 0}\frac{\sin 3x}{x} = \lim_{x \to 0} 3\cdot\frac{\sin 3x}{3x} = 3\cdot 1 = 3\] This is the same from both sides.
- Continuity needs \(f(0) = 3\).
Answer\(k = 3\)
Example 4: Two constants
MediumFind \(a\) and \(b\) so that \(f\) is continuous everywhere. \[f(x) = \begin{cases} 4, & x \le 1 \\ ax + b, & 1 < x < 3 \\ 10, & x \ge 3 \end{cases}\]
- Each piece is continuous on its own, so only the joins \(x = 1\) and \(x = 3\) matter.
- At \(x = 1\): \(f(1) = 4\) and RHL \(= a + b\), so \(a + b = 4\).
- At \(x = 3\): \(f(3) = 10\) and LHL \(= 3a + b\), so \(3a + b = 10\).
- Subtract: \(2a = 6\), so \(a = 3\) and \(b = 1\).
Answer\(a = 3\), \(b = 1\)
Example 5: The modulus function
MediumShow that \(f(x) = |x - 2|\) is continuous but not differentiable at \(x = 2\).
- LHL = RHL = \(0 = f(2)\), so \(f\) is continuous at 2.
- \(\dfrac{f(2 + h) - f(2)}{h} = \dfrac{|h|}{h}\).
- For \(h < 0\) this is \(-1\), so \(Lf'(2) = -1\). For \(h > 0\) it is \(1\), so \(Rf'(2) = 1\).
- The one-sided derivatives differ. The graph is a V with its corner at \((2, 0)\).
AnswerContinuous at \(x = 2\), not differentiable there
Example 6: A modulus that is differentiable
MediumIs \(f(x) = x|x|\) differentiable at \(x = 0\)?
- \(\dfrac{f(h) - f(0)}{h} = \dfrac{h|h|}{h} = |h|\) for \(h \ne 0\).
- \(|h| \to 0\) from both sides, so \(Lf'(0) = Rf'(0) = 0\).
- So a modulus sign does not automatically mean a corner. Check it.
AnswerYes, and \(f'(0) = 0\)
Example 7: Differentiability at a join
Exam levelShow that \(f\) is differentiable at \(x = 1\) and find \(f'(1)\). \[f(x) = \begin{cases} x^2, & x \le 1 \\ 2x - 1, & x > 1 \end{cases}\]
- Continuity: \(f(1) = 1\) = LHL, and RHL \(= 2 - 1 = 1\). Continuous.
- Left derivative: \[Lf'(1) = \lim_{h \to 0^-}\frac{(1 + h)^2 - 1}{h} = \lim_{h \to 0^-}(2 + h) = 2\]
- Right derivative: \[Rf'(1) = \lim_{h \to 0^+}\frac{2(1 + h) - 1 - 1}{h} = \lim_{h \to 0^+}\frac{2h}{h} = 2\]
- Both equal 2.
AnswerDifferentiable at \(x = 1\), with \(f'(1) = 2\)
Example 8: Find a and b for differentiability
Exam levelFind \(a\) and \(b\) if \(f\) is differentiable at \(x = 1\). \[f(x) = \begin{cases} x^2 + 3x + a, & x \le 1 \\ bx + 2, & x > 1 \end{cases}\]
- Continuity at 1: \(f(1) = 4 + a\) and RHL \(= b + 2\), so \(4 + a = b + 2\).
- With continuity in place, use the shortcut. Left formula: \(\dfrac{d}{dx}(x^2 + 3x + a) = 2x + 3\), which is 5 at \(x = 1\). Right formula: derivative \(b\).
- Equal derivatives: \(b = 5\). Then \(4 + a = 7\), so \(a = 3\).
Answer\(a = 3\), \(b = 5\)
In "find \(a\) and \(b\)" questions, students often find \(b\) from the derivatives and forget to go back for \(a\). I ask them to write two headings, "Continuity" and "Differentiability", and get one equation under each before solving anything.
Common mistakes
1. Checking the limit but not the value
In Example 1, LHL = RHL = 4, so the limit exists. That alone does not make \(f\) continuous: \(f(2) = 3\), which is different. You need LHL = RHL = \(f(a)\), all three.
2. Assuming continuous means differentiable
\(|x - 2|\) is continuous at 2 but has a corner there. Continuity is necessary for a derivative, not enough on its own. Always check the left and right derivatives.
3. Differentiating the pieces without checking continuity
Take \(f(x) = x^2\) for \(x \le 1\) and \(f(x) = 2x + 3\) for \(x > 1\). Both formulas have derivative 2 at \(x = 1\), so it looks differentiable. It isn't: \(f(1) = 1\) but RHL \(= 5\), a jump. From the definition, \(Rf'(1) = \displaystyle\lim_{h \to 0^+}\frac{4 + 2h}{h}\), which is infinite.
Practice questions
Try each one on paper before you open the answer.
Q1Find \(k\) if \(f(x) = kx^2\) for \(x \le 2\) and \(f(x) = 3\) for \(x > 2\) is continuous at \(x = 2\).
\(f(2) = 4k\) and RHL \(= 3\). So \(4k = 3\) and \(k = \dfrac{3}{4}\).
Q2Find \(k\) if \(f(x) = \dfrac{1 - \cos 2x}{x^2}\) for \(x \ne 0\) and \(f(0) = k\) is continuous at 0.
\(1 - \cos 2x = 2\sin^2 x\), so \(f(x) = 2\left(\dfrac{\sin x}{x}\right)^2 \to 2\). So \(k = 2\).
Q3Is \(f(x) = |x| + |x - 1|\) differentiable at \(x = 1\)?
Near \(x = 1\): for \(0 < x < 1\), \(f(x) = x + (1 - x) = 1\); for \(x > 1\), \(f(x) = 2x - 1\). Both give \(f \to 1 = f(1)\), so \(f\) is continuous.
\(Lf'(1) = 0\) and \(Rf'(1) = 2\). Not differentiable at \(x = 1\).
Q4Is the greatest integer function \(f(x) = [x]\) continuous at \(x = 1\)?
Just left of 1, \([x] = 0\), so LHL \(= 0\). Just right of 1, \([x] = 1\), so RHL \(= 1\). They differ: a jump. Not continuous, so not differentiable either.
Q5Find \(a\) and \(b\) if \(f(x) = x^2\) for \(x \le 2\) and \(f(x) = ax + b\) for \(x > 2\) is differentiable at \(x = 2\).
Continuity: \(4 = 2a + b\). Derivatives: \(2x = 4\) at \(x = 2\) on the left, \(a\) on the right, so \(a = 4\).
Then \(b = 4 - 8 = -4\).
Q6Show that \(f(x) = x^{1/3}\) is continuous at \(x = 0\) but not differentiable there.
\(x^{1/3} \to 0 = f(0)\) from both sides, so it is continuous.
\(\dfrac{h^{1/3} - 0}{h} = \dfrac{1}{h^{2/3}}\), which grows without bound as \(h \to 0\). No finite derivative: the graph has a vertical tangent at the origin.
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
What is the difference between continuity and differentiability?
Continuity means the graph has no break at the point: LHL = RHL = \(f(a)\). Differentiability means the graph also has a single, non-vertical tangent there: the left and right derivatives are finite and equal. Differentiability is the stronger condition.
Is every continuous function differentiable?
No. \(|x|\) is continuous at 0 but not differentiable there, because of the corner. The reverse does hold: every function that is differentiable at a point is continuous at that point.
Why is |x| not differentiable at x = 0?
Coming from the left the slope is \(-1\), and leaving to the right it is \(+1\). Since \(Lf'(0) \ne Rf'(0)\), there is no single derivative at 0.
How do I check if a piecewise function is differentiable?
First check continuity at the join. If it is continuous, compare the left and right derivatives there; if they are equal and finite, the function is differentiable. If it is not continuous, it is not differentiable and you can stop.