Chapter 6. Differentiation and its applications
6.1 Differentiation
Differentiation studies local change through the limiting slope of a secant line. 39

Difference quotients and local approximation
Definition 6.1.1 (Derivative). Let be defined on an open interval containing . It is differentiable at if the finite limit
exists. Equivalently, putting ,
Example 6.1.2 (A derivative from first principles). Fix on the graph , and let move towards it. The secant through these points has horizontal change and vertical change , as shown in Figure 6.2. For ,
Consequently,
We cancel while is nonzero and then take the limit. The figure shows positive shrinking. The same limiting slope is obtained from negative .
For a fixed at which the derivative exists, write
Then as , and rearranging gives
The residual satisfies . Thus
The notation expresses a smaller error than the first-order scale . In particular the residual is also , but the stronger vanishing ratio is what characterises differentiability.
Proposition 6.1.3 (Differentiability implies continuity). If is differentiable at , then it is continuous at .
Proof. The local approximation gives . The factor in parentheses has a finite limit and , so the difference tends to zero. ◻
Left and right derivatives
Definition 6.1.4 (Left and right derivatives). Let be a real-valued function defined at . If is also defined on for some , its right derivative at is
provided this limit exists as a finite real number. If is defined on for some , its left derivative at is
provided this limit exists as a finite real number.
In the right-hand limit, , so approaches from the right. In the left-hand limit, , so approaches from the left. The quotient keeps the signed increment in both cases.
At an interior point of the domain, the ordinary derivative exists exactly when both one-sided derivatives exist as finite numbers and are equal. Their common value is then
On a closed interval with , these one-sided limits define the endpoint derivatives and when they exist, using only points in the interval.
Example 6.1.5 (A corner and one-sided derivatives). For , the difference quotient at zero is . The definitions in Definition 6.1.4 give
These unequal one-sided limits show that does not exist, although is continuous at zero.
The next exercise combines the one-sided quotient definitions with the endpoint behaviour of the exponential. We use its positivity and limits from Theorem 8.6.5.
Exercise 6.1.6
Consider the function
-
(i) Show that is continuous at .
-
(ii) Find the left- and right-derivatives of at .
Basic differentiation rules
Suppose and are differentiable at the relevant input, and let be constant. The differentiation rules are
For a composition, if is differentiable at and is differentiable at , the chain rule is
These rules are stated here without proof.
Example 6.1.7 (Integer powers). For , the derivative of is . Indeed, the difference-of-powers identity gives, for ,
There are terms, each tending to as .
Example 6.1.8 (Roots and rational powers). For , the inverse derivative rule in § 6.6 gives
In fact, if with , then the inverse has derivative . For , with and , the power and chain rules therefore give
Negative integer powers use the reciprocal rule. The case is the constant function. The restriction avoids the zero endpoint, where a nontrivial root has no finite derivative.
Exponential, logarithmic, and real-power derivatives
These calculations use the exponential series from § 8.6, the addition law in Theorem 8.6.5, and its continuous inverse on . The required series-and-inverse construction is developed in § 8.6. We use those properties here.
Example 6.1.9 (The derivative of the exponential). Writing , the addition law gives
For , absolute convergence yields
This tail estimate justifies the limit of the series directly, without differentiating an infinite sum term by term. Hence .
Applying the inverse derivative rule to gives
For , the representation and the chain rule show that is differentiable. Logarithmic differentiation therefore gives
Similarly, for any and , writing gives
This supplies a direct justification for real powers. Approximation of by rational numbers alone would not justify passing derivatives to a limit.
When both base and exponent vary, first express the positive function through its logarithm and use the chain rule.
Exercise 6.1.10
For , find .
Trigonometric derivatives
For angles in radians, the elementary small-angle limits are and . Using these limits and the angle-addition identities in the difference quotients gives
The quotient rule consequently gives
These calculations use the geometric trigonometric functions and their small-angle limits. Their power-series representations are given in Subsection* 8.6.
Stationary points and local extrema
Definition 6.1.11 (Stationary point). A point is stationary if is differentiable at and .
Here we use stationary for this precise condition. Some conventions also count points where the derivative is undefined as critical points. Differentiability alone does not imply .
Proposition 6.1.12 (Interior extrema). If has a local maximum or local minimum at an interior point of its domain and is differentiable there, then .
Proof. At a local minimum, for all sufficiently small . The quotient is nonnegative for and nonpositive for . Since both one-sided limits equal , that number must be zero. At a local maximum the signs reverse and the same conclusion follows. ◻
The extrema in Figure 6.3 illustrate the interior-point condition.
6.2 Mean value theorems
Theorem 6.2.1 (Rolle’s theorem). Let be continuous on and differentiable on , where . If , then there exists such that .
Proof. If is constant, every interior point has derivative zero. Otherwise, by Theorem 5.2.1, attains a maximum and a minimum. Since the endpoint values agree and is nonconstant, at least one of these extrema is attained at an interior point . Then Proposition 6.1.12 gives . ◻
The following polynomial question can be approached by constructing a polynomial whose derivative is and comparing its endpoint values. No integration theorem is required.
Exercise 6.2.2
Let satisfy
Show that there is a point such that .
Theorem 6.2.3 (Mean value theorem). Let . Suppose is continuous on and differentiable on . There exists such that
Proof. Subtract the secant line by defining
This function is continuous on , differentiable on , and satisfies . By Theorem 6.2.1, some satisfies . Therefore
which is the required equality. ◻
The geometry of both results is shown in Figure 6.4.
An average-slope interpretation
If is continuous on , the fundamental theorem of calculus, assumed here and reserved for § 7.5, gives
Thus the mean value theorem says that this average slope is attained at an interior point. The continuity of is an additional hypothesis for this integral interpretation. The mean value theorem itself only requires differentiability on the open interval. A schematic illustration of average height appears in Figure 6.5.
Derivative signs and monotonicity
Corollary 6.2.4. Let be differentiable on an open interval . If for every , then is nondecreasing on . If everywhere, it is strictly increasing. The analogous statements with reversed inequalities also hold.
Proof. For in , differentiability implies continuity on . Theorem 6.2.3 gives a with . This difference is nonnegative when , and positive when . Apply the same argument to for the reversed inequalities. ◻
The next exercise links the mean value theorem to Lipschitz continuity from § 5.4. Its iteration also uses geometric-series tail bounds and the completeness of from Figure 3.5.
Exercise 6.2.5
Let be a differentiable function over .
-
(i) Show that if is a bounded function, then is a Lipschitz function which satisfies
where is a constant called the Lipschitz constant.
-
(ii) If the Lipschitz constant in (i) satisfies , the function is called “contractive”. Prove that a contractive function must have a fixed point such that . (Hint: Take any and consider the iterative sequence for .)
-
(iii) Show that the fixed point found in (ii) is unique.
Derivative signs can also identify a sharp global bound on a half-line. The next question asks for both the bound and the equality case.
Exercise 6.2.6
Let . Show that for all , we have
with equality only for .
Why logarithms preserve monotonicity
For a positive function, taking a logarithm changes the heights of its graph while preserving the order of those heights. This is why its logarithm can serve as a proxy for studying increase and decrease. The essential property is that is strictly increasing on . The exponential and logarithm used here are constructed in Theorem 8.6.5 and Definition 8.6.6.
Proposition 6.2.7 (Logarithms preserve order and monotonicity). Let , where is an interval, and put . For any ,
The same equivalence holds with or . Consequently, and are increasing or decreasing on exactly the same intervals, with the same strict or non-strict sense. They also attain local and global maxima and minima at the same inputs.
Proof. First take . The logarithm is continuous on and differentiable on . The mean value theorem gives some with
Thus preserves strict inequalities between positive values. Conversely, if , strict increase of the exponential gives . Its inverse identities also preserve equality, so the non-strict comparison follows.
Applying these comparisons to every pair proves the monotonicity statements. Applying them to the comparison of one value with all nearby values, or all values in , proves the statements about extrema. ◻
When is differentiable, the chain rule gives a second way to see the connection,
Since , the derivatives and have the same sign and vanish at the same inputs. A simpler formula for can therefore settle the sign of without differentiating a complicated power directly. For example, if with , then
The exponent has become a factor.
Figure 6.6 compares four positive functions with their logarithms using matching axes and identical scales. Each point becomes . The input stays fixed while the vertical coordinate changes. The slope of the logarithm compresses differences between large positive outputs and magnifies differences between outputs close to zero. The increasing and decreasing examples retain their direction. The other two retain their peak and valley at . The heights change, and curvature need not be preserved. In particular, becomes , while gives . A negative logarithm is allowed. It is the argument of the logarithm that must be positive throughout the interval.
Example 6.2.8 (Increasing exponential approximants). Consider for . We will show that is strictly increasing. Since , Proposition 6.2.7 lets us study its logarithm with exactly the same monotonicity. Taking the logarithm also turns the varying exponent into a product. Put
The left panel of Figure 6.7 shows the positive gap that will control the derivative. The right panel illustrates the resulting increase of .
Proof. The product and chain rules give the first line below. The second uses .
The sign depends on which of the two positive terms is larger. Write , so , and define
Thus . Geometrically, is the vertical gap between the two curves in the left panel.
The gap is zero at . For , its derivative is
To turn this derivative information into a strict inequality, fix . The function is continuous on and differentiable on . By Theorem 6.2.3, some satisfies
Thus for . Taking shows that for .
Finally, take . The function is continuous on and differentiable on . The mean value theorem gives for some . Since the exponential is strictly increasing, the following comparison proves that is strictly increasing on .
◻
The next question changes the exponent by one. The corresponding limit can be studied after Example 6.5.3, where the logarithmic quotient is evaluated. Its monotonicity can already be studied here.
Exercise 6.2.9
Show that the function
decreases and find the limit
The extended mean value theorem
Theorem 6.2.10 (Cauchy’s mean value theorem). Let , and suppose and are continuous on and differentiable on . There exists such that
Applying the ordinary mean value theorem separately to and gives two possibly different points. It does not show that they coincide. The extended theorem asserts a single common point. Its proof uses one auxiliary function.
Proof. Define
By the hypotheses on and , the function is continuous on and differentiable on . Also, . Therefore Theorem 6.2.1 supplies a point with . Differentiating gives
which is the required identity. No division by an endpoint difference is needed, so the argument also covers zero endpoint differences. ◻
6.3 Taylor’s theorem

Higher derivatives
Successive differentiation gives , , and more generally . Write . A function belongs to when its derivatives through order exist in the interior and extend continuously to the endpoints. In particular, .
Taylor expansion and remainder
The following statement gives a polynomial approximation together with a finite error term.
Theorem 6.3.1 (Taylor’s theorem with Lagrange remainder). Suppose has continuous derivatives on an interval containing the segment between and , where and . There is a point strictly between and such that
Proof. Let
Subtract a correction chosen to make the error vanish at , by setting
The denominator is nonzero because . Differentiating the polynomials gives for . The correction and its first derivatives vanish at , so
Apply Theorem 6.2.1 between and to obtain a point with . If , apply it to between and , using , to obtain with . Continuing in this way gives, after applications, a point strictly between and with . The assumed continuity of the derivatives and their differentiability in the interior justify each application. This reasoning works on either side of and includes , when only one application is needed.
Since , the final equality becomes
Solving for gives
as required. ◻
A second proof using a moving centre. Fix and define the Taylor error with variable centre by
Differentiating each term produces two sums. Every term cancels except the one containing , so
Also . To make equal endpoint values, put
The hypotheses of Theorem 6.2.1 hold between and , and . Thus for some strictly between these endpoints. Substituting gives
Since , cancellation and rearrangement yield
The definition of is exactly the required Taylor error. ◻
A polynomial approximation with an error bound
If on the segment from to , then Theorem 6.3.1 gives
For and , the quadratic approximation is . On , its error is at most . The vertical distance in Figure 6.9 is the error controlled by this bound.
The factorial series and the exponential function
Exercise 1.9.10 identified the supremum of the factorial partial sums using their series definition of . Once the exponential function is available, Theorem 6.3.1 gives another identification of the same limit.
The exponential function has value at zero, and each derivative equals the same continuous function. Apply Theorem 6.3.1 about and evaluate at to obtain
Since is increasing, the remainder satisfies
The factorials tend to infinity, for example because . Thus . This later calculus argument is independent of the elementary construction of the series limit in § 1.9.
6.4 Convex functions
Curvature, chords, and tangent lines
Definition 6.4.1 (Convex and concave functions). A function on an interval is convex if
It is concave when the inequality is reversed.
The point lies between and . Convexity says that the graph at lies below the chord joining the endpoint values. A tangent line, when it exists, lies below the graph instead. Figure 6.10 shows both comparisons.
Proposition 6.4.2 (The second-derivative criterion). Let on an open interval. The following are equivalent.
-
is convex.
-
for all .
-
for every .
Reversing the inequalities gives the concave case.
Proof. Suppose first that . By Corollary 6.2.4, is nondecreasing. If , the mean value theorem gives for some . If , then , and multiplying by gives the same supporting-line inequality. Equality holds at .
Suppose the supporting-line inequality holds and set . Apply it at to both and , multiply by and , and add. The derivative terms cancel because . This proves convexity.
Finally, suppose is convex. For , its defining inequality gives
Letting yields the supporting-line inequality. Taylor’s theorem at then gives, for small nonzero ,
Here lies between and . Divide by and use continuity of to obtain . ◻
A second-derivative test for extrema
Proposition 6.4.3 (The second-derivative test). Suppose is twice continuously differentiable near and . If , then is a strict local minimum. If , it is a strict local maximum.
Proof. When , continuity makes positive on a neighbourhood of . By Theorem 6.3.1, every sufficiently close satisfies
This proves the minimum assertion. Apply it to for the maximum. ◻
The condition does not decide the issue. At zero, has a minimum, has a maximum, and has neither.
Arithmetic–geometric means and Young’s inequality
For nonnegative , the two-variable arithmetic–geometric mean inequality gives . Substituting and gives for . Convexity of the exponential extends this to conjugate exponents.
Proposition 6.4.4 (Young’s inequality). Let satisfy . For ,
Proof. For , the function has , so Proposition 6.4.2 makes it convex. Its defining inequality with weights and gives
If either variable is zero, the left side is zero and the right side is nonnegative. ◻
Convexity and integral averages
The next application uses the order and linearity properties of the Riemann integral, developed in § 7.1. We assume these properties for this application. Its geometric content is that a convex function of an average is at most the average of the convex function.
Theorem 6.4.5 (Jensen’s inequality for integral averages). Let , let be continuous on , and let on an open interval containing the range of . Suppose on . Put
Then
Proof. The extreme value theorem bounds between its minimum and maximum. Integrating these bounds shows that lies in the same interval, hence in . By Proposition 6.4.2,
The functions are continuous, so these integrals exist. Integrate the inequality and divide by . The last term vanishes because , giving the result. ◻
6.5 L’Hôpital’s rules
L’Hôpital’s rules resolve certain indeterminate quotients by comparing derivatives. 46

We distinguish the forms and . The first has the following mean-value proof.
Theorem 6.5.1 (L’Hôpital’s rule for ). Let and be differentiable on , with throughout that interval. Suppose and as . If
then on and
A corresponding left-sided statement holds.
Proof. Define , making both functions continuous at . If at some , Theorem 6.2.1 on would give a zero of , a contradiction. For any , Theorem 6.2.10 supplies a point for which
As , the inequalities force . The assumed derivative-ratio limit therefore gives the asserted quotient limit, also when is infinite. ◻
For the form, suppose instead that both and tend to , with the same differentiability and nonzero denominator-derivative assumptions. If has a limit , the corresponding rule gives . This version is stated without proof here. Writing
does turn the expression into , but it does not by itself prove the rule, since differentiating these reciprocals introduces additional factors of and .
Logarithms and limits of variable powers
Taking a logarithm turns a power into a product. To recover the original limit, we use continuity of the exponential. The required continuity and positive-base power identities are developed in Theorem 8.6.5 and Definition 8.6.6.
First distinguish the two directions of this argument. If near and , continuity of on gives
The condition matters because is not a real number. When the original limit is unknown, the useful direction starts by finding the logarithmic limit and then applying the exponential.
Proposition 6.5.2 (Logarithmic method for power limits). Let and be real-valued functions defined near , possibly excluding itself, with there. If
then
Proof. For each under consideration, positivity of the base gives
The exponent tends to the finite real number . Since the exponential is continuous at , we obtain
Thus convergence of the logarithmic expression establishes convergence of the original power. ◻
This method replaces a variable exponent by multiplication. The product can often be rewritten as a quotient and evaluated with limit laws or L’Hôpital’s rule, after checking the rule’s hypotheses. The same continuity argument applies to one-sided limits and limits at infinity.
For sequences, positivity is needed only for all sufficiently large indices. If eventually and , then
Finitely many initial terms do not affect the limit. We first establish the limit of the exponent and then use continuity to pass that limit inside the exponential.
Example 6.5.3 (The limit of the exponential approximants). For , put . The logarithm of is
As , numerator and denominator tend to zero. Applying Theorem 6.5.1 gives
Applying Proposition 6.5.2 to this logarithmic limit therefore yields
The monotonicity of these approximants was established in Example 6.2.8.
Exercises on difference quotients and indeterminate forms
Symmetric differences use values on both sides of the input. The following question can be approached using the zero-quotient rule, with differentiation performed with respect to while is fixed. Taylor’s theorem supplies another route.
Exercise 6.5.4
Let be differentiable twice such that is also continuous.
-
(i) Prove that
-
(ii) Prove that
(These formulas are very useful in numerical analysis. Hint: Are the limits of type?)
The elementary derivative formulas in § 6.1 provide the trigonometric and logarithmic tools needed for the next limits.
Exercise 6.5.5
Find the limits
The second quotient requires . If , its denominator is identically zero.
Exercise 6.5.6
Find the limits
Check your understanding. Fix and denote the first sequence in Exercise 6.5.6 by . For all sufficiently large , what product do you obtain for ? Rewrite it as a quotient suitable for a real-variable limit. Which continuity property will recover the limit of from the limit of ?
Exercise 6.5.7
Find
6.6 Inverse function theorem
The inverse differentiation rule used for roots and logarithms is a one-dimensional statement. Continuity of a strictly monotone inverse was established in Theorem 5.3.6.
Theorem 6.6.1 (Derivative of an inverse). Let be a continuous strictly monotone bijection between open intervals, and let . If is differentiable at and , then is differentiable at and
Proof. Restrict to a closed subinterval of containing in its interior. By Theorem 5.3.6 and its decreasing analogue, its inverse, and hence , is continuous near . For sufficiently small, set . Injectivity gives , and continuity of gives as . Also , so
◻
This difference-quotient argument establishes that the inverse derivative exists before applying the chain rule.
Differentiating now gives the identity