• Foundation
  • About 14 min
  • 5 practice questions

Differentiability and continuity

Check whether a function has a derivative at a point using the left-hand and right-hand derivatives, see why a differentiable function must be continuous, and recognise corners such as |x| at 0.

If something looks wrong, please tell us.

So far we have differentiated functions without asking whether the derivative always exists. It does not. At some points a function can be continuous, with no break in its graph, and still have no derivative because the graph has a sharp corner. This lesson shows how to test for a derivative at a point and explains how differentiability and continuity are related.

One-sided derivatives

The derivative at x = a is the limit of [f(a + h) − f(a)]/h as h → 0. As with ordinary limits, there are two sides. The right-hand derivative takes h → 0⁺ and the left-hand derivative takes h → 0⁻. The function is differentiable at a exactly when both exist and are equal. If they differ, the graph has a corner at a, and the tangent is not defined.

Differentiable means continuous

If f is differentiable at a, then it is continuous at a. The reason is that f(a + h) − f(a) = h × [f(a + h) − f(a)]/h, which tends to 0 × f′(a) = 0 as h → 0. The converse is false: a function can be continuous at a point without being differentiable there. So the order of checking is: continuity is needed first, but it is not enough.

Differentiable at a ⟹ continuous at a, but continuous does not imply differentiable. At a point, f is differentiable only if the left-hand and the right-hand derivatives both exist and are equal.

Worked example 1: the modulus function

Let f(x) = |x| and look at x = 0. For h > 0, [f(h) − f(0)]/h = h/h = 1, so the right-hand derivative is 1. For h < 0, |h| = −h, so [f(h) − f(0)]/h = −h/h = −1, and the left-hand derivative is −1. They are different, so |x| is not differentiable at 0, though it is continuous there. The graph has a V-shaped corner.

Worked example 2: two formulas that join smoothly

Let f(x) = x² for x ≤ 1 and f(x) = 2x − 1 for x > 1. First, continuity at 1: from the left the value is 1, and from the right it is 2(1) − 1 = 1, and f(1) = 1, so the function is continuous. Next, the derivative of x² is 2x, which is 2 at x = 1; the derivative of 2x − 1 is 2. Both one-sided derivatives equal 2, so f is differentiable at 1 with f′(1) = 2. The line 2x − 1 is the tangent to the parabola at (1, 1), which is why they join without a corner.

Worked example 3: a corner

Let f(x) = x² for x ≤ 1 and f(x) = x for x > 1. At x = 1 both pieces give the value 1, so f is continuous. But the left-hand derivative is 2 and the right-hand derivative is 1. They are not equal, so f is not differentiable at 1.

Worked example 4: the function x|x|

For f(x) = x|x| at 0, [f(h) − f(0)]/h = h|h|/h = |h|. As h → 0 from either side, |h| → 0. Both one-sided derivatives are 0, so f is differentiable at 0 with f′(0) = 0. A function can have a modulus in its formula and still be smooth.

Other ways a derivative can fail

  • A jump or a gap in the graph: the function is not continuous there, so it cannot be differentiable.
  • A corner, like |x| at 0: one-sided derivatives exist but are different.
  • A vertical tangent, like the cube root of x at 0: the quotient [f(h) − f(0)]/h grows without bound, so there is no finite derivative.

Key takeaways: compare the left-hand and right-hand derivatives. Equal means differentiable; different means a corner. Differentiable implies continuous, but not the other way round. When two formulas meet, check continuity first, and then compare the two slopes.

Check your understanding

  1. 1. Is f(x) = |x| differentiable at x = 0?

    1. No, because the one-sided derivatives are −1 and 1
    2. Yes, because it is continuous at 0 and f(0) = 0
    3. Yes, because both one-sided derivatives are equal
    4. No, because the function is not continuous at 0
    Show answer

    Answer: A. |x| is continuous at 0, but the one-sided derivatives are −1 and 1. They are not equal, so there is a corner and no derivative.

  2. 2. Which statement is true for every function?

    1. If f is continuous at a, then f is differentiable at a
    2. If f is not continuous at a, then f is differentiable there
    3. If f is differentiable at a, then it is continuous at a
    4. If f has a corner at a, then f is not continuous at a
    Show answer

    Answer: C. Differentiability forces continuity. The converse is false, and |x| at 0 is a counterexample, so the other statements fail.

  3. 3. What is the right-hand derivative of f(x) = |x − 2| at x = 2?

    1. −1
    2. 1
    3. 0
    4. 2
    Show answer

    Answer: B. For h > 0, [f(2 + h) − f(2)]/h = h/h = 1.

  4. 4. What is f′(0) for f(x) = x|x|?

    1. 1
    2. −1
    3. It does not exist
    4. 0
    Show answer

    Answer: D. [f(h) − f(0)]/h = |h|, which tends to 0 as h → 0 from both sides. So f′(0) = 0.

  5. 5. Let f(x) = x² for x ≤ 2 and f(x) = 4x − 4 for x > 2. How would you describe f at x = 2?

    1. Continuous but not differentiable
    2. Continuous and differentiable
    3. Differentiable but not continuous
    4. Neither continuous nor differentiable
    Show answer

    Answer: B. Both pieces give 4 at x = 2, so f is continuous. The slopes are 2x = 4 on the left and 4 on the right, so they agree and f is differentiable with f′(2) = 4.

Sign in to keep track of the lessons you finish.

Next lesson → Final self-assessment: differentiation

Privacy · Terms · Refunds · Delivery