Some Applications of the Chain Rule

Read this section to learn how to apply the Chain Rule. Work through practice problems 1-8.

Derivatives of Logarithms

\mathbf{D}(\ln (x))=\dfrac{1}{x} \quad and \quad \mathbf{D}(\ln (g(x)))=\dfrac{\mathbf{g}^{\prime}(x)}{g(x)}


Proof: We know that the natural logarithm \ln (x) is the logarithm with base \mathrm{e}, and e^{\ln (x)}=x for x > 0

We also know that \mathbf{D}\left(\mathrm{e}^{\mathrm{X}}\right)=\mathrm{e}^{\mathrm{x}}, so using the Chain Rule we have \mathrm{D}\left(\mathrm{e}^{\mathrm{f}(\mathrm{x})}\right)=\mathrm{e}^{\mathrm{f}(\mathrm{x})} \mathbf{f}^{\prime}(\mathbf{x}) . Differentiating each side of the equation \mathrm{e}^{\ln (\mathrm{x})}=\mathrm{x}, we get that

D\left(e^{\ln (x)}\right)=D(x)

use \quad D\left(e^{f(x)}\right)=e^{f(x)} \cdot f^{\prime}(x) with f(x)=\ln (x)

e^{\ln (x)} \cdot D(\ln (x))=1

replace \mathrm{e}^{\ln (\mathrm{x})} with \mathrm{x}

x \cdot \mathbf{D}(\ln (x))=1

and solve for \mathbf{D}(\ln (x)) to get \mathbf{D}(\ln (x))=\frac{1}{x}.


The function \ln (\mathrm{g}(\mathrm{x})) is the composition of \mathrm{f}(\mathrm{x})=\ln (\mathrm{x}) with \mathrm{g}(\mathrm{x}), so by the Chain Rule,

D \big((\ln (g(x))=D(f(g(x)))=f^{\prime}(g(x)) \cdot g^{\prime}(x)=\frac{1}{g(x)} \cdot g^{\prime}(x)=\frac{g^{\prime}(x)}{g(x)}\big).


Example 1: Find \mathbf{D}(\ln (\sin (x))) and \mathbf{D}\left(\ln \left(x^{2}+3\right)\right).

Solution: (a) Using the pattern \mathbf{D}\big((\ln (\mathrm{g}(\mathrm{x}))=\frac{\boldsymbol{g}^{\prime}(\mathrm{x})}{\mathrm{g}(\mathrm{x})} \big) with \mathrm{g}(\mathrm{x})=\sin (\mathrm{x}), then

\mathbf{D}(\ln (\sin (x)))=\frac{g^{\prime}(x)}{g(x)}=\frac{D(\sin (x))}{\sin (x)}=\frac{\cos (x)}{\sin (x)}=\cot (x)

(b) Using the pattern with \mathrm{g}(\mathrm{x})=\mathrm{x}^{2}+3, we have \mathrm{D}\left(\ln \left(\mathrm{x}^{2}+3\right)\right)=\frac{\mathrm{g}^{\prime}(\mathrm{x})}{\mathrm{g}(\mathrm{x})}=\frac{2 \mathrm{x}}{\mathrm{x}^{2}+3}.

We can use the Change of Base Formula from algebra to rewrite any logarithm as a natural logarithm, and then we can differentiate the resulting natural logarithm.

Change of Base Formula for logarithms: \log _{\mathrm{a}} \mathrm{x}=\frac{\log _{\mathrm{b}} \mathrm{x}}{\log _{\mathrm{b}} \mathrm{a}} \quad for all positive \mathrm{a}, \mathrm{b} and \mathrm{x}.


Example 2: Use the Change of Base formula and your calculator to find \log _{\pi} 7 and \log _{2} 8.

Solution: \log _{\pi} 7=\frac{\ln 7}{\ln \pi} \approx \frac{1.946}{1.145} \approx 1.700 . (Check that \left.\pi^{1.7} \approx 7\right) \log _{2} 8=\frac{\ln 8}{\ln 2}=3.


Practice 1: Find the values of \log _{9} 20, \log _{3} 20 and \log _{\pi} \mathrm{e}.

Putting b=e in the Change of Base Formula, \log _{a} x=\frac{\log _{e} x}{\log _{e} a}=\frac{\ln x}{\ln a}, so any logarithm can be written as a natural logarithm divided by a constant. Then any logarithm is easy to differentiate.

\mathbf{D}\left(\log _{a}(x)\right)=\frac{1}{x \ln (a)} \quad and D\left(\log _{a}(f(x))\right)=\frac{f^{\prime}(x)}{f(x)} \cdot \frac{1}{\ln (a)}

The second differentiation formula follows from the Chain Rule.


Practice 2: Calculate \mathbf{D}\left(\log _{10}(\sin (x))\right) and \mathbf{D}\left(\log_{\pi}\left(\mathrm{e}^{\mathrm{x}}\right)\right).

The number \mathrm{e} might seem like an "unnatural" base for a natural logarithm, but of all the logarithms to different bases, the logarithm with base e has the nicest and easiest derivative. The natural logarithm is even related to the distribution of prime numbers. In 1896, the mathematicians Hadamard and Valle-Poussin proved the following conjecture of Gauss: (The Prime Number Theorem) For large values of \mathrm{x}, \{ number of primes less than \mathrm{x}\} \approx \frac{\mathrm{X}}{\ln (\mathrm{x})}.