• Practice
  • About 18 min
  • 5 practice questions

One-sided derivatives, differentiability and continuity

Find left and right hand derivatives, decide whether a function is differentiable at a point, and use the fact that differentiability implies continuity but not the other way round.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Compute the left hand derivative f′(x₀⁻) and right hand derivative f′(x₀⁺) of a function at a point.
  • Decide whether a piecewise or modulus function is differentiable at a point.
  • Recognise the three situations in which a function fails to be differentiable.
  • Prove that differentiability implies continuity and give a counter-example to the converse.

A limit exists only when the left and right limits agree. The derivative is a limit, so the same test applies to it. Checking the two sides separately is essential at the joins of piecewise functions and at the turning points of modulus functions, which are favourite questions in this chapter.

Left and right hand derivatives

For f defined on an open interval containing x₀, the left hand derivative and right hand derivative are

  • f′(x₀⁻) = lim (Δx → 0⁻) [f(x₀ + Δx) − f(x₀)] / Δx, or with h > 0: lim (h → 0) [f(x₀ − h) − f(x₀)] / (−h).
  • f′(x₀⁺) = lim (Δx → 0⁺) [f(x₀ + Δx) − f(x₀)] / Δx, or with h > 0: lim (h → 0) [f(x₀ + h) − f(x₀)] / h.

f′(x₀) exists if and only if f′(x₀⁻) and f′(x₀⁺) both exist and are equal. If either fails, f is not differentiable at x₀.

— Test for differentiability at a point

A function is differentiable on an open interval (a, b) if it is differentiable at every point of it. It is differentiable on the closed interval [a, b] if, in addition, the right hand derivative exists at a and the left hand derivative exists at b.

Worked example 1: a corner, f(x) = |x + 3| at x = −3

Here f(−3) = 0 and the function is continuous at −3. For x < −3, |x + 3| = −(x + 3), so f′(−3⁻) = lim (x → −3⁻) [−(x + 3) − 0]/(x + 3) = −1. For x > −3, |x + 3| = x + 3, so f′(−3⁺) = lim (x → −3⁺) (x + 3)/(x + 3) = 1. Since −1 ≠ 1, f′(−3) does not exist. The graph is a V with a sharp corner at (−3, 0): no single tangent line fits there. At every other point the function is differentiable, with f′(x) = −1 for x < −3 and f′(x) = 1 for x > −3.

Worked example 2: a vertical tangent, f(x) = x^(1/5) at x = 0

The graph has no break, so f is continuous at 0. But [f(h) − f(0)]/h = h^(1/5)/h = h^(−4/5) = 1/h^(4/5). As h → 0 from either side, h^(4/5) is a small positive number, so the quotient grows without bound: the limit is ∞, not a real number. f is not differentiable at 0; the tangent at the origin is vertical (the y-axis), and a vertical line has no slope.

Worked example 3: a smooth join

Let f(x) = x² for x ≤ 1 and f(x) = 2x − 1 for x > 1. Is f differentiable at x = 1? First, f(1) = 1 and the right-hand limit is 2(1) − 1 = 1, so f is continuous at 1. Left: [f(1 + h) − f(1)]/h = [(1 + h)² − 1]/h = (2h + h²)/h = 2 + h → 2 as h → 0⁻. Right: [2(1 + h) − 1 − 1]/h = 2h/h = 2. Both sides give 2, so f′(1) = 2 and f is differentiable at 1. The line y = 2x − 1 is in fact the tangent to y = x² at (1, 1), which is why the pieces join smoothly.

Worked example 4: a jump

Let g(x) = 2x for x ≤ 1 and g(x) = 2x + 3 for x > 1. Then g(1) = 2, but the right-hand limit is 5, so g is not continuous at 1. The right hand derivative is lim (h → 0⁺) [2(1 + h) + 3 − 2]/h = lim (2h + 3)/h, and the 3/h part grows without bound. So g′(1) does not exist. A jump always destroys differentiability. Similarly, the greatest integer function ⌊x⌋ jumps at every integer n (its left limit is n − 1 and its right limit is n), so it is not differentiable at any integer; between integers it is constant, with derivative 0.

When a derivative fails to exist

f is NOT differentiable at x₀ when

  • A vertical tangent The difference quotient grows without bound.
    • y = x^(1/3) at 0
    • y = x^(1/5) at 0
  • A sharp corner or peak (∨ or ∧) Left and right derivatives differ.
    • y = |x − 2| at 2
    • y = |x + 3| at −3
  • A discontinuity A jump, hole or break at x₀.
    • ⌊x⌋ at every integer
    • a piecewise function whose pieces do not meet

Differentiability implies continuity

Theorem. If f is differentiable at x₀, then f is continuous at x₀. Proof. For Δx ≠ 0 write f(x₀ + Δx) − f(x₀) = {[f(x₀ + Δx) − f(x₀)]/Δx} × Δx. Take the limit as Δx → 0. The first factor tends to the real number f′(x₀) and the second tends to 0, so lim [f(x₀ + Δx) − f(x₀)] = f′(x₀) × 0 = 0. That is, f(x₀ + Δx) → f(x₀), which is continuity at x₀.

The converse is false: |x + 3| and x^(1/5) are continuous at the points tested but not differentiable there. Put the other way round, discontinuity implies non-differentiability, while continuity alone guarantees nothing.

Continuity and differentiability

  • Differentiable at x₀
    • Always continuous at x₀
    • Graph smooth, one non-vertical tangent
    • Example: x² at any point
  • Continuous, not differentiable
    • No break, but a corner or vertical tangent
    • Example: |x| at 0
    • Example: x^(1/3) at 0
  • Not continuous
    • Never differentiable
    • Example: ⌊x⌋ at integers
    • Example: a jump in a piecewise function

Worked example 5: choosing constants for differentiability

Find a and b so that f(x) = x² for x ≤ 2 and f(x) = ax + b for x > 2 is differentiable at x = 2. Working: differentiability needs continuity first, so 2² = 2a + b, that is 2a + b = 4. Next, the left hand derivative is lim [(2 + h)² − 4]/h = lim (4 + h) = 4, and the right hand derivative of the line is a. Equating, a = 4, and then b = 4 − 8 = −4. Check: y = 4x − 4 is the tangent to y = x² at (2, 4).

Key takeaways: compare f′(x₀⁻) and f′(x₀⁺); corners, vertical tangents and discontinuities all destroy differentiability; differentiable ⇒ continuous, but continuous does not imply differentiable. For a piecewise function, check continuity first, then match the one-sided derivatives.

Check your understanding

  1. 1. For f(x) = |x − 5|, what is the right hand derivative at x = 5?

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

    Answer: C. For x > 5, |x − 5| = x − 5, so [f(5 + h) − f(5)]/h = h/h = 1 for h > 0. The right hand derivative is 1. The left hand derivative is −1, which is why f′(5) itself does not exist.

  2. 2. Which function is continuous at x = 0 but NOT differentiable there?

    1. x²
    2. |x|
    3. sin x
    4. ⌊x⌋
    Show answer

    Answer: B. |x| has a corner at 0: left derivative −1, right derivative 1. x² and sin x are differentiable at 0. ⌊x⌋ jumps from −1 to 0 at 0, so it is not even continuous there.

  3. 3. Let f(x) = x² for x ≤ 1 and f(x) = x for x > 1. What are f′(1⁻) and f′(1⁺)?

    1. 1 and 1
    2. 2 and 2
    3. 1 and 2
    4. 2 and 1
    Show answer

    Answer: D. f is continuous at 1 (both pieces give 1). Left: [(1 + h)² − 1]/h = 2 + h → 2. Right: [(1 + h) − 1]/h = 1. They differ, so f is not differentiable at 1.

  4. 4. If f is differentiable at x = a, which statement must be true?

    1. f is continuous at a.
    2. f′ is continuous at a.
    3. f has a corner at a.
    4. f(a) = 0.
    Show answer

    Answer: A. Differentiability implies continuity (the theorem in this lesson). Nothing forces f′ to be continuous, f(a) to be 0, or a corner; a corner would actually prevent differentiability.

  5. 5. At how many real points is f(x) = |x − 1| + |x + 2| not differentiable?

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

    Answer: D. Each modulus term has a corner where its inside is zero: x = 1 and x = −2. At x = 1 the slope jumps from 0 to 2, and at x = −2 from −2 to 0, so neither corner is smoothed out. That gives 2 points.

Privacy · Terms · Refunds · Delivery