Calculus

Differentiability and Continuity Are Not the Same Thing

Why every differentiable function is continuous but not the reverse, with corners, cusps and wild oscillations to prove it.

Key takeaways

  • Differentiability at a point implies continuity at that point; the converse is false.
  • A function that is not continuous at a point cannot be differentiable there.
  • Continuous functions can fail to have a derivative because of a corner, a cusp, a vertical tangent or endless oscillation.
  • For a function defined in pieces, check that the pieces meet before you compare their slopes.
  • There are functions that are continuous at every point and differentiable at none.

A function that has a derivative at a point must be continuous there, but a continuous function does not have to have a derivative. Continuity says the graph has no break at the point. Differentiability asks for more: zoom in far enough and the graph must look like a single non-vertical straight line.

The simplest example of the gap is the absolute value function |x|. Its graph is unbroken at 0, yet it has a sharp corner there, and no amount of magnification smooths it out.

Two definitions side by side

A function f is continuous at a point a if f(a) is defined, the limit of f(x) as x approaches a exists, and the two are equal. Small changes in input near a produce small changes in output. The ways this can fail are catalogued in continuity and the kinds of discontinuity.

A function is differentiable at a if the following limit exists as a finite number:

f′(a) = limit as h → 0 of (f(a + h) − f(a))/h

The fraction is the slope of the line through two points on the graph. Differentiability means these slopes settle down to one value, whether the second point approaches from the left or from the right.

Notice what each definition looks at. Continuity concerns the heights f(a + h) approaching f(a). Differentiability concerns the ratio of the height difference to h. The ratio is a much more demanding thing to control, because both its top and bottom are shrinking toward zero.

Why a derivative forces continuity

The proof is short. For x ≠ a, you can rewrite the change in f as a slope times a distance:

f(x) − f(a) = [(f(x) − f(a))/(x − a)] · (x − a)

Now let x approach a. If f is differentiable at a, the bracket approaches f′(a), a finite number. The factor x − a approaches 0. The product therefore approaches f′(a) · 0 = 0. So f(x) approaches f(a), which is exactly continuity.

The logically equivalent contrapositive is just as useful: if f is not continuous at a, then f is not differentiable at a. The converse, that continuity implies differentiability, is a separate claim, and a single counterexample destroys it.

For |x| at 0, the difference quotient is |h|/h. It equals 1 for every positive h and −1 for every negative h. The two one-sided limits disagree, so there is no derivative, even though |h| itself goes to 0 and the function is continuous.

What zooming in reveals

Differentiability has a visual meaning: the graph is locally linear. Near the point, a single line approximates the function so well that the error becomes tiny even compared with your distance from the point.

Compare two functions near zero. For p(x) = x² + x, the tangent line at 0 is y = x, and the error is exactly x².

x error of the line y = x error divided by x
0.1 0.01 0.1
0.01 0.0001 0.01
0.001 0.000001 0.001

The last column heads to zero. Magnify the graph a thousand times and the curve is practically indistinguishable from the line.

Now try to fit a line y = mx to |x| at 0. For positive x the error is |1 − m| · x, and for negative x it is |1 + m| times the size of x. Dividing by the distance leaves |1 − m| on one side and |1 + m| on the other. No value of m makes both zero. Every magnification of the corner looks exactly like the original picture, because |cx| = c|x| for any positive c.

This viewpoint is the one that carries into higher dimensions, where differentiable means well approximated by a flat plane or a linear map.

Four ways a continuous graph can lack a slope

Each of the following functions is continuous at 0 and has no derivative there. (Set the last one equal to 0 at x = 0.)

Function What you see at 0 Difference quotient near 0
|x| corner 1 on the right, −1 on the left
x^(2/3) cusp grows without bound, with opposite signs
x^(1/3) vertical tangent grows without bound, positive on both sides
x sin(1/x) endless wiggling keeps swinging between −1 and 1

At a corner, each side has a respectable slope but the two differ. At a cusp, the two sides become steeper and steeper in opposite directions, forming a sharp point. With a vertical tangent, the graph does have a geometric tangent line, but its slope is not a number.

The fourth case is the strangest. The function x sin(1/x) is trapped between the lines y = x and y = −x, which pinches it to 0 and makes it continuous. But the slope of the line from the origin to the point at h is sin(1/h), which takes every value from −1 to 1 infinitely often as h shrinks.

Levels of smoothness, weakest condition first
Continuous No breaks; |x| qualifies Differentiable A finite slope at each point Continuously differentiable The slope itself has no jumps Infinitely differentiable Derivatives of every order exist Analytic Equals its Taylor series near each point Continuous No breaks; |x| qualifies Differentiable A finite slope at each point Continuously differentiable The slope itself has no jumps Infinitely differentiable Derivatives of every order exist Analytic Equals its Taylor series near each point

Taming the oscillation

Multiply by one more factor of x and the story changes. Define g(x) = x² sin(1/x) for x ≠ 0 and g(0) = 0. At zero, the difference quotient is h sin(1/h), which is squeezed to 0 as h shrinks. So g′(0) exists and equals 0. This uses the same idea as the squeeze theorem.

Away from zero, the ordinary rules give:

g′(x) = 2x sin(1/x) − cos(1/x)

The first term goes to 0 as x approaches 0, but cos(1/x) keeps oscillating between −1 and 1. So g′(x) has no limit at 0, even though g′(0) itself exists.

This function is differentiable everywhere, but its derivative is not continuous. It shows that "has a derivative" and "has a continuous derivative" are different conditions, and it is why theorems often state which one they need.

Piecewise functions without traps

Exam questions often ask you to choose constants that make a piecewise function differentiable. Let f(x) = x² for x ≤ 1 and f(x) = ax + b for x > 1.

continuity at 1:   1² = a · 1 + b        so a + b = 1
equal slopes at 1: 2 · 1 = a             left slope 2x, right slope a
solution:          a = 2, b = −1

The right-hand piece, 2x − 1, is precisely the tangent line to the parabola at (1, 1).

Both conditions matter, in that order. Consider the function equal to x for x < 0 and x + 1 for x ≥ 0. The two formulas have the same derivative, 1, but the graph jumps by 1 at the origin, so there is no derivative there. Matching the derivative formulas alone proves nothing. Check continuity first, then compare the one-sided limits of the difference quotient.

Continuous everywhere, differentiable nowhere

The examples so far fail at isolated points. In the nineteenth century, mathematicians confronted something far worse. Karl Weierstrass presented a function, built as an infinite sum of cosine waves with ever faster oscillation and ever smaller height, that is continuous at every point and differentiable at none.

Its graph is jagged at every scale: magnifying any part reveals more roughness, never a straight line. The discovery showed that intuition drawn from pencil sketches was unreliable and that proofs had to rest on precise definitions. You can read how it is constructed in a function that is continuous everywhere and differentiable nowhere.

Far from being rare curiosities, such functions are in a precise sense typical among all continuous functions. Related jagged paths also appear in the mathematical model of Brownian motion, where sample paths are, with probability 1, continuous and nowhere differentiable.

Why the difference matters in practice

Many theorems require one property and not the other, and using the wrong one leads to false conclusions.

  • The intermediate value theorem and the extreme value theorem need only continuity on a closed interval.
  • The mean value theorem needs continuity on the closed interval and differentiability inside it. With |x| on the interval from −1 to 1, the average slope is 0 but no point has slope 0.
  • In optimization, a maximum or minimum can sit at a point with no derivative. If you only solve f′(x) = 0, you will miss the minimum of |x| entirely.
  • Newton's method for roots uses the derivative and can misbehave near corners or vertical tangents.

In applications, a corner in a position graph would mean velocity changing instantly. Physical objects with mass do not do that exactly, but a bounce is so abrupt that a model with a corner is often the practical choice.

A checklist for any point

When you are asked whether a function is differentiable at a point, work in this order.

  1. Is the function defined there? If not, stop.
  2. Is it continuous there? If not, it is not differentiable.
  3. Do the one-sided limits of the difference quotient both exist as finite numbers?
  4. Are they equal? If so, that common value is the derivative.

For an endpoint of a domain, only a one-sided derivative makes sense, and you should say so. Following these steps keeps you from the two most frequent errors: assuming an unbroken graph must have a slope, and assuming that matching formulas on either side guarantee smoothness.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 39 articles in Calculus →

Latest news on this topic