3.9 Derivatives of Inverse Functions

We are nearing the end of our quest to find a systematic way to calculate the derivatives of all basic functions. With the exponential function recently conquered, there are only three species of elementary functions left in our taxonomy: radicals, logarithms, and inverse trigonometric functions. (For non-elementary functions, one must typically resort to the rigorous definition of the derivative and rely on approximation on a case-by-case basis. But for our elementary toolkit, we demand exactness.)

In this section, we develop a unified, deeply powerful tool to resolve all three of these remaining types by exploiting the profound symmetry between a function and its inverse. Suppose we wish to find the derivative of an inverse function f−1f^{-1}. If we assume that f−1f^{-1} is differentiable at b=f⁢(a)b=f(a) and ff is differentiable at aa, we can write the definition of inverse:

y=f⁢(f−1⁢(y))y=f(f^{-1}(y))

then differentiate both sides with respect to yy. Using the chain rule, and evaluating at y=by=b, we find:

1=(f−1)′⁢(b)⋅f′⁢(a)⟹(f−1)′⁢(b)=1f′⁢(a).1=(f^{-1})^{\prime}(b)\cdot f^{\prime}(a)\implies(f^{-1})^{\prime}(b)=\frac{1}% {f^{\prime}(a)}.

We can rewrite this elegantly as (note that b=f⁢(a)b=f(a) so a=f−1⁢(b)a=f^{-1}(b)):

equation (3.27) (3.27)
(f−1)′⁢(b)=1f′⁢(f−1⁢(b)).(f^{-1})^{\prime}(b)=\frac{1}{f^{\prime}(f^{-1}(b))}.
Caveat (The Bootstrapping Problem).

There is one logical gap in our application of implicit differentiation above: in order for this algebraic manipulation to be rigorous, we need to know beforehand that f−1f^{-1} is differentiable at b=f⁢(a)b=f(a). One cannot simply apply the chain rule to a function whose differentiability is not yet established!

To resolve this, we present the formal theorem, which guarantees both the existence of the derivative and its explicit value.

Theorem 3.9.1 (Inverse Function Theorem).

Let ff be an invertible function and let y0=f⁢(x0)y_{0}=f(x_{0}). If ff is differentiable at x0x_{0} with f′⁢(x0)≠0f^{\prime}(x_{0})\neq 0, and if f−1f^{-1} is continuous at y0y_{0}, then f−1f^{-1} is differentiable at y0y_{0} and

(f−1)′⁢(y0)=1f′⁢(x0).(f^{-1})^{\prime}(y_{0})=\frac{1}{f^{\prime}(x_{0})}.
Moral.

You can find the derivative of an inverse function without ever explicitly finding the formula for the inverse function itself!

Story (The Invisible Inverse).

The moral above is physically and mathematically profound. Recall that finding an explicit formula for an inverse is not always possible. In several cases, we only know that the inverse exists because the original function is purely 11-to-11 and onto. For example, a monotone polynomial of degree ≥5\geq 5 is perfectly invertible, but by Galois Theory [11], there is no general algebraic formula for its roots. We are faced with a ghost function—we know it exists, but we cannot write it down. Yet, Theorem 3.9.1 allows us to find its rate of change exactly. This is the magic of calculus.

Remark 3.9.2 (On the Proof).

The simplest proof of Theorem 3.9.1 operates through sequences (a staple of Calculus II), which provides a rigorous way to replace the limit of variables inside the range by something manageable, see e.g., [12]. There is also a direct ε\varepsilon-δ\delta proof, which we leave as a challenging but rewarding exercise for the reader.

A diagram showing the mapping of an element x to y via a function f (represented by an upper curved arrow pointing from left to right), and the mapping back from y to x via its inverse function f^-1 (represented by a lower curved arrow pointing from right to left).
Figure 3.8: Illustration of a function ff and its inverse f−1f^{-1}
Intuition (Leibniz’s Reciprocal).

To add geometric intuition, consider the mapping diagram in Figure 3.8.

The theorem essentially says (f−1)′⁢(y0)=1f′⁢(x0)(f^{-1})^{\prime}(y_{0})=\frac{1}{f^{\prime}(x_{0})}. This is easily remembered by utilizing the Leibniz notation for our diagram. If y=f⁢(x)y=f(x), then:

d⁢xd⁢y=1d⁢yd⁢x.\frac{\mathrm{d}x}{\mathrm{d}y}=\frac{1}{\frac{\mathrm{d}y}{\mathrm{d}x}}.

To be perfectly precise with our evaluation points, this means:

d⁢xd⁢y|y=y0=1d⁢yd⁢x|x=x0.\left.\frac{\mathrm{d}x}{\mathrm{d}y}\right|_{y=y_{0}}=\frac{1}{\left.\frac{% \mathrm{d}y}{\mathrm{d}x}\right|_{x=x_{0}}}.

3.9.1 Derivatives of the Inverse Trigonometric Functions

Let us wield this new tool to find the derivative of the inverse sine function. Let f⁢(x)=sin⁡xf(x)=\sin x. To ensure it is invertible, we must restrict its domain to dom⁡(f)=[−π2,π2]\operatorname{dom}(f)=\left[-\frac{\pi}{2},\frac{\pi}{2}\right]. Then f′⁢(x0)=cos⁡x0f^{\prime}(x_{0})=\cos x_{0}. Thus, by the Inverse Function Theorem,

(f−1)′⁢(y0)=1f′⁢(x0)=1cos⁡x0,(f^{-1})^{\prime}(y_{0})=\frac{1}{f^{\prime}(x_{0})}=\frac{1}{\cos x_{0}},

or simply:

(sin−1)′⁢(y0)=1cos⁡x0.(\sin^{-1})^{\prime}(y_{0})=\frac{1}{\cos x_{0}}.

By common practice, we usually use xx for the argument of our functions, so we wish to swap y0y_{0} for xx. Therefore, we must also change x0x_{0} accordingly. We do this before swapping for xx: recall y0=sin⁡x0y_{0}=\sin x_{0}, which means x0=sin−1⁡y0x_{0}=\sin^{-1}y_{0}. Substituting this back in gives:

(sin−1)′⁢(y0)=1cos⁡(sin−1⁡y0).(\sin^{-1})^{\prime}(y_{0})=\frac{1}{\cos(\sin^{-1}y_{0})}.

Now, exchanging variables:

equation (3.28) (3.28)
(sin−1)′⁢(x)=1cos⁡(sin−1⁡x).(\sin^{-1})^{\prime}(x)=\frac{1}{\cos(\sin^{-1}x)}.

In practice, it is usually not worth remembering the exact abstract formula for calculation (though the gist of the theorem is vital for theoretical purposes). We just start straight away with the chain rule. Since sin⁡(sin−1⁡x)=x\sin(\sin^{-1}x)=x, we differentiate both sides:

1=[sin⁡(sin−1⁡x)]′=cos⁡(sin−1⁡x)⋅(sin−1)′⁢(x).1=\left[\sin(\sin^{-1}x)\right]^{\prime}=\cos(\sin^{-1}x)\cdot(\sin^{-1})^{% \prime}(x).

Isolating the derivative immediately yields (3.28).

Remark 3.9.3 (Geometric Simplification).

One can simplify (3.28) further by invoking Pythagoras. Let θ=sin−1⁡x\theta=\sin^{-1}x, which means x=sin⁡θx=\sin\theta. We can visualize this via a right triangle in Figure 3.9.

A right-angled triangle representing the trigonometric substitution for theta equal to the arcsine of x. The angle theta is located at the bottom-left corner. The hypotenuse is labeled 1, the opposite vertical side is labeled x, and the adjacent horizontal side is labeled square root of 1 minus x squared.
Figure 3.9: Right triangle illustration for θ=sin−1⁡x\theta=\sin^{-1}x

By the Pythagorean theorem, the adjacent side is 1−x2\sqrt{1-x^{2}}. Thus,

cos⁡(sin−1⁡x)=cos⁡θ=1−x21=1−x2.\cos(\sin^{-1}x)=\cos\theta=\frac{\sqrt{1-x^{2}}}{1}=\sqrt{1-x^{2}}.

Substituting this back into our derivative, we obtain the beautiful algebraic expression:

(sin−1)′⁢(x)=11−x2.(\sin^{-1})^{\prime}(x)=\frac{1}{\sqrt{1-x^{2}}}.

Now that we have conquered the sine function, it is time for you to derive the rest of the trigonometric bestiary.

Exercise 3.9.4.

Find the derivative of cos−1⁡x\cos^{-1}x, tan−1⁡x\tan^{-1}x, cot−1⁡x\cot^{-1}x, sec−1⁡x\sec^{-1}x, and csc−1⁡x\csc^{-1}x. For each function, explicitly state the restricted domain first.

Exercise 3.9.5 (Challenge).

Let g⁢(x)=sin⁡xg(x)=\sin x with dom⁡(g)=[π2,3⁢π2]\operatorname{dom}(g)=\left[\frac{\pi}{2},\frac{3\pi}{2}\right]. Is gg invertible? If so, find g−1g^{-1}.

Note that g−1⁢(x)g^{-1}(x) is not simply sin−1⁡(x)\sin^{-1}(x) because of the different ranges! Thus, fixing the domain of the original function is of utmost importance.

Finally, a word of caution regarding the language we use to express these ideas.

Caveat (The Notational Headache).

Mathematical notation is a living language riddled with historical quirks. Given a function ff, the superscript −1-1 is a notorious trap:

  • •
    ​

    f−1⁢(x)f^{-1}(x) means the inverse function of ff.

  • •
    ​

    [f⁢(x)]−1=1f⁢(x)[f(x)]^{-1}=\frac{1}{f(x)} means the reciprocal of ff. (Notice the position of the −1-1).

The latter is consistent with the notation [f⁢(x)]n[f(x)]^{n} which means the nn-th power of ff.

The real bummer is fn⁢(x)f^{n}(x). Depending on the context, it can mean the nn-th power (like sin2⁡x\sin^{2}x, cos3⁡x\cos^{3}x, etc.), but it can also mean the nn-fold composition:

fn=f∘f∘⋯∘f⏟n⁢-times.f^{n}=\underbrace{f\circ f\circ\dots\circ f}_{n\text{-times}}.

So, always look for the context!

Here is another one to watch out for: f(n)⁢(x)f^{(n)}(x) (with parentheses around the nn) means the nn-th derivative of ff.

Example 3.9.6.

Observe the profound difference when calculating derivatives based on notational intent: Find the derivative of f⁢(x)=sin2⁡xf(x)=\sin^{2}x and g⁢(x)=sin⁡(sin⁡x)g(x)=\sin(\sin x).

Solution.

For the first function, the notation sin2⁡x\sin^{2}x strictly implies [sin⁡x]2[\sin x]^{2}. We apply the chain rule, treating the power function as the outer layer:

equation (3.29) (3.29)
f′⁢(x)=2⁢(sin⁡x)⋅(sin⁡x)′=2⁢sin⁡x⁢cos⁡x=sin⁡(2⁢x).f^{\prime}(x)=2(\sin x)\cdot(\sin x)^{\prime}=2\sin x\cos x=\sin(2x).

For the second function, g⁢(x)=sin⁡(sin⁡x)g(x)=\sin(\sin x), the structure is an explicit composition of functions g⁢(x)=(h∘h)⁢(x)g(x)=(h\circ h)(x) where h⁢(x)=sin⁡xh(x)=\sin x. We apply the chain rule with the outer function being the sine function:

equation (3.30) (3.30)
g′⁢(x)=cos⁡(sin⁡x)⋅(sin⁡x)′=cos⁡(sin⁡x)⁢cos⁡x.g^{\prime}(x)=\cos(\sin x)\cdot(\sin x)^{\prime}=\cos(\sin x)\cos x.

These derivatives are fundamentally different mathematical objects. The notation demands our vigilance. ∎

3.9.2 Derivatives of Logarithms and Radicals

We show how to use our knowledge of the derivative of ex\mathrm{e}^{x} and the chain rule to compute the derivative of log⁡x\log x. We know that the natural logarithm is the inverse function of ex\mathrm{e}^{x},

x=elog⁡x(x>0).x=\mathrm{e}^{\log x}\qquad(x>0).

The expression elog⁡x\mathrm{e}^{\log x} is a composition of two functions, where the logarithm is applied first and then the exponential. Thus by the chain rule,

1=(x)′=(elog⁡x)′=elog⁡x⁢(log⁡x)′=x⁢(log⁡x)′.1=(x)^{\prime}=(\mathrm{e}^{\log x})^{\prime}=\mathrm{e}^{\log x}(\log x)^{% \prime}=x(\log x)^{\prime}.

Solving for (log⁡x)′(\log x)^{\prime}, we get

(log⁡x)′=1x,x>0.(\log x)^{\prime}=\frac{1}{x},\qquad x>0.
Moral.

The function log⁡x\log x is a rather complicated transcendental function, but its derivative is remarkably simple. The calculus of logarithms acts as a bridge, transforming the transcendental world back into the algebraic world of rational functions.

When xx is negative, we have (log⁡(−x))′=1−x⁢(−x)′=1x(\log(-x))^{\prime}=\frac{1}{-x}(-x)^{\prime}=\frac{1}{x}. So we see more generally that

(log⁡|x|)′=1x,x≠0.(\log\left\lvert x\right\rvert)^{\prime}=\frac{1}{x},\qquad x\neq 0.

The derivative of log⁡x\log x can be used to compute the derivative of loga⁡x\log_{a}x: We have the identity x=aloga⁡xx=a^{\log_{a}x}. Applying the function log\log to each side, we get log⁡x=(log⁡a)⁢(loga⁡x)\log x=(\log a)(\log_{a}x). Hence

loga⁡x=1log⁡a⁢log⁡x.\log_{a}x=\frac{1}{\log a}\log x.

Differentiate to get

(loga⁡x)′=1log⁡a⁢(log⁡x)′=1x⁢log⁡a.(\log_{a}x)^{\prime}=\frac{1}{\log a}(\log x)^{\prime}=\frac{1}{x\log a}.

We summarize in a theorem:

Theorem 3.9.7 (Derivative of Natural Exponential and Logarithm).
dd⁢x⁢(ex)=ex,dd⁢x⁢(log⁡|x|)=1x(x≠0).\frac{\mathrm{d}}{\mathrm{d}x}\left(\mathrm{e}^{x}\right)=\mathrm{e}^{x},% \qquad\frac{\mathrm{d}}{\mathrm{d}x}\left(\log\left\lvert x\right\rvert\right)% =\frac{1}{x}\quad(x\neq 0).

Now that we know the derivatives of ex\mathrm{e}^{x} and log⁡x\log x, we can now establish the power rule for any real exponent, finally freeing ourselves from the constraints of rational numbers.

Theorem 3.9.8.

If r≠0r\neq 0 and x>0x>0, then xrx^{r} is differentiable and

(xr)′=r⁢xr−1.(x^{r})^{\prime}=rx^{r-1}.
Proof.

For x>0x>0, xr=elog⁡(xr)=er⁢log⁡xx^{r}=\mathrm{e}^{\log(x^{r})}=\mathrm{e}^{r\log x}, so

(xr)′=(er⁢log⁡x)′=er⁢log⁡x⁢(r⁢log⁡x)′=er⁢log⁡x⁢rx=xr⁢rx=r⁢xr−1.∎(x^{r})^{\prime}=(\mathrm{e}^{r\log x})^{\prime}=\mathrm{e}^{r\log x}(r\log x)% ^{\prime}=\mathrm{e}^{r\log x}\frac{r}{x}=x^{r}\frac{r}{x}=rx^{r-1}.\qed
Example 3.9.9.

Applying Theorem 3.9.8 to some exotic powers:

(xπ)′=π⁢xπ−1,(xe)′=e⁢xe−1.(x^{\pi})^{\prime}=\pi x^{\pi-1},\qquad(x^{\mathrm{e}})^{\prime}=\mathrm{e}x^{% \mathrm{e}-1}.
Example 3.9.10.

If gg is a differentiable positive function, then the chain rule gives

equation (3.31) (3.31)
dd⁢x⁢log⁡g⁢(x)=g′⁢(x)g⁢(x).\frac{\mathrm{d}}{\mathrm{d}x}\log g(x)=\frac{g^{\prime}(x)}{g(x)}.

The expression on the right-hand side of (3.31) is called the logarithmic derivative of gg.

Example 3.9.11.

If y=log⁡(x2+3⁢x+4)y=\log(x^{2}+3x+4), then

d⁢yd⁢x=dd⁢x⁢(x2+3⁢x+4)x2+3⁢x+4=2⁢x+3x2+3⁢x+4.\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{\frac{\mathrm{d}}{\mathrm{d}x}(x^{2}+3x+% 4)}{x^{2}+3x+4}=\frac{2x+3}{x^{2}+3x+4}.
Example 3.9.12.
dd⁢x⁢log⁡(cos⁡x)=−sin⁡xcos⁡x=−tan⁡x.\frac{\mathrm{d}}{\mathrm{d}x}\log(\cos x)=\frac{-\sin x}{\cos x}=-\tan x.