Introduction

A function is continuous where its graph has no break, and differentiable where the graph also has a well-defined tangent slope. Both are defined by limits, and the hypotheses of the mean value theorems, the tests for maxima and minima and the fundamental theorem of calculus are stated in these terms. The tasks are to check continuity or differentiability of a piecewise or absolute-value function at a point, find the constants that make a function smooth, count the points where a function fails to be differentiable, or test the "continuous but not differentiable" examples.

Prerequisites

  • Limits: one-sided limits, limit laws, standard limits.

Core concepts

Continuity at a point

ff is continuous at aa if all three hold:

  1. f(a)f(a) is defined;
  2. lim⁡x→af(x)\lim_{x \to a} f(x) exists (left and right limits exist and agree);
  3. lim⁡x→af(x)=f(a)\lim_{x \to a} f(x) = f(a).

Equivalently, for every ε>0\varepsilon>0 there exists δ>0\delta>0 such that for every xx in the domain, ∣x−a∣<δ  ⟹  ∣f(x)−f(a)∣<ε|x - a| < \delta \implies |f(x) - f(a)| < \varepsilon. Right-continuity at aa uses only lim⁡x→a+\lim_{x \to a^+}, and left-continuity only lim⁡x→a−\lim_{x \to a^-}. ff is continuous on an open interval if it is continuous at every point, and on [a,b][a, b] if in addition it is right-continuous at aa and left-continuous at bb.

Sums, differences, products and constant multiples of continuous functions are continuous; so is a quotient wherever the denominator is non-zero, and so is a composition g∘fg \circ f when ff is continuous at aa and gg at f(a)f(a). Polynomials, sin⁡\sin, cos⁡\cos, exe^x and ∣x∣|x| are continuous everywhere; ln⁡x\ln x and x\sqrt{x} on their domains; rational functions and tan⁡x\tan x wherever defined. ⌊x⌋\lfloor x \rfloor is discontinuous at every integer (it is right-continuous there).

Kinds of discontinuity

KindWhat happens at aaExample
Removablethe limit exists but f(a)f(a) is undefined or different from it(x2−4)/(x−2)(x^2 - 4)/(x - 2) at 2
Jumpleft and right limits exist (finite) but differ⌊x⌋\lfloor x \rfloor at an integer
Infinitea one-sided limit is ±∞\pm\infty1/x1/x at 0
Oscillatorya one-sided limit fails to exist without being infinitesin⁡(1/x)\sin(1/x) at 0

A removable discontinuity is repaired by redefining f(a)f(a) as the limit; the others cannot be repaired.

Two theorems about continuous functions on [a,b][a, b]

Intermediate value theorem (IVT). If ff is continuous on [a,b][a, b] and NN lies between f(a)f(a) and f(b)f(b), then f(c)=Nf(c) = N for some c∈[a,b]c \in [a, b]. In particular, if f(a)f(a) and f(b)f(b) have opposite signs, ff has a root in (a,b)(a, b); this is the basis of the bisection method.

Extreme value theorem. If ff is continuous on the closed, bounded interval [a,b][a, b], it attains a maximum and a minimum value there. Both hypotheses matter: 1/x1/x on (0,1](0, 1] is unbounded, and xx on (0,1)(0, 1) has no maximum.

The derivative

ff is differentiable at aa if

f′(a)=lim⁡h→0f(a+h)−f(a)hf'(a) = \lim_{h \to 0} \frac{f(a + h) - f(a)}{h}

exists (finite). Geometrically, f′(a)f'(a) is the slope of the tangent at (a,f(a))(a, f(a)). The left and right derivatives use h→0−h \to 0^- and h→0+h \to 0^+; ff is differentiable at aa if and only if both exist and are equal.

Differentiable implies continuous. If f′(a)f'(a) exists, then f(a+h)−f(a)=h⋅f(a+h)−f(a)h→0⋅f′(a)=0f(a + h) - f(a) = h \cdot \frac{f(a + h) - f(a)}{h} \to 0 \cdot f'(a) = 0. The converse fails, in three typical ways:

  • Corner: ∣x∣|x| at 0 has left derivative −1-1 and right derivative 11.
  • Vertical tangent: x1/3x^{1/3} at 0 has difference quotient h−2/3→∞h^{-2/3} \to \infty.
  • Oscillation: xsin⁡(1/x)x\sin(1/x) (with value 0 at 0) has difference quotient sin⁡(1/h)\sin(1/h), which has no limit.
|x| is continuous but not differentiable at 0, and the kinds of discontinuity
Figure 1. Panel A: y=∣x∣y = |x| is continuous at 0 but has a corner there, with left slope −1-1 and right slope 11. Panels B to D: a removable discontinuity ((x2−4)/(x−2)(x^2 - 4)/(x - 2), hole at (2,4)(2, 4)), a jump (⌊x⌋\lfloor x \rfloor) and an infinite discontinuity (1/x1/x).

Rules and standard derivatives

Linearity, product (uv)′=u′v+uv′(uv)' = u'v + uv', quotient (u/v)′=(u′v−uv′)/v2(u/v)' = (u'v - uv')/v^2, and chain rule (g∘f)′(x)=g′(f(x))f′(x)(g \circ f)'(x) = g'(f(x))f'(x). For an inverse function, (f−1)′(y)=1/f′(x)(f^{-1})'(y) = 1/f'(x) where y=f(x)y = f(x) and f′(x)≠0f'(x) \ne 0.

f(x)f(x)f′(x)f'(x)f(x)f(x)f′(x)f'(x)
xnx^nnxn−1nx^{n-1}ln⁡x\ln x1/x1/x
exe^xexe^xaxa^x, a>0a>0axln⁡aa^x \ln a
sin⁡x\sin xcos⁡x\cos xcos⁡x\cos x−sin⁡x-\sin x
tan⁡x\tan xsec⁡2x\sec^2 xtan⁡−1x\tan^{-1} x1/(1+x2)1/(1 + x^2)

For differentiable real functions u,vu,v with u(x)>0u(x)>0, to differentiate u(x)v(x)u(x)^{v(x)}, differentiate ln⁡y=vln⁡u\ln y = v \ln u: y′=y (v′ln⁡u+vu′/u)y' = y\,(v' \ln u + v u'/u). For example (xx)′=xx(ln⁡x+1)(x^x)' = x^x(\ln x + 1).

Derivative versus continuous derivative. A function can be differentiable everywhere while f′f' is not continuous. f(x)=x2sin⁡(1/x)f(x) = x^2\sin(1/x) with f(0)=0f(0) = 0 has f′(0)=lim⁡hsin⁡(1/h)=0f'(0) = \lim h\sin(1/h) = 0, yet f′(x)=2xsin⁡(1/x)−cos⁡(1/x)f'(x) = 2x\sin(1/x) - \cos(1/x) for x≠0x \ne 0 has no limit at 0.

Piecewise functions

At a junction point aa of a piecewise definition:

  • continuity: the two pieces have the same value at aa (left limit = right limit = f(a)f(a));
  • differentiability: in addition, the left and right derivatives agree. When each piece is differentiable near aa and ff is continuous at aa, these one-sided derivatives can be read from the pieces' own derivative formulas evaluated at aa.

For ∣g(x)∣|g(x)| with gg differentiable: at a simple root of gg (where g(a)=0g(a) = 0, g′(a)≠0g'(a) \ne 0) the graph has a corner; away from roots ∣g∣|g| is differentiable. At a root where g′(a)=0g'(a) = 0 as well, ∣g∣|g| is differentiable at aa (for example ∣x3∣|x^3| or ∣x∣x|x|x).

Worked examples

Example 1: a constant for continuity

f(x)=sin⁡kxxf(x) = \dfrac{\sin kx}{x} for x≠0x \ne 0 and f(0)=3f(0) = 3. Since lim⁡x→0sin⁡(kx)/x=k\lim_{x \to 0} \sin(kx)/x = k, ff is continuous at 0 exactly when k=3k = 3.

Example 2: classify the discontinuities

  • x2−4x−2\dfrac{x^2 - 4}{x - 2} at 2: equals x+2x + 2 for x≠2x \ne 2, limit 4, undefined at 2: removable.
  • ⌊x⌋\lfloor x \rfloor at x=2x = 2: left limit 1, right limit 2: jump.
  • 1x−1\dfrac{1}{x - 1} at 1: −∞-\infty from the left, +∞+\infty from the right: infinite.
  • sin⁡(1/x)\sin(1/x) at 0: values sweep through [−1,1][-1, 1] in every neighbourhood: oscillatory.

Example 3: constants for differentiability

f(x)=ax+bf(x) = ax + b for x<1x < 1, f(x)=x2f(x) = x^2 for x≥1x \ge 1. Continuity at 1: a+b=1a + b = 1. Equal one-sided derivatives: a=2a = 2. So a=2a = 2, b=−1b = -1, and the line is the tangent y=2x−1y = 2x - 1 to y=x2y = x^2 at x=1x = 1.

Example 4: counting non-differentiable points

f(x)=∣x−1∣+∣x−2∣f(x) = |x - 1| + |x - 2| has slopes −2-2 on (−∞,1)(-\infty, 1), 00 on (1,2)(1, 2) and 22 on (2,∞)(2, \infty). It is continuous everywhere and fails to be differentiable at exactly 2 points, x=1x = 1 and x=2x = 2. Likewise ∣x2−3x+2∣=∣(x−1)(x−2)∣|x^2 - 3x + 2| = |(x - 1)(x - 2)| has corners at its two simple roots 1 and 2.

Example 5: smooth once, not twice

f(x)=x∣x∣f(x) = x|x|: f(x)=x2f(x) = x^2 for x≥0x \ge 0 and −x2-x^2 for x<0x < 0. Both one-sided derivatives at 0 are 0, so f′(x)=2∣x∣f'(x) = 2|x| for all xx, which is continuous. But f′f' has a corner at 0, so f′′(0)f''(0) does not exist.

Example 6: a root by the IVT

p(x)=x3−x−1p(x) = x^3 - x - 1 has p(1)=−1<0p(1) = -1 < 0 and p(2)=5>0p(2) = 5 > 0, so a root lies in (1,2)(1, 2). Bisection: p(1.5)=0.875>0p(1.5) = 0.875 > 0, so the root is in (1,1.5)(1, 1.5); p(1.25)≈−0.297<0p(1.25) \approx -0.297 < 0 narrows it to (1.25,1.5)(1.25, 1.5). (The root is about 1.3247.)

Example 7: derivative from the definition

For f(x)=x2sin⁡(1/x)f(x) = x^2\sin(1/x), f(0)=0f(0) = 0: f(h)−f(0)h=hsin⁡(1/h)\dfrac{f(h) - f(0)}{h} = h\sin(1/h), and ∣hsin⁡(1/h)∣≤∣h∣→0|h\sin(1/h)| \le |h| \to 0, so f′(0)=0f'(0) = 0. For g(x)=xsin⁡(1/x)g(x) = x\sin(1/x), g(0)=0g(0) = 0, the quotient is sin⁡(1/h)\sin(1/h), which has no limit: gg is continuous at 0 (squeeze) but not differentiable there.

Example 8: chain rule and logarithmic differentiation

ddxsin⁡(x2)=2xcos⁡(x2)\frac{d}{dx}\sin(x^2) = 2x\cos(x^2). ddxesin⁡x=cos⁡x esin⁡x\frac{d}{dx}e^{\sin x} = \cos x\, e^{\sin x}. For y=xxy = x^x (x>0x > 0), ln⁡y=xln⁡x\ln y = x \ln x gives y′/y=ln⁡x+1y'/y = \ln x + 1, so y′(1)=1y'(1) = 1 and y′(e)=2eey'(e) = 2e^e.

Important properties and observations

  • Differentiable   ⟹  \implies continuous   ⟹  \implies limit exists; none of the reverse implications holds.
  • A function can be continuous everywhere and differentiable nowhere (Weierstrass's function), so "continuous" says nothing about smoothness.
  • At a corner, both one-sided derivatives exist but differ; at a vertical tangent or under oscillation, at least one fails to exist.
  • The sum of a differentiable and a non-differentiable function is non-differentiable at that point, but two non-differentiable functions can sum to a differentiable one: ∣x∣+(−∣x∣)=0|x| + (-|x|) = 0.
  • A continuous function on [a,b][a, b] that is never zero keeps one sign there (IVT).

GATE examination perspective

  • Continuity or differentiability at a point of a piecewise, absolute-value or floor function.
  • Find constants that make a function continuous or differentiable (Examples 1 and 3).
  • Count points of non-differentiability of sums of ∣x−c∣|x - c| terms or of ∣g(x)∣|g(x)|.
  • Classic counterexamples: ∣x∣|x|, x1/3x^{1/3}, xsin⁡(1/x)x\sin(1/x), x2sin⁡(1/x)x^2\sin(1/x).
  • IVT to locate a root or decide whether an equation has a solution in an interval.
  • Trap: concluding differentiability from continuity, or from equal one-sided limits of ff instead of f′f'.
  • Trap: reading the one-sided derivatives from the piece formulas when ff is discontinuous at the junction; a discontinuous function is never differentiable there.

Summary

Sources

  1. G. Strang, Calculus, 3rd ed., Wellesley-Cambridge Press, 2017, Sections 2.1 (The Derivative of a Function), 2.5 (The Product and Quotient and Power Rules), 2.7 (Continuous Functions), 4.1 (The Chain Rule) and 4.3 (Inverse Functions and Their Derivatives). Free edition on MIT OpenCourseWare, (consulted 2026-11-11).

Next steps