Contents / Calculus / Derivatives
Chapter 2
Derivatives
Compute derivatives and interpret rates of change.
Introduction
The derivative of a function measures its instantaneous rate of change. Geometrically, is the slope of the tangent line to at ; physically, it is the speed at which a quantity is changing at one instant rather than on average over an interval.
Derivatives power every optimisation problem, every physical law stated as a rate, and every approximation method in applied mathematics. The formal definition,
captures a single idea: zoom in on a curve until it looks straight, then measure the slope of that line. Everything in this chapter follows from it. The first three sections say precisely what the definition means and when it fails; the middle of the chapter builds the rules that let you differentiate any function written down in closed form, proving each one; the last sections put the derivative to work.
2.1The derivative at a point and as a function
Definition 2.1 (Derivative at a point). Let be defined on an open interval containing . The derivative of at is
whenever this limit exists, in which case is said to be differentiable at . Writing , the same limit reads
The quotient inside the limit is the slope of the secant line through the two points and on the graph of : rise over run. As the second point slides toward the first, the secant pivots into the tangent, and its slope becomes the derivative. The two forms of the definition are the same limit in different clothes; the -form is usually better for algebra, the form for theory.
Two hypotheses are doing quiet work. The function must be defined on both sides of , because approaches through positive and negative values, and the limit must be a single finite number. The next two sections are about what happens when either of these fails.
The definition produces a number at each point where it succeeds. Letting the point vary turns those numbers into a new function.
Definition 2.2 (The derivative as a function). The derivative of is the function
whose domain is the set of at which the limit exists. That domain may be smaller than the domain of .
Intuition. A speedometer reports the derivative of your position. Average speed over a trip is distance divided by time — a secant slope. The speedometer needle is what that ratio tends to as the trip is shortened to an instant: km in hour, then km in minute, then metres in second, each ratio settling toward the same km/h. The limit in the definition is that settling.
Example 2.3 (A derivative from the definition). Find for directly from the definition.
Solution.
- Expand the numerator: , so .
- Divide by , which is legitimate because inside the limit:
- Let : .
- Sanity check: at the slope should equal the coefficient of , which is , and .
Example 2.4 (A square root from the definition). Find for , and state the domain of .
Solution.
- The difference quotient is , of the form as .
- Multiply by the conjugate:
- Let : .
- The domain of is , but the domain of is : at the quotient blows up, and the graph has a vertical tangent there.
Example 2.5 (The form). Find the slope of the tangent to at the point .
Solution.
- Use the second form of the definition with :
- Combine the numerator over a common denominator: , so the quotient is
- Let : .
- Sanity check: is decreasing, so the slope must be negative, and it is.
Pitfall. In the difference quotient, means "substitute everywhere appears". It does not mean . For the numerator is , not .
2.2Notation
Three notations for the derivative are in daily use, and each is best at something.
Notation (Lagrange, Leibniz and operator notation). For the following all denote the derivative:
The value at a particular point is written or, in Leibniz notation,
In physics, a derivative with respect to time is often written with a dot: .
Lagrange's prime is the most compact and the natural choice for a function of one variable. Leibniz's is longer but carries more information: it names both the dependent and the independent variable, which matters as soon as several variables are in play, and it looks like a fraction because it comes from one — the difference quotient with . Several rules later in the chapter are easiest to remember in this form; the chain rule reads
as if the 's cancelled.
Take that cancellation as a memory aid, not a fact. On its own is a single symbol for a limit; the pieces and are not yet numbers. They can be given a meaning of their own — as differentials, later in this chapter — in such a way that the fraction of the two differentials really does equal the derivative. Until then, treat as an operator: a machine that takes a function and returns its derivative. Writing says exactly that.
The second derivative, the derivative of the derivative, is written , or
the exponent recording that the operator has been applied twice. The placement is deliberate: on top, below, because two 's act on while is a single small quantity squared.
Example 2.6 (Reading a statement in each notation). The tangent to at has slope . Write this in Lagrange, Leibniz and operator notation.
Solution.
- Lagrange: with , .
- Leibniz: .
- Operator: .
- All three say the same thing; the operator form additionally shows the derivative as a function () before it is evaluated.
Pitfall. is not times over times , and the 's do not cancel to give . Equally, is not the square of : for the first is and the second is .
2.3Differentiability and continuity
Theorem 2.7 (Differentiability implies continuity). If is differentiable at , then is continuous at .
Proof. For write
As the first factor tends to and the second to , so by the product law for limits . That is, , which is continuity at .∎
Read the proof as a statement about size: near the change in is roughly times the change in , so as the change in shrinks to nothing, so does the change in . A function with a jump cannot have a derivative at the jump, because the numerator of the difference quotient refuses to go to zero while the denominator does.
The converse is false, and the failures come in a small number of recognisable shapes. To describe them precisely we need the two halves of the limit in the definition.
Definition 2.8 (One-sided derivatives). The left-hand and right-hand derivatives of at are
By the two-sided criterion for limits, exists exactly when both one-sided derivatives exist and are equal. A function is differentiable on an open interval when it is differentiable at every point of the interval.
A continuous function fails to be differentiable at in one of three ways.
A corner: both one-sided derivatives exist but differ. The model is at , where the difference quotient is for and for . The graph has two distinct tangent directions meeting at a point.
A vertical tangent: the difference quotient tends to or from both sides. The model is at , where the quotient is . The graph is smooth to the eye, but its tangent is vertical and a vertical line has no slope.
A cusp: the one-sided quotients tend to infinity with opposite signs. The model is at , where the quotient is , which tends to from the left and from the right. The graph comes to a sharp point with a vertical tangent on each side.
A discontinuity of any kind is the fourth way, and the theorem above says it is unavoidable: no derivative can exist there.
Intuition. Zoom in on a curve with a magnifying glass. A differentiable curve straightens out: at high enough magnification it is indistinguishable from a line, and the slope of that line is the derivative. A corner never straightens — at every magnification it still shows two directions. A vertical tangent straightens, but into a vertical line, which has no slope. A jump never even connects.
Example 2.9 (A corner, from the one-sided derivatives). Show that is continuous but not differentiable at .
Solution.
- Continuity: as , since .
- Right-hand derivative: for , , so the quotient is and .
- Left-hand derivative: for , , so the quotient is and .
- The one-sided derivatives differ, so does not exist. Away from the function is differentiable, with for and for .
Example 2.10 (A vertical tangent). Show that is not differentiable at , although it is differentiable everywhere else.
Solution.
- At the difference quotient is
which tends to as from either side because is small. The limit is not a finite number, so does not exist. 2. For the power rule of the next section gives , which is finite. 3. The graph passes through the origin vertically: this is a vertical tangent, not a corner. The picture is smooth; only the slope is unavailable.□
Example 2.11 (Making a piecewise function differentiable). Let
Find and so that is differentiable at .
Solution.
- Differentiability requires continuity, so the two pieces must agree at : , that is .
- The left-hand derivative comes from : .
- The right-hand derivative comes from the line: . Differentiability requires .
- Then , so the line is , which is exactly the tangent line to at . The parabola flows into its own tangent with no corner.
- Sanity check: with , the function is still continuous but has a corner, since the slopes and disagree.
Pitfall. Continuity is necessary for differentiability, not sufficient. Checking that two pieces of a function meet is only half the job; the slopes must also match from both sides.
2.4The basic rules: constants, powers and sums
Computing every derivative from the definition would be unbearable. The rest of the chapter replaces the definition with a short list of rules, each proved once from the definition and then used forever.
Theorem 2.12 (Constant, constant-multiple, sum and difference rules). Let and be differentiable at and let be a constant. Then
Proof. For the constant function, , so every difference quotient is and so is the limit.
For the constant multiple, , and the constant-multiple law for limits gives .
For the sum,
and the sum law for limits gives . The difference rule is the sum rule applied to .∎
Together these say that differentiation is linear: it passes through sums and through constant factors. In practice that is permission to differentiate a long expression term by term, dealing with each piece on its own.
Theorem 2.13 (Power rule for positive integers). For every positive integer ,
Proof. By the binomial theorem,
Subtract and divide by : every term that survives carries at least one factor of except the second,
As every term after the first vanishes, leaving .∎
The proof explains the shape of the rule: differentiating asks how responds to a small nudge , and to first order the response is copies of , one for each factor in the product that the nudge could land on.
The rule holds for every real exponent, not just positive integers, and we use that freely from here on: and are the same rule. The general case has to wait for more tools — negative integers fall to the quotient rule, and arbitrary real exponents to logarithmic differentiation — but nothing in the meantime depends on the order of proof.
Intuition. Think of as the volume of a cube of side . Grow the side by a sliver and the volume grows by three thin slabs of area and thickness (one per face-pair), plus corner pieces of negligible size and . The growth per unit of is : the power rule is a statement about how many faces a cube has.
Example 2.14 (The power rule on a polynomial). Differentiate .
Solution.
- Linearity lets us take the four terms separately and pull the coefficients out front.
- : bring the exponent down, then reduce it by one.
- and , since gives .
- by the constant rule.
- Adding up, the derivative is .
Example 2.15 (Roots and reciprocals as powers). Differentiate .
Solution.
- Rewrite every term as a power: .
- Apply the power rule term by term:
- In the original notation, .
- Sanity check on signs: decreases for , and its derivative is negative there.
Example 2.16 (Tangents parallel to a given line). Find the points on the curve where the tangent line is parallel to , and give the tangent lines.
Solution.
- Parallel lines have equal slopes, so we need .
- , and gives , so .
- The points are and .
- Through with slope : , that is . Through : .
- Sanity check: the curve is odd, so its tangent lines come in symmetric pairs, and these two are reflections of each other through the origin.
Pitfall. The power rule needs a constant exponent. It does not apply to , or , whose exponents move. Those need the exponential rule and logarithmic differentiation, both later in this chapter.
2.5The exponential function
Let and try the definition on :
The factor comes out of the limit because it does not depend on . What remains is a limit that depends only on the base — call it — and it is exactly , the slope of the graph of as it crosses the -axis. So every exponential function has a derivative proportional to itself:
Numerically, and : for the quotients are and . Somewhere between and there is a base whose constant is exactly , and that base is the most convenient one in all of calculus.
Definition 2.17 (The number ). is the base for which the slope of at is :
Its value is
Theorem 2.18 (Derivative of ).
Proof. Put in the computation above: .∎
This is the reason appears everywhere. The exponential is the function that equals its own rate of change: its height at any point is also its slope there. That makes it the natural language for anything whose growth is proportional to its size — populations, bank balances, radioactive samples — and it is why the limit in the Limits chapter, , is really a statement about a derivative.
For a general base the constant turns out to be , so that . Proving that needs the chain rule, and the proof is given in that section; the formula is stated here so you can use it right away.
Intuition. An account paying interest, compounded continuously, grows at a rate equal to its current balance: with in it, the balance grows at per year at that instant; with , at per year. That account balance is . A base of instead of is the same account growing at only of its balance per year, which is what measures.
Example 2.19 (Differentiating with ). Find for , and find .
Solution.
- Linearity splits the three terms: , , .
- So .
- At : .
Example 2.20 (A tangent to through the origin). Which tangent line to passes through the origin?
Solution.
- The tangent at has slope and passes through : .
- It passes through when , and since this forces .
- The tangent line is .
- Sanity check: the line touches the curve at and has slope , which is , the derivative there.
Example 2.21 (Matching a slope). At which point on is the tangent line parallel to ?
Solution.
- We need , since the derivative of is and the required slope is .
- So and : the point is .
- The tangent line there is . Notice that on the height and the slope always coincide, so "slope " and "height " are the same condition.
Pitfall. , not . The power rule is for a variable base with a fixed exponent; is a fixed base with a variable exponent, and the two rules are not interchangeable.
2.6Product rule
Theorem 2.22 (Product rule). If and are differentiable at , then so is , and
Proof. Subtract and add in the numerator of the difference quotient:
The first fraction is and the second is . As the difference quotients tend to and ; is a constant; and because , being differentiable, is continuous at . The limit is .∎
The proof is worth remembering for its one trick, adding and subtracting a mixed term, and for the moment at which it uses continuity: without differentiability implying continuity, the factor would not be known to settle down. The derivative of a product is not the product of the derivatives; the symmetric two-term shape is a good self-check, since an answer that is not symmetric in the roles of and has dropped a term.
Before reaching for the rule, look for a simplification. The product is just , and differentiating that directly is faster and safer.
Intuition. A rectangle with sides and has area . Grow both sides a little: the new area adds a strip of area along one edge, a strip of area along the other, and a tiny corner square of area . Divide by the time the growth took and let it shrink: the two strips give , and the corner, being a product of two small quantities, vanishes. The product rule is the two strips.
Example 2.23 (Product rule with an exponential). Find .
Solution.
- Name the factors: and , with and .
- Apply the rule: .
- Factor the common : .
- Sanity check at : the formula gives , and directly, is times something near near , whose slope at is .
Example 2.24 (Checking the rule against expansion). Differentiate two ways.
Solution.
- Product rule: .
- Expand first: , so .
- The two agree. When both factors are polynomials, expanding is often no harder; the product rule earns its keep when the factors are of different kinds, like and .
Example 2.25 (Using values from a table). Suppose , , and . Find and at .
Solution.
- .
- For , the factors are and : the derivative is .
- At : .
- No formula for was needed; the rule only consumes values and slopes at the point in question.
Pitfall. . Test it on : the product is with derivative , while .
2.7Quotient rule
Theorem 2.26 (Quotient rule). If and are differentiable at and , then is differentiable at and
Proof. The difference quotient, after putting the two fractions over the common denominator , is
Subtract and add in the numerator, as in the product rule:
As the difference quotients tend to and , and by continuity, so the limit is .∎
Order matters here in a way it does not for the product rule: comes first and is subtracted. The classroom mnemonic is "low d-high minus high d-low, over the square of what's below", where high is the numerator, low the denominator and d- means "derivative of". A quick check of the sign: is decreasing, and the rule with , gives .
That last calculation generalises, and it pays off the first instalment on the general power rule.
Corollary 2.27 (Power rule for negative integers). For every positive integer and , .
Proof. Apply the quotient rule to :
The rule earns its keep when the denominator is a genuine function, such as or . When the denominator is a single power, rewriting as , or just simplifying the algebra first, is usually cleaner.
Example 2.28 (Quotient rule with a trigonometric denominator). Find .
Solution.
- Identify the pieces: , , , (proved in the next section).
- Substitute into the rule:
- Factor if you like: .
Example 2.29 (A rational function). Differentiate and find the slope at .
Solution.
- , , .
- Numerator of the rule: .
- So , and .
- Sanity check: the function is even, so its graph is symmetric about the -axis and must have a horizontal tangent at .
Example 2.30 (A quotient with an exponential). Find for .
Solution.
- .
- At : .
- Sanity check: everywhere, with equality only at , so the function is increasing and merely flattens momentarily at .
Pitfall. The numerator of the quotient rule is , in that order. Swapping the two terms changes the sign of every answer.
2.8Derivatives of the trigonometric functions
Throughout, angles are in radians; the formulas below are false in degrees. Two limits from the Limits chapter carry the whole section:
Theorem 2.31 (Derivatives of sine and cosine).
Proof. For the sine, use the addition formula :
As the first fraction tends to and the second to , so the limit is .
For the cosine, use :
The two limits enter the proof in a way that explains them: is the statement that has slope at , and is the statement that has a horizontal tangent at its peak. The addition formulas then transport those two facts at to every other point.
The other four trigonometric functions are quotients of these two, so the quotient rule finishes the job.
Theorem 2.32 (Derivatives of the other trigonometric functions).
Proof. For the quotient rule gives
For ,
The cotangent and cosecant are the same two computations with the roles of sine and cosine exchanged, which is where their minus signs come from.∎
The list has a pattern that halves the memorising. Every co-function — cosine, cotangent, cosecant — carries a minus sign, and the formula for a co-function is obtained from the formula for its partner by swapping each function for its co-function and changing the sign.
Intuition. On the unit circle, a point moving anticlockwise at unit speed has coordinates . Its velocity vector is the position rotated a quarter turn, , because velocity is always tangent to the circle. Read off the components: the rate of change of is and that of is . The derivatives of sine and cosine are the geometry of uniform circular motion.
Example 2.33 (Simplifying before differentiating). Differentiate .
Solution.
- Quotient rule with , :
- Use : the numerator is .
- Cancel one factor: .
- Sanity check at : , and indeed near the function behaves like .
Example 2.34 (A horizontal tangent). For , find and show that the tangent is horizontal at .
Solution.
- Quotient rule with , , , :
- Factor out and use in the numerator: . So
- At , , so the numerator vanishes while the denominator is : , a horizontal tangent.
Example 2.35 (An oscillating spring). A mass on a spring has position centimetres at time seconds. Find its velocity and acceleration, and the first time at which it is momentarily at rest.
Solution.
- Velocity is and acceleration is .
- At rest means , so ; the first positive solution is .
- At that moment : the mass is at its lowest point, turning around. Notice throughout, the defining property of simple harmonic motion.
Pitfall. In degrees, , because degrees is radians. The clean formula is the reason radians are the only unit used in calculus.
2.9Chain rule
Theorem 2.36 (Chain rule). If is differentiable at and is differentiable at , then the composite , , is differentiable at and
In Leibniz notation, with and ,
Proof. Write , let be a change in , and let and be the resulting changes. The tempting argument is
and let . It is nearly right, but can be for small (for instance when is constant near , or oscillates), and then is undefined. The repair is to avoid dividing by . Define
Then holds in both cases: when by the definition of , and when because both sides are . Moreover as , by the definition of . Now divide by :
As , , and because is continuous at , so . The right side tends to .∎
In words: the derivative of the outer function, evaluated at the inner function, times the derivative of the inner function. For the outer function is and the inner is . Compositions nest and so does the rule: peel one layer at a time, always evaluating each layer's derivative at whatever is inside it.
This is the rule that matters most. Implicit differentiation, related rates, and integration by substitution are all the chain rule wearing different clothes, and a missing inner derivative is the most common mistake in the whole of calculus. Three special cases are used so often they deserve their own lines.
Corollary 2.37 (Chain rule with powers and exponentials). If is differentiable, then
The chain rule also settles the constant left hanging in the exponential section.
Theorem 2.38 (Derivative of ). For , . Consequently .
Proof. Since , we have . This is with and , so by the chain rule
Comparing with from the exponential section gives .∎
Intuition. Picture two connected gears: the big one turns the small one. To know how fast the output turns you need both ratios, and you multiply them.
Concretely: a rise in temperature sells more ice creams, and each earns dollars, so revenue rises by dollars per degree. Two rates, multiplied — that is the chain rule, and it is why Leibniz's looks like cancelling fractions.
Example 2.39 (A power of a polynomial). Find .
Solution.
- Outer function , inner function .
- Derivative of the outer at the inner: . Derivative of the inner: .
- Multiply: .
- Sanity check: expanding would produce a polynomial of degree with leading term , whose derivative starts , and so does ours.
Example 2.40 (Chain rule inside a product). Find .
Solution.
- This is a product of and ; the second factor needs the chain rule.
- , by the exponential case of the corollary with .
- Product rule: .
- Sanity check: the derivative vanishes at , where the bell-shaped graph of has its peak and trough.
Example 2.41 (Three nested layers). Find .
Solution.
- The layers are , then , then ; peel them from the outside in.
- Outermost: , which at is .
- Middle: , which at is .
- Innermost: .
- Multiply all three: .
Example 2.42 (A composite from a table). Suppose , , and . Find .
Solution.
- By the chain rule .
- The outer derivative is evaluated at the inner value , so we need , not .
- .
- The value is a decoy: it is the derivative of at the wrong point.
Example 2.43 (Chain, quotient and power together). Differentiate and simplify.
Solution.
- Set and . By the power case of the chain rule, and .
- Quotient rule:
- Both terms of the numerator contain ; factor it out and cancel three powers of the denominator:
- Expand the bracket: . So
- Sanity check at : directly, , , , , so ; the simplified formula gives .
Pitfall. and are different functions with different derivatives: the first is , with derivative ; the second is of , with derivative . Decide which layer is outermost before you differentiate anything.
2.10Implicit differentiation
Some curves refuse to be written as . A circle fails the vertical line test, yet it has a perfectly good tangent line at every point except the two where the tangent is vertical. Implicit differentiation finds that slope without ever solving for .
Method 2.44 (Implicit differentiation). Given an equation in and that defines as a function of near a point:
- Differentiate both sides with respect to , treating as an unknown function . Every term containing picks up a factor through the chain rule.
- Collect the terms containing on one side and everything else on the other.
- Solve for . The answer will usually involve both and .
The method is the chain rule and nothing else. If is a function of , then is the composite , whose derivative is ; likewise and by the product rule. That the equation defines as a differentiable function near the point is an assumption; the Implicit Function Theorem of multivariable calculus says it holds whenever the partial derivative with respect to is nonzero there, which in practice means the denominator of your answer is not zero.
Intuition. Usually sits alone on one side, as in . Sometimes and are tangled together and cannot be separated.
Differentiate anyway. Every time you meet a , remember it secretly depends on and attach ; then solve for that symbol. It is detective work: you learn how fast the hidden variable changes from the equation that traps it.
Example 2.45 (Implicit differentiation of a circle). Find for , and evaluate it at .
Solution.
- Differentiate both sides with respect to : the left side gives , where the second term is the chain rule applied to ; the right side gives .
- So , hence .
- At the slope is .
- Sanity check: the radius to has slope , and the tangent to a circle is perpendicular to the radius; is the negative reciprocal.
Example 2.46 (The folium of Descartes). The curve is the folium of Descartes. Find , the tangent line at , and the point in the first quadrant where the tangent is horizontal.
Solution.
- Differentiate: , using the product rule on .
- Collect: , so and
- At : . The tangent line is , that is .
- Horizontal tangent means the numerator vanishes: , so . Substitute into the curve: , so and, for , , . Then .
- The point is . Sanity check: it lies on the loop above the line , where the loop's top must be.
Example 2.47 (Sine and cosine of both variables). Find if .
Solution.
- Left side, chain rule: .
- Right side, product rule with the chain rule on : .
- Equate the two sides and expand the left:
- Collect the terms on the left and everything else on the right: .
- Solve, multiplying top and bottom by to tidy the signs: .
Example 2.48 (A second derivative, implicitly). Find for the circle .
Solution.
- From the first example, .
- Differentiate this with the quotient rule, remembering depends on :
- Substitute to remove the derivative:
- Use the original equation to simplify: .
- Sanity check: on the upper semicircle , so and the arc is concave down, as a dome should be.
Pitfall. Every derivative of a -term carries a factor . Writing instead of is the standard error and produces an answer with no to solve for.
2.11Derivatives of inverse functions and the logarithm
If is one-to-one it has an inverse , whose graph is the reflection of the graph of in the line . Reflection swaps rise and run, so it should invert slopes; the theorem below says exactly that, with the one caveat that a horizontal tangent on reflects to a vertical tangent on , where there is no slope.
Theorem 2.49 (Derivative of an inverse function). Let be one-to-one and continuous on an interval, and differentiable at with . Then is differentiable at and
In Leibniz notation, .
Proof. Write . For in the range of , put and ; then because is one-to-one, and , . So
A continuous one-to-one function on an interval has a continuous inverse — this is a fact from real analysis, and it is the only step not proved here — so as we have . The inner difference quotient therefore tends to , and the whole expression tends to .∎
There is a quicker route once differentiability of is known: differentiate the identity with the chain rule to get and divide. That argument assumes the inverse is differentiable; the proof above establishes it. In practice the quick route, or simply implicit differentiation, is how the formulas for specific inverses are found.
The most important inverse function is the natural logarithm, the inverse of .
Theorem 2.50 (Derivative of the natural logarithm). For ,
More generally, for , , and for any base , ,
Proof. Let , so that . Differentiate both sides implicitly with respect to : , so
For , , and the chain rule gives . For a general base, by the change-of-base formula, and is a constant.∎
The formula is remarkable: the logarithm, a transcendental function, has for its derivative the simplest rational function there is. This is why , the one power of the power rule cannot produce as a derivative (it would need ), has for its antiderivative. Combined with the chain rule,
a ratio worth recognising on sight: the derivative of the inside over the inside.
Intuition. Reflect a graph in the line and every rise becomes a run. A tangent that climbs units for every unit across, slope , reflects to one that climbs for every , slope . For at the point the slope is ; so at the reflected point the slope of is , and indeed at is .
Example 2.51 (The derivative of an inverse at a point). Let . Find .
Solution.
- is increasing (since ), so it is one-to-one and has an inverse.
- We need : solve , and works, so .
- .
- By the theorem, . Solving for explicitly would require the cubic formula; the theorem sidesteps it.
Example 2.52 (Logarithm laws before the chain rule). Differentiate for .
Solution.
- Expand with the logarithm laws first: .
- Each term is now of something simple: .
- Differentiating the quotient inside the logarithm directly gives the same answer after considerably more algebra. Expand logarithms first whenever you can.
Example 2.53 (A logarithm to another base). Find .
Solution.
- Write with .
- by the chain rule.
- So the derivative is .
Example 2.54 (Recognising a derivative). Show that satisfies .
Solution.
- Product rule on : .
- The derivative of is .
- So . In the language of the next chapters, is an antiderivative of .
Pitfall. is , not . The reciprocal slope must be taken at the corresponding point on the other graph. For above, is wrong; the answer is .
2.12Inverse trigonometric derivatives
Theorem 2.55 (Derivatives of the inverse trigonometric functions).
the first two for and the third for all . Also for , while and have the negatives of the derivatives of and .
Proof. Let , so with . Differentiate implicitly: , so . On this range of , , so , and
The choice of sign for the square root is exactly where the restriction of to is used; at the endpoints and the derivative is infinite, matching the vertical tangents of at .
For : , so and . No square root and no sign question arise, because is a polynomial in .
For , either repeat the argument with on , or use and differentiate. The remaining three follow the same pattern.∎
That and have opposite derivatives is no accident: their sum is the constant , so the derivatives must cancel. The arctangent is the one you will meet most often, because is the antiderivative of . Composed with the chain rule it reads
so for example .
Intuition. An inverse trigonometric function answers "which angle has this sine?", and its derivative says how sensitive that angle is to a small change in the value. Near , has slope : sine and angle are nearly interchangeable for small angles. Near the slope is enormous, because the sine barely moves as the angle approaches , so recovering the angle from the sine is extremely sensitive there.
The square roots come from the Pythagorean theorem: draw a right triangle with opposite side and hypotenuse , and the adjacent side, , is exactly the denominator.
Example 2.56 (Inverse trigonometric derivative with the chain rule). Find .
Solution.
- Outer function with .
- Derivative of the outer at the inner: . Derivative of the inner: .
- Multiply: , valid for .
Example 2.57 (Arctangent of a root). Find for .
Solution.
- Outer , inner with .
- .
Example 2.58 (A surprising simplification). Show that for .
Solution.
- Let . By the quotient rule, .
- Compute .
- Chain rule: .
- The derivative equals that of itself, so the two functions differ by a constant on each side of ; for that constant is , as substituting shows. This is the tangent addition formula seen through calculus.
Pitfall. The arcsine derivative has a square root, the arctangent derivative does not: versus . Mixing the two, or writing under the arctangent, is a frequent slip. Note also that is only defined for .
2.13Logarithmic differentiation
When the variable appears in both the base and the exponent, as in , neither the power rule nor the exponential rule applies: the power rule needs a constant exponent, the exponential rule a constant base. Taking logarithms first repairs this, because pulls the exponent down into a product. The same move turns products into sums and quotients into differences, which is why the method also tames long products and quotients with constant exponents.
Method 2.59 (Logarithmic differentiation). Let with (otherwise use ).
- Take the natural logarithm of both sides and expand with the logarithm laws.
- Differentiate implicitly with respect to . The left side becomes .
- Multiply through by , replacing by the original expression.
The method pays the final instalment on the power rule.
Theorem 2.60 (Power rule for real exponents). For every real number and all , . The formula also holds for whenever is defined there, and at when and is defined on both sides of .
Proof. For let , so . Differentiating, , hence
For with defined (for instance a rational with odd denominator), apply the same argument to : again, since . The case is the definition directly.∎
Intuition. Some expressions are nested puzzles where no single rule fits. The logarithm takes the puzzle apart into pieces you can differentiate, and multiplying by at the end puts it back together. It is also a bookkeeping device: the relative rate of change of a product is the sum of the relative rates of its factors, which is the product rule in a form that scales to any number of factors.
Example 2.61 (Differentiating ). Find for .
Solution.
- Set and take logarithms: .
- Differentiate both sides. The left gives by the chain rule.
- The right needs the product rule: .
- So , and multiplying by gives .
- The derivative vanishes when , that is at — the minimum of . Note also that gives the same answer through the chain rule; the two methods are the same computation.
Example 2.62 (A long product and quotient). Differentiate for .
Solution.
- Take logarithms and expand: .
- Differentiate: .
- Multiply by :
- The product and quotient rules would give the same answer as a single fraction after a page of algebra; here each factor contributed one easy term.
Example 2.63 (A variable base and exponent). Find for .
Solution.
- Let , so .
- Product rule and chain rule:
- So .
- Sanity check: as the bracket tends to and ; the function levels off at its famous limit.
Pitfall. Logarithms of negative numbers do not exist, so only makes sense where . When can be negative, take instead: the derivative of is still , so the recipe is unchanged.
2.14The table of derivatives
Every derivative you will ever compute reduces, through the product, quotient and chain rules, to the following list. It is the vocabulary of the subject and has to be known by heart; every entry has been proved earlier in this chapter or in the hyperbolic section at its end.
Summary (Derivatives of the standard functions). Powers and exponentials:
Logarithms:
Trigonometric:
Inverse trigonometric:
Hyperbolic:
Combining rules: , , , , and .
Two patterns make the list shorter than it looks. Among the exponentials and logarithms, is the base that needs no correction, and every other base pays a factor of — multiplied for , divided for . Among the trigonometric functions, every co-function carries a minus sign, and the sine family cycles . The hyperbolic family has the same cycle with the minus signs removed.
Intuition. Think of these as vocabulary words. You cannot write sentences without words, and you cannot differentiate without these; the product, quotient and chain rules are only the grammar that combines them. A derivative problem is a parsing problem: identify the outermost operation (sum? product? quotient? composition?), apply its rule, and repeat on the pieces until every piece is in the table.
Example 2.64 (A mixed sum). Differentiate .
Solution.
- It is a sum, so work term by term from the table.
- ; ; ; .
- .
Example 2.65 (Fitting initial conditions). Find constants and so that satisfies and .
Solution.
- , so .
- , so and .
- The function is . It also satisfies , a first taste of how derivatives specify functions through differential equations.
Example 2.66 (Evaluating a derivative at a point). Let . Find .
Solution.
- Quotient rule: .
- At , : .
- Sanity check: at , i.e. , so at the function is already past its peak and decreasing; the negative sign is right.
2.15Higher-order derivatives
Definition 2.67 (Second and higher derivatives). The second derivative is the derivative of , and in general the th derivative is the derivative of . Equivalent notations are
The second derivative is the rate at which the rate is changing. If is position then is velocity and is acceleration: positive under the accelerator, negative under the brake. (The third derivative even has a name, jerk — how abruptly the acceleration changes.)
Geometrically, means is increasing, so the graph of bends upward like a bowl — concave up; means it bends downward like a hill. This is what the second derivative test for extrema reads, in the applications chapter.
Higher derivatives are also what a Taylor series is made of: the th coefficient at is , which is how a smooth function is approximated by a polynomial. Functions with periodic patterns in their higher derivatives, such as , and , therefore have especially clean series, and finding the pattern is a standard exercise.
Intuition. In a car, position is what the odometer reads, velocity is what the speedometer reads, and acceleration is what you feel pressing you into the seat. Each is the derivative of the one before. Constant velocity means zero acceleration: on a straight motorway at steady speed you feel nothing, even though the odometer is climbing steadily.
Example 2.68 (Successive derivatives of a polynomial). Find all the derivatives of .
Solution.
- and .
- and .
- for all : each derivative lowers the degree by one, so a polynomial of degree has constant and everything beyond that zero.
Example 2.69 (A pattern in the derivatives of ). Find a formula for when .
Solution.
- Write and differentiate repeatedly: , , , .
- The signs alternate, the coefficients are , and the exponent is .
- So . Check with : , as computed.
Example 2.70 (The 27th derivative of cosine). Find .
Solution.
- The derivatives of cycle with period : .
- Since , the 27th derivative equals the third derivative.
- The third derivative of is .
Example 2.71 (Verifying a differential equation). Show that satisfies .
Solution.
- Product rule: .
- Again: .
- Substitute:
- Every term cancels. This is a damped oscillation: the factor shrinks the amplitude while supplies the wobble.
Pitfall. is the derivative of , not its square. For , while . The Leibniz notation keeps the distinction visible.
2.16Tangent lines, linear approximation and differentials
Definition 2.72 (Tangent line, normal line and linearization). The tangent line to at is
and the normal line is the line through perpendicular to the tangent, with slope when . The function
is the linearization of at , and for near is the linear approximation.
The linearization is the best straight-line approximation to near , in a precise sense: not only is the error small, it is small compared with the distance .
Proposition 2.73 (The error of the linear approximation). If is differentiable at , then
Proof. For ,
which tends to by the definition of the derivative.∎
No other line through has this property, which is what makes the tangent line special among all lines. The differential is the same idea with the roles renamed.
Definition 2.74 (Differentials). Let be differentiable. The differential is an independent variable (any real number), and the differential of is
If is a change in , then is the change in height along the tangent line, while is the change along the curve; for small .
This finally gives and meanings of their own such that their quotient is literally , which is what the Leibniz notation promised. In applications is a small error or change in a measured quantity and the resulting approximate error in a computed one.
Intuition. Near a point, every smooth curve looks almost exactly like its tangent line, so the tangent line is the best straight-line guess for the function a short distance away. Standing on a hillside and taking one step, you predict your change in altitude by the slope where you stand; that prediction is , the true change is , and the difference is the curvature you ignored — which the second derivative measures.
Example 2.75 (Estimating a square root). Use a linearization to estimate , and compare with the true value.
Solution.
- Take at , where and gives .
- , so .
- The true value is : an error of about one part in ten thousand. The estimate is slightly too large because is concave down, so the tangent lies above the curve.
Example 2.76 (Tangent and normal lines). Find the tangent and normal lines to at .
Solution.
- Write , so and the slope at is .
- Tangent: , that is .
- Normal: slope , so , that is .
- Sanity check: both lines pass through , and the product of their slopes is .
Example 2.77 (Linear approximation of a power). Estimate without a calculator.
Solution.
- Take at : and gives .
- With : .
- The true value is ; the linear approximation is good to about one part in a thousand.
Example 2.78 (Error propagation with differentials). The radius of a sphere is measured as cm with a possible error of cm. Estimate the maximum error in the computed volume, and the relative error.
Solution.
- , so .
- With and : cm.
- Relative error: , about .
- A relative error in the radius is tripled in the volume, because volume scales as the cube of the radius; the differential makes that factor of visible.
Pitfall. is the change along the tangent line, the change along the curve. They agree only in the limit. For from with , but ; the approximation is only useful when is small.
2.17Rates of change in the sciences
Definition 2.79 (Average and instantaneous rate of change). If , the average rate of change of with respect to over is
and the instantaneous rate of change at is its limit as , namely .
Every science has quantities that depend on others, and the derivative of one with respect to another is a rate with units: units of per unit of . Keeping track of the units is the fastest way to interpret a derivative correctly.
In physics, if is the position of a particle on a line, then is its velocity, whose sign gives the direction of motion, is its speed, and is its acceleration. In chemistry, if is the concentration of a product, is the rate of reaction, and for a first-order decay that rate is , proportional to what remains. In biology, is the growth rate of a population . In economics, if is the cost of producing units then is the marginal cost, the approximate cost of producing one more unit:
Intuition. A derivative always has the units of the top over the units of the bottom, and reading them tells you what it means. If is temperature in degrees at height in metres, then is degrees per metre: climb one metre and it gets degrees colder. If is cost in dollars for items, means the 501st item costs about .
Example 2.80 (Motion along a line). A particle moves so that its position at time seconds is metres. Find its velocity and acceleration, the times when it is at rest, and the intervals on which it moves in the positive direction.
Solution.
- and .
- At rest when : and .
- Moving in the positive direction when , which by the factored form is or . On the particle moves backward.
- At the acceleration is : the particle is at rest but about to move backward, since its velocity is decreasing through zero. Sanity check: and , so it does indeed come back toward the origin between those times.
Example 2.81 (Growth of a bacterial colony). A colony starts with bacteria and doubles every hour, so . How fast is it growing after hours?
Solution.
- by the rule for .
- At : bacteria per hour.
- Sanity check: over the fifth hour the colony grows from to , an average of per hour; the instantaneous rate at the start of that hour should be smaller, and is.
Example 2.82 (Marginal cost). A factory's cost of producing units is dollars. Find the marginal cost at and compare it with the actual cost of the 501st unit.
Solution.
- , so dollars per unit.
- The actual cost of the 501st unit is dollars.
- The marginal cost approximates the true incremental cost to within one cent, because is nearly linear over a change of one unit.
Example 2.83 (A related rate, previewed). Air is pumped into a spherical balloon so that its radius grows at cm/s. How fast is the volume growing when the radius is cm?
Solution.
- , and both and depend on time. Differentiate with respect to using the chain rule: .
- With and : cm /s.
- Every related-rates problem has this shape — a geometric relation, differentiated in time by the chain rule — and the applications chapter develops it.
Pitfall. Velocity and speed are different: velocity can be negative, speed cannot. "The particle is slowing down" means speed is decreasing, which happens when velocity and acceleration have opposite signs, not merely when .
2.18Interpreting the derivative graphically
The sign of reports the direction of travel: on an interval means is increasing there, means decreasing, and says how steep the climb or descent is. (That a positive derivative forces a function to increase is intuitively clear and is proved from the Mean Value Theorem in the applications chapter.)
Definition 2.84 (Critical point). A critical point of is a number in the domain of where or does not exist.
Where the tangent is horizontal. Critical points are the candidates — nothing more — for local maxima and minima. The sign change of decides which: if goes from to at the function rose then fell, so is a local maximum; from to it is a local minimum. If the sign does not change, it is neither: flattens at and keeps climbing.
Reading the graph of therefore tells you the shape of . Where lies above the axis, climbs; where it lies below, falls; the -intercepts of mark the peaks, valleys and flat spots of . The reverse translation works too: given , sketch by reading slopes — steep uphill for large positive values, near zero where the graph flattens, steep downhill for large negative ones. The graph of is exactly where has a horizontal tangent, and is undefined at any corner of .
Intuition. The graph of is a steepness report on : it is the elevation profile of a trail, the gradient you feel underfoot at each point along the walk. Positive means uphill, negative means downhill, zero means a flat moment — a hilltop, a valley, or a brief rest on a slope that continues in the same direction.
Example 2.85 (Increasing and decreasing from the sign of ). Find where is increasing and where it is decreasing, and classify its critical points.
Solution.
- , with zeros at .
- Test the sign on each interval: for both factors are negative, so ; on the factors have opposite signs, so ; for , .
- So is increasing on and and decreasing on .
- At the sign changes from to : a local maximum, . At it changes from to : a local minimum, .
Example 2.86 (A critical point that is not an extremum). Classify the critical points of .
Solution.
- , so the critical points are and .
- The factor is never negative, so the sign of is the sign of : negative for (except at where it is zero) and positive for .
- At the sign changes from to : a local minimum, .
- At the sign is negative on both sides: the graph flattens momentarily and continues downhill. It is a critical point but not an extremum.
Example 2.87 (Sketching from ). Describe the graph of when on , using only the shape of the sine curve.
Solution.
- At the sine curve climbs at its steepest, so starts at its maximum value, .
- At the curve peaks: horizontal tangent, so .
- Between and the curve falls, steepest at : so is negative, bottoming out at when .
- At the curve troughs: again, and then climbs back to at .
- The graph of described is exactly the cosine curve, in agreement with .
Pitfall. does not make a maximum or minimum. It is a candidate. Only a sign change of at (or the second derivative test) settles the question.
2.19Hyperbolic functions and their derivatives
Definition 2.88 (Hyperbolic functions).
with , and .
They are named for the hyperbola because the point traces , just as traces the circle : the identity
is verified in one line by expanding . It is the hyperbolic twin of , and the single sign change is what separates the two families. Dividing it by gives .
Theorem 2.89 (Derivatives of the hyperbolic functions).
Proof. From the definitions and ,
For the quotient rule gives
using the identity. The other three are quotient-rule computations of the same kind.∎
Notice what is missing: the derivative of has no minus sign. Where the circular functions alternate in sign, and simply swap, which is often the fastest way to tell the two families apart. It also means and both solve , just as and solve .
Because is increasing on all of and is increasing on , they have inverses, and since the functions are built from exponentials the inverses can be written with logarithms:
Theorem 2.90 (Derivatives of the inverse hyperbolic functions).
Proof. Let , so . Differentiating implicitly, , so . Since always, , giving
The same result comes from the logarithmic form: with , , so .
For , the identical argument with gives , the positive root because . For , gives , so .∎
These derivatives are why the hyperbolic functions matter in integration: and turn up constantly, and their antiderivatives are inverse hyperbolic functions. Compare with the inverse trigonometric table: belongs to , to ; the sign under the root is the whole difference.
Intuition. A chain hanging between two posts does not form a parabola but a catenary, . Its shape is determined by the fact that the tension in the chain must balance the weight of the chain below each point, and that balance is the equation , which satisfies and no parabola does. Hyperbolic functions are not a curiosity: rapidity in special relativity is a hyperbolic angle, and is the standard S-shaped switch in neural networks.
Example 2.91 (A hyperbolic composition). Find .
Solution.
- Outer function with .
- Derivative of the outer at the inner: . Derivative of the inner: .
- By the chain rule, .
Example 2.92 (Product with hyperbolic functions). Show that .
Solution.
- Product rule on : .
- .
- Sum: . So is an antiderivative of , a fact integration by parts will rediscover.
Example 2.93 (An inverse hyperbolic composition). Find for , and simplify.
Solution.
- Outer , inner with .
- .
- On the given interval , so and the derivative is .
- Sanity check at : for small , slope , and .
Pitfall. The hyperbolic derivatives have no alternating signs: . Writing by analogy with is the standard slip. The minus signs in the hyperbolic table belong only to the three reciprocal functions , and .
- Forgetting the inner derivative in the chain rule. This is the single most common error. Always ask: is there a function inside another function?
- Applying the power rule to or . The derivative of is , not ; the power rule is for a variable base with a constant exponent.
- Concluding that a continuous function is differentiable. , and are all continuous at and none is differentiable there: a corner, a vertical tangent and a cusp respectively.
- Writing or . Test any suspected rule on .
- Reversing the order in the quotient rule. The numerator is ; the term with the numerator differentiated comes first.
- In implicit differentiation, forgetting to multiply by whenever you differentiate a term.
- Using the quotient rule when simple algebra would work. For instance is easier to differentiate directly, and should be expanded into two logarithms first.
- Confusing the derivative of with . The correct answer is by the chain rule.
- Getting signs wrong on trigonometric derivatives: differentiates to , and every co-function carries a minus sign. Hyperbolic differentiates to .
- Taking for the derivative of the inverse. It is , the reciprocal slope at the corresponding point.
- Mixing up (arcsine) and (arctangent).
- Treating a critical point as an automatic maximum or minimum. makes a candidate; the sign change of decides.
- Confusing with . The differential is the change along the tangent line and only approximates the change along the curve when is small.
- Reading as . The second derivative is the derivative of the derivative.