The Derivative

Slope at every point becomes a new function. Trace it, draw your own curve and watch its derivative appear, and read the shape of a graph from f′ and f″

The Derivative

A tangent line has a slope at one point. Slide the point along the curve and the slope changes with it, so slope itself becomes a function of x. That new function is the derivative, f′, and it describes the original graph: where it climbs, where it falls, and where it turns.

Tracing f′

A point sweeps along the curve carrying its tangent. Underneath, the tangent’s slope is plotted at the same x, and the trail it leaves is the graph of f′. Drag to steer it, and try |x| and x^(2/3) to see where a slope fails to exist.

−2.5
x
−8.125
f(x)
15.75
slope of the tangent, f′(x)
At x = −2.5 the tangent has slope 15.75, so the lower graph passes through (−2.5, 15.75). f is climbing here, so f′ is above the axis.

Drag anywhere on the plot to move the point by hand. The exact f′ is found by symbolic differentiation of your formula; violet rings mark points where f is defined but has no derivative, found by comparing the slopes from each side.

Go deeper:The Derivative as a Function

The derivative of f is the function whose value at each x is the slope of the tangent there:

f′(x) = lim_(h → 0) [f(x + h) − f(x)]/h,

defined wherever that limit exists. Other notations say the same thing: dy/dx, df/dx and (d/dx) f(x) come from Leibniz and record the ratio of tiny changes; f′ and f″ come from Lagrange; physicists also write ẏ, Newton’s dot, for a rate in time.

Working the limit for x³ shows the pattern: (x + h)³ − x³ = 3x²h + 3xh² + h³, so the quotient is 3x² + 3xh + h², which tends to 3x². For sin x the identity sin(x + h) − sin x = sin x (cos h − 1) + cos x sin h, together with sin h/h → 1 and (cos h − 1)/h → 0, gives cos x.

A derivative can fail to exist in three typical ways. At a corner such as |x| at 0, the one-sided slopes are both finite but differ (−1 and 1). At a cusp such as x^(2/3) at 0, they run off to −∞ and +∞. At a vertical tangent such as ∛x at 0, both sides run to the same infinity. A function that is differentiable at a point is always continuous there, but the converse fails: |x| is continuous everywhere. Weierstrass presented a function to the Berlin Academy in 1872 that is continuous everywhere and differentiable nowhere.

Draw Your Own

Draw any curve in the top panel with a mouse or a finger. Its derivative appears underneath as you draw, green where your curve climbs and rose where it falls. Every peak and valley sits directly over a zero of f′.

smoothing 2 of 5
1
peaks (f′ crosses + to −)
0
valleys (f′ crosses − to +)
−1.37
steepest slope, at x = 1.4

f′ crosses zero at x ≈ 0. Follow the dashed lines up: each one lands on a peak of your curve. Where the drawing climbs, f′ is green and positive; where it falls, rose and negative.

Your stroke is recorded as one height for each of 301 x values (drawing over a part replaces it), then smoothed with a Gaussian of adjustable width, shown with the faint raw stroke behind it. Slopes are central differences. A hand-drawn line is jittery at small scales, and differentiation magnifies jitter; with smoothing off, f′ shows that roughness, and f″ amplifies it again. Try the corner: smoothing rounds it, so f′ becomes a steep step instead of a jump.

Go deeper:Reading f′ From a Picture

Sketching f′ from the graph of f needs no formula, only these facts:

  • Where f rises, f′ > 0; where f falls, f′ < 0.
  • At a smooth peak or valley the tangent is horizontal, so f′ = 0 there.
  • Where f is locally steepest, f′ has a peak or valley of its own; those points are typically the inflection points of f.
  • A straight stretch of f gives a constant stretch of f′; a corner in f gives a jump in f′.

The second derivative, f″, is the slope of the slope. It is positive where f′ increases, so the tangent turns anticlockwise as you move right and the curve bends upward. Its zeros line up with the peaks and valleys of f′.

Differentiating a measured curve, a hand-drawn line or real data, is delicate. A wiggle of height ε and width w has slope about ε/w, which is large even when ε is tiny. That is why the demo smooths your stroke first, and why the second derivative needs more smoothing still. Integration, the reverse operation, behaves the other way: it averages noise out.

The Shape of a Graph

f, f′ and f″ in three aligned panels. Shading shows where f rises or falls and which way it bends. Drag the cursor across and read the story of the curve from the two signs.

rising (f′ > 0)falling (f′ < 0)concave up ∪ (f″ > 0)concave down ∩ (f″ < 0)
1.6
x (drag on the plot)
−0.704
f(x)
4.68
f′(x): rising or falling
9.6
f″(x): which way it bends
At x = 1.6 the graph is rising and bending upward: growth is speeding up.
critical pointf″ theresecond-derivative testfirst-derivative test
(−1, 2)−6f″ < 0 → max+ then − → max
(1, −2)6f″ > 0 → min− then + → min

f′ and f″ are found by symbolic differentiation; their zeros by scanning for sign changes and refining by bisection, plus a search for zeros where f′ touches the axis without crossing (as x³ does at 0). Try x³ and x⁴ − 4x³ to see the second-derivative test fall silent while the first-derivative test still decides.

Go deeper:First and Second Derivative Tests

A critical point is where f′(c) = 0 or f′(c) does not exist. Local maxima and minima of a differentiable function can only occur at critical points (Fermat’s theorem), but not every critical point is one: x³ is flat at 0 and keeps rising.

First-derivative test. If f′ changes from positive to negative at c, f has a local maximum; from negative to positive, a local minimum; if f′ keeps its sign, neither.

Second-derivative test. If f′(c) = 0 and f″(c) < 0, the graph is bending down at a flat point, so c is a local maximum; if f″(c) > 0, a local minimum. If f″(c) = 0 the test says nothing: x⁴, −x⁴ and x³ all have f′(0) = f″(0) = 0 and give a minimum, a maximum and neither.

An inflection point is where the concavity changes, which for a twice-differentiable function means f″ changes sign. f″ = 0 alone is not enough: x⁴ has f″(0) = 0 but is concave up on both sides.

Together the two signs give four shapes: rising and bending up (growth accelerating), rising and bending down (growth slowing), falling and bending up (decline easing), falling and bending down (decline accelerating). News reports that “the rate of increase is slowing” are describing the second of these: f′ > 0 and f″ < 0.

Key Takeaways

  • The derivative f′ gives the slope of the tangent at every x, so it is itself a function.
  • f′ fails to exist at corners, cusps and vertical tangents, even where f is continuous.
  • f rises where f′ > 0 and falls where f′ < 0; peaks and valleys sit over zeros of f′.
  • f″ measures bending: concave up where f″ > 0, concave down where f″ < 0, with inflection points between.

Spot a mistake or have an idea?

Search