Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

The derivative

The slope of a curve at a single point can now be defined, because the limit supplies exactly the missing idea: the tangent slope is the number the secant slopes close in on.

Everything in this lesson comes from one formula, applied patiently. The earlier lessons supply the two things it needs: a definition of the limit as a promise about tolerances, and the warning from continuity that some curves have no slope at some points, so the definition must be allowed to fail rather than being assumed to work.

The definition

Fix a point a in the domain of f. A second point at horizontal distance h gives the secant slope

f(a+h)-f(a)h

which is an ordinary quotient of ordinary numbers for every h0, and is undefined at h=0. The derivative of f at a is the limit of that quotient as h approaches zero:

f(a)=limh0f(a+h)-f(a)h

When the limit exists, f is differentiable at a and f(a) is the slope of the tangent line there. When it does not, f has no derivative at a, and this happens often enough that the qualification matters.

An equivalent form replaces a+h by a variable point x, giving f(a)=limxa(f(x)-f(a))/(x-a). The two are the same statement with different bookkeeping, and both are used: the first is easier to compute with, the second easier to reason with.

Note where the difficulty went. The expression is 0/0 at h=0, which is why no algebraic evaluation is possible and why the limit is indispensable. Every derivative computed from the definition is an indeterminate form resolved by the techniques of the limits lesson, and in practice the resolution is nearly always the same: cancel an h that appears in every term of the numerator.

Three derivatives from first principles

Take f(x)=x2. The numerator is (x+h)2-x2=2xh+h2, so the quotient is (2xh+h2)/h, which for h0 equals 2x+h. That is a polynomial in h, so the limit is a substitution: f(x)=2x. At x=1 this gives 2, which is the number the secants of the first lesson were closing on.

Take f(x)=1/x, with x0. The numerator is 1x+h-1x=x-(x+h)x(x+h)=-hx(x+h). Dividing by h gives -1/[x(x+h)], and now substitution is legal: f(x)=-1/x2. At x=2 that is -0.25, matching the secant values of -0.238 and -0.2488 computed earlier for h=0.1 and h=0.01. The sign is negative everywhere, as it must be for a function that falls on both branches.

Take f(x)=x, with x>0. Here the trick is the conjugate. Multiplying the quotient above and below by x+h+x turns the numerator into (x+h)-x=h, so the quotient becomes 1/(x+h+x), and the limit is

f(x)=12x

At x=9 that is 1/6=0.16667, and the secant with h=0.001 gives 0.166662. Notice the behaviour near zero: as x shrinks the derivative grows without bound, which is the graph turning vertical at the origin.

Example. Differentiate f(x)=x2-5x from the definition and find the slope at x=1.

The numerator is [(x+h)2-5(x+h)]-[x2-5x]=2xh+h2-5h. Every term carries an h, so dividing gives 2x+h-5, and the limit as h0 is f(x)=2x-5. At x=1 the slope is -3: the curve is falling there, which is right, since the vertex of this parabola sits at x=2.5.

Now you. Differentiate f(x)=3x2+2 from the definition.

Answer

The numerator is 3(x+h)2+2-3x2-2=6xh+3h2, so the quotient is 6x+3h and the limit is f(x)=6x. The constant 2 contributes nothing, because it cancels in the difference: shifting a graph up does not change any slope on it.

A function, not a number

In each of those calculations the answer came out as a formula in x rather than a single value, which is the step that makes calculus a machine rather than a collection of measurements. The derivative function f assigns to each point where f is differentiable the slope of f there, and it has its own domain, its own graph, and its own derivative.

That last remark gives the second derivative f′′, the rate at which the slope itself is changing. For f(x)=x2 the derivative is 2x and the second derivative is the constant 2: the slope increases at a steady rate, which is exactly what a parabola opening upward looks like. Third and higher derivatives follow by repetition, and the notation f(4) takes over once primes become unreadable.

The physical reading is worth fixing now because the whole of mechanics uses it. If s(t) is position, then s(t) is velocity and s′′(t) is acceleration. Newton's second law, F=ma, is therefore a statement about a second derivative, which is why the equations of physics are differential equations and why this course is a prerequisite for reading them.

Two notations

Lagrange's notation, f(x), is compact and treats the derivative as an operation producing a new function. It is best when the functions are the objects of interest.

Leibniz's notation writes the same thing as

dydx

which records more. It names both variables, so in a problem with several it is unambiguous which is varying with respect to which. It carries the units correctly: if y is in metres and x in seconds, the symbol reads as metres per second without any further convention, and a derivative of position with respect to time therefore has units of m s⁻¹ while its own derivative has m s⁻². And it survives the chain rule in a form that looks like cancelling fractions, which is the main reason physicists use it and the main reason it must be handled with care: dy/dx is a single symbol, the limit of a ratio, not a ratio of two quantities called dy and dx. The nineteenth century spent considerable effort removing the implication that it is, and the notation kept the shape anyway because the shape is a good mnemonic.

A value at a specific point is written f(3) in one notation and, less gracefully, as dy/dx evaluated at x=3 in the other. Time derivatives in mechanics often use Newton's dot, x˙ and x¨, which is unbeatable for brevity when the independent variable is always time.

Example. A stone falls from rest, so its distance fallen is s=4.9t2 metres after t seconds. Find its velocity at t=2 from the definition.

The difference quotient is [4.9(2+h)2-4.9(4)]/h=[19.6h+4.9h2]/h=19.6+4.9h, so the limit is 19.6 metres per second. Numerically the quotient at h=0.1 is 20.09, at h=0.01 it is 19.649, and at h=0.001 it is 19.6049, closing on 19.6 exactly as the algebra says.

Now you. For the same stone, find the velocity at t=3, and the acceleration.

Answer

The same working with 2 replaced by 3 gives 29.4+4.9h, so the velocity is 29.4 metres per second. In general s(t)=9.8t, whose derivative is the constant 9.8, so the acceleration is 9.8 m s⁻², which is g, as it should be for a body in free fall.

Differentiable implies continuous

There is one implication between the two conditions, and it goes one way only.

Suppose f is differentiable at a. For xa write the identity

f(x)-f(a)=f(x)-f(a)x-a(x-a)

which is true because the fraction has been multiplied by what was just divided out. Take the limit as xa. The first factor tends to f(a), a finite number, by assumption. The second tends to zero. By the product law the whole right side tends to f(a)0=0, so f(x)f(a), which is the definition of continuity at a.

So differentiability is the stronger condition, and the intuition matches: a function with a jump has a difference quotient that blows up across the jump, since a non-zero numerator is divided by a vanishing denominator.

The converse fails, and the previous lesson has already met the counterexample. For f(x)=|x| at zero the difference quotient is |h|/h, which is +1 for positive h and -1 for negative h. Both one-sided limits exist and disagree, so there is no derivative, while the function is perfectly continuous. The graph has a corner.

Two other failures are worth recognising by their difference quotients. For f(x)=x1/3 at zero the quotient is h1/3/h=h-2/3, which grows without bound from both sides: the tangent is vertical, and a vertical line has no slope. For f(x)=x2/3 at zero the quotient is h-1/3, which goes to + from the right and - from the left: a cusp, where the curve comes to a point. In every case the diagnosis is the same, that the limit defining the derivative fails to exist, and the cases differ only in how it fails.

Reading a derivative

Once f is available as a function, three features of it describe f completely enough to sketch it.

The sign says direction. Where f>0 the tangent lines slope up and the function is increasing; where f<0 it is decreasing. This is the fact that makes derivatives useful for finding maxima, and it is stated here as a plausible reading rather than a theorem, because proving it needs the Mean Value Theorem, which arrives in a few lessons.

The magnitude says steepness, in the units of the problem. A derivative of -0.25 for 1/x at x=2 says that increasing x by a small amount Δx decreases y by about 0.25Δx. At x=0.5 the derivative is -4, sixteen times steeper, which is the same curve behaving very differently at a different place.

Example. For f(x)=1/x, find f(0.5) and use it to estimate f(0.51).

The derivative is -1/x2, so f(0.5)=-1/0.25=-4. A step of 0.01 in x should therefore change y by about -4×0.01=-0.04, predicting f(0.51)2-0.04=1.96. The true value is 1/0.51=1.960784, so the prediction is right to three decimal places, and it was made without evaluating the function at the new point.

Now you. For f(x)=x3, whose derivative is 3x2, estimate f(2.01) from the value and derivative at x=2.

Answer

The derivative at x=2 is 12, so the estimate is 8+12×0.01=8.12. The true value is 8.120601, high by 0.0006.

A zero says flat. At a point where f(a)=0 the tangent is horizontal, which happens at the top of a hill, the bottom of a valley, and also at neither, as at x=0 on y=x3, where the curve merely pauses on its way up. Distinguishing those cases is the business of a later lesson.

What this costs, and what comes next

Every derivative in this lesson was computed by expanding a difference, cancelling an h, and taking a limit, and each took a paragraph. That is unsustainable. There is no chance of differentiating (3x2+1)10/x2+4 this way, and even x7 requires the binomial expansion to be written out.

There is also a strong hint that no such labour should be necessary, because the answers are suspiciously tidy: x2 gives 2x, x3 gives 3x2, x1/2 gives 12x-1/2, and x-1 gives -x-2. In every case the exponent has come down as a multiplier and dropped by one. If that pattern is genuine, and if the derivative of a sum, a product and a composition can be expressed in terms of the derivatives of the parts, then differentiation becomes mechanical and the limit definition retires to the role of justifying the rules.

That is exactly what happens, and the next lesson derives each rule from the definition rather than quoting it, because a rule whose derivation you have seen is a rule you can repair when you misremember it.