Does continuity of a function at a point imply that it is differentiable there?
answer
- the implication runs one way only
- differentiability is the stronger condition
- squeeze bound: |x sin(1/x)| <= |x|
- difference quotient becomes sin(1/h)
- it oscillates forever and never settles
basics
~10 sNo. The implication runs one way only: differentiability forces continuity, never the reverse. The function x times sin(1/x), with value 0 at the origin, is continuous at 0 yet its difference quotient oscillates forever.
solid answer
~40 sDifferentiability is the strictly stronger condition. If `f'(x)` exists then `f(x+h) - f(x) = h * [(f(x+h) - f(x))/h]`, a product of something tending to 0 and something tending to a finite number, so the difference tends to 0 and `f` is continuous at `x`. The converse fails. Take `f(x) = x*sin(1/x)` for `x` not 0, with `f(0) = 0`. It is continuous at 0 because `|x*sin(1/x)| <= |x|`, which is squeezed to 0. But the difference quotient at 0 is `(h*sin(1/h))/h = sin(1/h)`, which sweeps the whole interval from -1 to 1 infinitely often as `h` approaches 0 and therefore has no limit. So no derivative exists at 0 even though the function is unbroken there.
go deeper
Remember the direction: differentiable means continuous, but not the other way round. Having one concrete counterexample ready is enough at this level.
Give the two-line proof that differentiability forces continuity, and produce a counterexample with the algebra of its difference quotient rather than just naming it.
Distinguish the three tiers — continuous, differentiable, continuously differentiable — and say which one an algorithm or an argument you rely on actually needs.
Be able to challenge a design that quietly assumes smoothness. Deciding whether to smooth a kinked objective or adopt machinery that tolerates it is a real architectural call with cost and convergence consequences.
### The two definitions side by side **Continuity** of `f` at a point `a` means `lim(x -> a) f(x) = f(a)`: the function value has no jump and no hole. Informally, you can draw the graph through that point without lifting the pen. **Differentiability** of `f` at `a` means the limit `lim(h -> 0) (f(a+h) - f(a))/h` exists as a finite number. That is a much stronger demand: not only must the function values converge, the *slopes* of the shrinking secants must converge too. ### Differentiable implies continuous Suppose `f'(a)` exists. Write, for `h` not 0, ``` f(a + h) - f(a) = h * [ (f(a + h) - f(a)) / h ] ``` As `h` tends to 0 the bracket tends to the finite number `f'(a)`, and the leading factor `h` tends to 0. The product of something tending to 0 and something tending to a finite limit tends to 0. Hence `f(a+h) - f(a) -> 0`, i.e. `f(a+h) -> f(a)`, which is exactly continuity at `a`. Note where finiteness is used: if the bracket blew up, the product could be anything, which is why a vertical tangent is excluded from differentiability. The contrapositive is the useful working form: **if a function is discontinuous at a point, it cannot be differentiable there.** Checking continuity first is often the fastest way to rule out a derivative. ### The converse is false The standard counterexample is the oscillating function ``` f(x) = x * sin(1/x) for x not 0, f(0) = 0 ``` **Continuity at 0.** Since `-1 <= sin(t) <= 1` for every real `t`, we get `|x*sin(1/x)| <= |x|`. Both `-|x|` and `|x|` tend to 0 as `x` tends to 0, so the squeeze forces `f(x) -> 0 = f(0)`. The function is therefore continuous at the origin, and it is obviously continuous everywhere else, where it is a product of continuous functions. **Non-differentiability at 0.** The difference quotient at the origin is ``` (f(0 + h) - f(0)) / h = (h*sin(1/h) - 0) / h = sin(1/h) ``` As `h` shrinks, `1/h` runs off to infinity, so `sin(1/h)` cycles through the full range from `-1` to `1` infinitely many times in every neighbourhood of 0. Along one sequence of `h` values the quotient equals `1`; along another it equals `-1`; along another it equals `0`. Since different approaches give different values, the limit does not exist and there is no derivative at 0 — despite the graph being unbroken. ### A sharper cousin: differentiable but not continuously differentiable Change the multiplier to `x^2`: ``` g(x) = x^2 * sin(1/x) for x not 0, g(0) = 0 ``` Now the quotient at 0 is `h*sin(1/h)`, bounded in magnitude by `|h|`, so it is squeezed to 0 and `g'(0) = 0` genuinely exists. Yet away from the origin the derivative contains a `-cos(1/x)` term that keeps oscillating, so `g'` has no limit as `x` approaches 0 and is discontinuous there. This shows a third tier: continuous, differentiable, and continuously differentiable are three distinct conditions, each strictly stronger than the last. ### How badly can the converse fail? Spectacularly. Weierstrass constructed a function that is continuous at every real number and differentiable at none. So continuity does not merely fail to imply differentiability at isolated points — a continuous function can have no derivative anywhere at all. Intuition trained on polynomials badly underestimates how much room continuity leaves. ### The failure modes worth naming A continuous function can miss a derivative at a point because of: - a **corner**, where both one-sided slopes exist but differ; - a **vertical tangent**, where the quotient grows without bound, as for `x^(1/3)` at 0; - **oscillation**, where the quotient keeps swinging without settling, as above. ### Why this matters in practice Objectives assembled from maxima, absolute values, or piecewise definitions are continuous but not everywhere differentiable, and methods that assume a gradient exists everywhere need either a generalisation of the derivative or a smoothing step. Conversely, when you are told a quantity is continuous in a parameter, that alone gives no license to differentiate it or to talk about its rate of change. Asking which of the three tiers — continuous, differentiable, continuously differentiable — you actually have is a habit worth keeping.
- Why does differentiability at a point force continuity there?Write `f(a+h) - f(a) = h * [(f(a+h) - f(a))/h]`. As `h` goes to 0 the bracket tends to the finite derivative and the leading factor tends to 0, so the product tends to 0. That says `f(a+h)` tends to `f(a)`, which is continuity. Finiteness of the derivative is what makes the product argument work.
- Is x^2 times sin(1/x), with value 0 at the origin, differentiable at 0?Yes. The difference quotient is `h*sin(1/h)`, bounded by `|h|` in magnitude, so it is squeezed to 0 and the derivative at 0 equals 0. But the derivative away from 0 contains an oscillating cosine term with no limit at the origin, so the function is differentiable there without being continuously differentiable.
- Can a function be continuous everywhere and differentiable nowhere?Yes. Weierstrass exhibited a function that is continuous at every real number yet has a derivative at no point. It shows that continuity is a far weaker constraint than intuition trained on polynomials suggests, and that the failure of the converse is not limited to isolated bad points.
Continuity says the road has no gaps; differentiability says the road also has a well-defined heading at every point. A road can be perfectly unbroken and still zigzag so violently that at one spot no compass bearing describes it.
saying these in an interview costs you the question
- States that continuous functions are always differentiable
- Reverses the implication and calls differentiability the weaker condition
- Says x times sin(1/x) is discontinuous at 0 because 1/x blows up
- Claims sin(1/h) tends to 0 as h tends to 0
- Argues that one counterexample is not enough to refute the claim