Derivatives · Class 12 · Lesson 04

Continuity and differentiability Class 12: no breaks, no corners.

Short answer

\(f\) is continuous at \(x = a\) if LHL = RHL = \(f(a)\). It is differentiable at \(a\) if the left and right derivatives are finite and equal.

Differentiable implies continuous, but not the other way round: \(|x|\) is continuous at 0, yet its left derivative is \(-1\) and its right derivative is \(1\).

Class 12HSC & CBSEBSc
01

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.

Continuity at \(x = a\)

\[\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.

02

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.

Differentiability at \(x = a\)

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.

04

Method for piecewise functions

  1. Find \(f(a)\) from whichever formula includes \(x = a\) (look for \(\le\) or \(\ge\)).
  2. 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\)).
  3. Check continuity: LHL = RHL = \(f(a)\). If this fails, stop. The function is not differentiable at \(a\) either.
  4. 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.
  5. 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.

05

Solved examples

Example 1: A removable discontinuity

Easy

Is \(f\) continuous at \(x = 2\)? \[f(x) = \begin{cases} \dfrac{x^2 - 4}{x - 2}, & x \ne 2 \\ 3, & x = 2 \end{cases}\]

  1. For \(x \ne 2\), \(\dfrac{x^2 - 4}{x - 2} = x + 2\), so LHL = RHL = \(4\).
  2. But \(f(2) = 3 \ne 4\).
  3. 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

Easy

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

  1. \(f(2) = 2k + 1\), and this is also the LHL.
  2. RHL \(= 3(2) - 1 = 5\).
  3. Continuity: \(2k + 1 = 5\).

Answer\(k = 2\)

Example 3: Find k with a standard limit

Medium

Find \(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}\]

  1. \[\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.
  2. Continuity needs \(f(0) = 3\).

Answer\(k = 3\)

Example 4: Two constants

Medium

Find \(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}\]

  1. Each piece is continuous on its own, so only the joins \(x = 1\) and \(x = 3\) matter.
  2. At \(x = 1\): \(f(1) = 4\) and RHL \(= a + b\), so \(a + b = 4\).
  3. At \(x = 3\): \(f(3) = 10\) and LHL \(= 3a + b\), so \(3a + b = 10\).
  4. Subtract: \(2a = 6\), so \(a = 3\) and \(b = 1\).

Answer\(a = 3\), \(b = 1\)

Example 5: The modulus function

Medium

Show that \(f(x) = |x - 2|\) is continuous but not differentiable at \(x = 2\).

  1. LHL = RHL = \(0 = f(2)\), so \(f\) is continuous at 2.
  2. \(\dfrac{f(2 + h) - f(2)}{h} = \dfrac{|h|}{h}\).
  3. For \(h < 0\) this is \(-1\), so \(Lf'(2) = -1\). For \(h > 0\) it is \(1\), so \(Rf'(2) = 1\).
  4. 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

Medium

Is \(f(x) = x|x|\) differentiable at \(x = 0\)?

  1. \(\dfrac{f(h) - f(0)}{h} = \dfrac{h|h|}{h} = |h|\) for \(h \ne 0\).
  2. \(|h| \to 0\) from both sides, so \(Lf'(0) = Rf'(0) = 0\).
  3. So a modulus sign does not automatically mean a corner. Check it.

AnswerYes, and \(f'(0) = 0\)

Example 7: Differentiability at a join

Exam level

Show 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}\]

  1. Continuity: \(f(1) = 1\) = LHL, and RHL \(= 2 - 1 = 1\). Continuous.
  2. Left derivative: \[Lf'(1) = \lim_{h \to 0^-}\frac{(1 + h)^2 - 1}{h} = \lim_{h \to 0^-}(2 + h) = 2\]
  3. Right derivative: \[Rf'(1) = \lim_{h \to 0^+}\frac{2(1 + h) - 1 - 1}{h} = \lim_{h \to 0^+}\frac{2h}{h} = 2\]
  4. Both equal 2.

AnswerDifferentiable at \(x = 1\), with \(f'(1) = 2\)

Example 8: Find a and b for differentiability

Exam level

Find \(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}\]

  1. Continuity at 1: \(f(1) = 4 + a\) and RHL \(= b + 2\), so \(4 + a = b + 2\).
  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\).
  3. Equal derivatives: \(b = 5\). Then \(4 + a = 7\), so \(a = 3\).

Answer\(a = 3\), \(b = 5\)

Vipul Sir's tip

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.

06

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.

07

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.

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

08

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.

Related lessons

← All derivatives lessons
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

Class 11 & 12 Maths

Differentiation gets easy once the basics click.

Concept-first classes in small batches in Goregaon and Vile Parle, or online, for HSC, CBSE and ICSE students. Your first class is free.

WhatsApp↗