Implicit and Logarithmic Differentiation

Read this section to learn about implicit and logarithmic differentiation. Work through practice problems 1-6.

Logarithmic Differentiation

In section 2.5 we saw that \mathbf{D}(\ln (f(x)))=\frac{f^{\prime}(x)}{f(x)}. If we simply multiply each side by f(x), we have f^{\prime}(x)=f(x) \cdot D(\ln (f(x))). When the logarithm of a function is simpler than the function itself, it is often easier to differentiate the logarithm of \mathrm{f} than to differentiate \mathrm{f} itself.

Logarithmic Differentiation: \quad \mathbf{f}^{\prime}(\mathbf{x})=\mathrm{f}(\mathrm{x}) \cdot \mathbf{D}(\ln (\mathrm{f}(\mathrm{x}))).


The derivative of f is f times the derivative of the natural logarithm of f. Usually it is easiest to proceed in three steps:

(i) calculate \ln (\mathrm{f}(\mathrm{x})) and simplify,

(ii) calculate \mathbf{D}(\ln (f(x))) and simplify, and

(iii) multiply the result in step (ii) by \mathrm{f}(\mathrm{x}).

Let's examine what happens when we use this process on an "easy" function, f(x)=x^{2}, and a "hard" one, f(x)=2^{x}. Certainly we don't need to use logarithmic differentiation to find the derivative of f(x)=x^{2}, but sometimes it is instructive to try a new algorithm on a familiar function. Logarithmic differentiation is the easiest way to find the derivative of f(x)=2^{x}.

f(x)=x^{2}

(i) \ln (f(x))=\ln \left(x^{2}\right)=2 \cdot \ln (x)
(ii) \quad \mathbf{D}(\ln (\mathrm{f}(\mathrm{x})))=\mathbf{D}(2 \cdot \ln (\mathrm{x}))=\frac{2}{\mathrm{x}}
(iii) f^{\prime}(x)=f(x) \cdot D(\ln (f(x)))=x^{2} \cdot \frac{2}{x}=2 x

f(x)=2^{x}

(i) \ln (\mathrm{f}(\mathrm{x}))=\ln \left(2^{\mathrm{x}}\right)=\mathrm{x} \cdot \ln (2)
(ii) \mathbf{D}(\ln (f(x)))=D(x \cdot \ln (2))=\ln (2)
(iii) \mathrm{f}^{\prime}(\mathrm{x})=\mathrm{f}(\mathrm{x}) \cdot \mathrm{D}(\ln (\mathrm{f}(\mathrm{x})))=2^{\mathrm{x}} \cdot \ln (2)


Example 5: Use the pattern \mathbf{f}^{\prime}(\mathbf{x})=\mathrm{f}(\mathrm{x}) \cdot \mathrm{D}(\ln (\mathrm{f}(\mathrm{x}))) to find the derivative of \mathrm{f}(\mathrm{x})=(3 \mathrm{x}+7)^{5} \cdot \sin (2 \mathrm{x}).

Solution: (i) \ln (\mathrm{f}(\mathrm{x}))=\ln \left((3 \mathrm{x}+7)^{5} \cdot \sin (2 \mathrm{x})\right)=5 \cdot \ln (3 \mathrm{x}+7)+\ln (\sin (2 \mathrm{x})) so

(ii) \mathbf{D}(\ln (f(x)))=\mathbf{D}(5 \cdot \ln (3 x+7)+\ln (\sin (2 x)))=5 \cdot \frac{3}{3 x+7}+\frac{2 \cos (2 x)}{\sin (2 x)}.

Then       (iii) f^{\prime}(x)=f(x) \cdot D(\ln (f(x))) =(3 x+7)^{5} \cdot \sin (2 x)\left(\frac{15}{3 x+7}+\frac{2 \cos (2 x)}{\sin (2 x)}\right)

                                                                =15(3 x+7)^{4} \sin (2 x)+2(3 x+7)^{5} \cos (2 x)

the same result we would obtain using the product rule.

Practice 5: Use logarithmic differentiation to find the derivative of f(x)=(2 x+1)^{3} \cdot\left(3 x^{2}-4\right)^{7} \cdot(x+7)^{4}.

We could have differentiated the functions in the example and practice problem without logarithmic differentiation. There are, however, functions for which logarithmic differentiation is the only method we can use. We know how to differentiate x to a constant power, D\left(x^{n}\right)=n \cdot x^{n-1}, and a constant to the variable power, D\left(c^{x}\right)=c^{x} \cdot \ln (c) but the function f(x)=x^{X} has both a variable base and a variable power so neither differentiation rule applies to \mathrm{x}^{\mathrm{X}}. We need to use logarithmic differentiation.

Example 6: Find \mathbf{D}\left(\mathrm{x}^{\mathrm{X}}\right) \quad(\mathrm{x} > 0).

Solution: (i) \operatorname{Ln}\left(f(x)=\ln \left(x^{x}\right)=x \cdot \ln (x)\right.
               (ii) \mathbf{D}(\ln (f(x)))=D(x \cdot \ln (x))=x \cdot D(\ln (x))+\ln (x) \cdot D(x)=x\left(\frac{1}{x}\right)+\ln (x)(1)=1+\ln (x).
Then       (iii) \mathbf{D}\left(\mathrm{x}^{\mathrm{X}}\right)=\mathbf{f}^{\prime}(\mathbf{x})=\mathrm{f}(\mathrm{x}) \cdot \mathbf{D}(\ln (\mathrm{f} (\mathrm{x})))=\mathrm{x}^{\mathrm{x}} \cdot(1+\ln (\mathrm{x})).

Practice 6: Find \mathrm{D}\left(\mathrm{x}^{\sin (\mathrm{x})}\right)(\mathrm{x} > 0).

Logarithmic differentiation is an alternate method for differentiating some functions such as products and quotients, and it is the only method we've seen for differentiating some other functions such as variable bases to variable exponents.