Implicit and Logarithmic Differentiation

Site: Saylor Academy
Course: MA005: Calculus I
Book: Implicit and Logarithmic Differentiation
Printed by: Guest user
Date: Saturday, September 7, 2024, 7:24 PM

Description

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

Introduction

This short section presents two final differentiation techniques. These two techniques are more specialized than the ones we have already seen and they are used on a smaller class of functions. For some functions, however, one of these may be the only method that works. The idea of each method is straightforward, but actually using each of them requires that you proceed carefully and practice.



Source: Dale Hoffman, https://s3.amazonaws.com/saylordotorg-resources/wwwresources/site/wp-content/uploads/2012/12/MA005-3.10-Implicit-and-Logarithmic-Differentiation.pdf
Creative Commons License This work is licensed under a Creative Commons Attribution 3.0 License.

Implicit Differentiation

In our work up until now, the functions we needed to differentiate were either given explicitly, such as \mathrm{y}=\mathrm{f}(\mathrm{x})= x^{2}+\sin (x), or it was possible to get an explicit formula for them, such as solving

y^{3}-3 x^{2}=5 to get y=\sqrt[3]{5+3 x^{2}}. Sometimes, however, we will have an equation relating x and y which is either difficult or impossible to solve explicitly for y, such as y^{2}+2 y=\sin (x)+4 or y+\sin (y)=x^{3}-x. In any case, we can still find y^{\prime}=f^{\prime}(x) by using implicit differentiation.

The key idea behind implicit differentiation is to assume that \mathbf{y} is a function of \mathbf{x} even if we cannot explicitly solve for \mathrm{y}. This assumption does not require any work, but we need to be very careful to treat \mathrm{y} as a function when we differentiate and to use the Chain Rule or the Power Rule for Functions.


Example 1: Assume that \mathrm{y} is a function of \mathrm{x}.

Calculate (a) \mathbf{D}\left(\mathrm{y}^{3}\right)

(b) \frac{\mathbf{d}}{\mathbf{d x}}\left(x^{3} y^{2}\right), and

(c) (\sin (\mathrm{y}))^{\prime}

Solution: (a) We need the Power Rule for Functions since \mathbf{y} is a function of \mathbf{x}:

\mathbf{D}\left(\mathrm{y}^{3}\right)=3 \mathrm{y}^{2} \cdot \mathbf{D}(\mathrm{y})=3 \mathrm{y}^{2} \cdot \mathbf{y}^{\prime}

(b) We need to use the product rule and the Chain Rule:

\frac{d}{d x}\left(x^{3} y^{2}\right)=x^{3} \cdot \frac{d}{d x}\left(y^{2}\right)+y^{2} \cdot \frac{d}{d x}\left(x^{3}\right)=x^{3} 2 y \cdot \frac{d y}{d x}+y^{2} \cdot 3 x^{2}=2 x^{3} y \cdot \frac{d y}{d x}+3 x^{2} y^{2}

(c) We just need to know that \mathbf{D}(\sin (x))=\cos (x) and then use the Chain Rule:

(\sin (\mathrm{y}))^{\prime}=\cos (\mathrm{y}) \cdot \mathbf{y}^{\prime}


Practice 1: Assume that \mathrm{y} is a function of x. Calculate (a) \mathbf{D}\left(\mathrm{x}^{2}+\mathrm{y}^{2}\right) and (b) \frac{\mathbf{d}}{\mathbf{d x}}(\sin (2+3 \mathrm{y})).

IMPLICIT DIFFERENTIATION:

To determine \mathbf{y}^{\prime}, differentiate each side of the defining equation, treating \mathbf{y} as a function of \mathbf{x}, and then algebraically solve for \mathbf{y}^{\prime}.


Example 2: Find the slope of the tangent line to the circle \mathrm{x}^{2}+\mathrm{y}^{2}=25 at the point (3,4) with and without implicit differentiation.


Solution:

Explicitly: We can solve the equation of the circle for \mathrm{y}=+\sqrt{25-\mathrm{x}^{2}} or \mathrm{y}=-\sqrt{25-\mathrm{x}^{2}}.

Since the point (3,4) is on the top half of the circle (Fig. 1), \mathrm{y}=+\sqrt{25-\mathrm{x}^{2}} and

\mathbf{D}(\mathrm{y})=\mathbf{D}\left(+\sqrt{25-\mathrm{x}^{2}}\right)=\frac{1}{2}\left(25-\mathrm{x}^{2}\right)^{-1 / 2} \mathbf{D}\left(25-\mathrm{x}^{2}\right)=\frac{-\mathrm{x}}{\sqrt{25-\mathrm{x}^{2}}}

Replacing x with 3, we have y^{\prime}=\frac{-3}{\sqrt{25-3^{2}}}=-3 / 4.

Implicitly: We differentiate each side of the equation \mathrm{x}^{2}+\mathrm{y}^{2}=25 and then solve for \mathbf{y}^{\prime} \cdot \mathbf{D}\left(\mathrm{x}^{2}+\mathrm{y}^{2}\right)=\mathbf{D}(25) so 2 \mathrm{x}+2 \mathrm{y} \cdot \mathbf{y}^{\prime}=0.

Solving for \mathbf{y}^{\prime}, we have \mathbf{y}^{\prime}=-\frac{2 \mathrm{x}}{2 \mathrm{y}}=-\mathrm{x} / \mathrm{y}, and, at the point (3,4), \mathbf{y}^{\prime}=-3 / 4, the same answer we found explicitly.


Practice 2: Find the slope of the tangent line to \mathrm{y}^{3}-3 \mathrm{x}^{2}=15 at the point (2,3) with and without implicit differentiation.

In the previous example and practice problem, it was easy to explicitly solve for \mathrm{y}, and then we could differentiate y to get \mathrm{y}^{\prime}. Because we could explicitly solve for \mathrm{y}, we had a choice of methods for calculating \mathrm{y}^{\prime}. Sometimes, however, we can not explicitly solve for \mathrm{y}^{\prime}, and the only way of determining \mathrm{y}^{\prime} is implicit differentiation.


Example 3: Determine \mathrm{y}^{\prime} at (0,2) for y^{2}+2 y=\sin (x)+8.

Solution: Assuming that \mathrm{y} is a function of \mathrm{x} and differentiating each side of the equation, we get

\mathbf{D}\left(\mathrm{y}^{2}+2 \mathrm{y}\right)=\mathrm{D}(\sin (\mathrm{x})+8) \quad so 2 \mathrm{y} \mathbf{y}^{\prime}+2 \mathbf{y}^{\prime}=\cos (\mathrm{x}) \quad and (2 \mathrm{y}+2) \mathbf{y}^{\prime}=\cos (\mathrm{x})

Then \mathbf{y}^{\prime}=\frac{\cos (\mathrm{x})}{2 \mathrm{y}+2} \quad so, at the point (0,2), \mathbf{y}^{\prime}=\frac{\cos (0)}{2(\mathbf{2})+2}=1 / 6.


Practice 3: Determine \mathrm{y}^{\prime} at (1,0) for y+\sin (y)=x^{3}-x.

In practice, the equations may be rather complicated, but if you proceed carefully and step-by-step, implicit differentiation is not difficult. Just remember that \mathrm{y} must be treated as a function so every time you differentiate a term containing a \mathrm{y}^{\prime} you should get something which has a \mathbf{y}^{\prime}. The algebra needed to solve for \mathrm{y}^{\prime} is always easy - if you differentiated correctly the resulting equation will be a linear equation in the variable \mathrm{y}^{\prime}.


Example 4: Find the equation of the tangent line \mathrm{L} to the "tilted' parabola in Fig. 1 at the point (1,2).

Solution: The line goes through the point (1,2) so we need to find the slope there. Differentiating each side of the equation, we get

\mathbf{D}\left(x^{2}+2 x y+y^{2}+3 x-7 y+2\right)=D(0) so

2 x+2 x y^{\prime}+2 y+2 y y^{\prime}+3-7 y^{\prime}=0 and

(2 x+2 y-7) y^{\prime}=-2 x-2 y-3.

Solving for y^{\prime}, y^{\prime}=\frac{-2 x-2 y-3}{2 x+2 y-7}, so the slope at (1,2) is m=y^{\prime}=\frac{-2-4-3}{2+4-7}=9.

Finally, the equation of the line is y-2=9(x-1) so y=9 x-7.


Practice 4: Find the points where the graph in Fig. 2 crosses the y-axis, and find the slopes of the tangent lines at those points.


Implicit differentiation is an alternate method for differentiating equations which can be solved explicitly for the function we want, and it is the only method for finding the derivative of a function which we cannot describe explicitly.

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. 

Practice Problem Answers

Practice 1: \mathrm{D}\left(\mathrm{x}^{2}+\mathrm{y}^{2}\right)=2 \mathrm{x}+2 \mathrm{y} \cdot \mathrm{y}^{\prime}

                   \frac{\mathrm{d}}{\mathrm{dx}}(\sin (2+3 \mathrm{y}))=\cos (2+3 \mathrm{y}) \cdot \mathrm{D}(2+3 \mathrm{y})=\cos (2+3 \mathrm{y}) \cdot 3 \mathbf{y}^{\prime}


Practice 2: Explicitly: y=\left(3 x^{2}+15\right)^{1 / 3} so y^{\prime}=\frac{1}{3}\left(3 x^{2}+15\right)^{-2 / 3} \cdot D\left(3 x^{2}+15\right)=\frac{1}{3}\left(3 x^{2}+15\right)^{-2 / 3} \cdot(6 x)

                                   When (x, y)=(2,3), y^{\prime}=\frac{1}{3}\left(3(2)^{2}+15\right)^{-2 / 3} \cdot(6 \cdot 2)=4(27)^{-2 / 3}=\frac{4}{9}

                    Implicitly: D\left(y^{3}-3 x^{2}\right)=D(15) so 3 y^{2} \cdot y^{\prime}-6 x=0 and y^{\prime}=\frac{2 x}{y^{2}}.

                                    When (x, y)=(2,3), y^{\prime}=\frac{2 \cdot(2)}{(3)^{2}}=\frac{4}{9}.


Practice 3: y+\sin (y)=x^{3}-x

\mathbf{D}(\mathrm{y}+\sin (\mathrm{y}))=\mathrm{D}\left(\mathrm{x}^{3}-\mathrm{x}\right) \quad differentiating each side.

\mathrm{y}^{\prime}+\cos (\mathrm{y}) \cdot \mathbf{y}^{\prime}=3 \mathrm{x}^{2}-1

\mathrm{y}^{\prime} \cdot(1+\cos (\mathrm{y}))=3 \mathrm{x}^{2}-1

\mathbf{y}^{\prime}=\frac{3 \mathrm{x}^{2}-1}{1+\cos (\mathrm{y})}

Then when (x, y)=(1,0), y^{\prime}=\frac{3(1)^{2}-1}{1+\cos (0)}=1.


Practice 4: To find where the parabola crosses the y-axis, we can set \mathrm{x}=0 and solve for the values of \mathrm{y}.

Replacing x with 0 in x^{2}+2 x y+y^{2}+3 x-7 y+2=0, we have y^{2}-7 y+2=0 so y=\frac{7 \pm \sqrt{(-7)^{2}-4(1)(2)}}{2(1)}=\frac{7 \pm \sqrt{41}}{2} \approx 0.3 and 6.7. The parabola crosses the \mathrm{y}-axis approximately at the points (0,0.3) and (0,6.7).

From Example 4, we know that y^{\prime}=\frac{-2 x-2 y-3}{2 x+2 y-7}, so

at the point (0,0.3), the slope is approximately \frac{0-0.6-3}{0+0.6-7} \approx 0.56, and

at the point (0,6.7), the slope is approximately \frac{0-13.4-3}{0+13.4-7} \approx-2.56.


Practice 5: f^{\prime}(x)=f(x) \cdot D(\ln (f(x))) and f(x)=(2 x+1)^{3}\left(3 x^{2}-4\right)^{7}(x+7)^{4}

(i) \quad \ln (f(x))=3 \cdot \ln (2 x+1)+7 \cdot \ln \left(3 x^{2}-4\right)+4 \cdot \ln (x+7).

(ii) \mathrm{D}(\ln (\mathrm{f}(\mathrm{x})))=\frac{3}{2 \mathrm{x}+1}(2)+\frac{7}{3 \mathrm{x}^{2}-4}(6 \mathrm{x})+\frac{4}{\mathrm{x}+7}(1)

(iii) f^{\prime}(x)=f(x) \cdot D(\ln (f(x)))=(2 x+1)^{3}\left(3 x^{2}-4\right)^{7}(x+7)^{4} \cdot\left\{\frac{2 \cdot 3}{2 x+1}+\frac{7 \cdot 6 x}{3 x^{2}-4}+\frac{4}{x+7}\right\}.


Practice 6: \mathrm{f}^{\prime}(\mathrm{x})=\mathrm{f}(\mathrm{x}) \cdot \mathrm{D}(\ln (\mathrm{f}(\mathrm{x}))) and \mathrm{f}(\mathrm{x})=\mathrm{x}^{\sin (\mathrm{x})} \mathrm{so}

(i) \ln (f(x))=\ln \left(x^{\sin (x)}\right)=\sin (x) \cdot \ln (x)

(ii) \quad \mathbf{D}(\ln (f(x)))=D(\sin (x) \cdot \ln (x))=\sin (x) \cdot D(\ln (x))+\ln (x) \cdot D(\sin (x))=\sin (x) \cdot \frac{1}{x}+\ln (x) \cdot \cos (x)

(iii) \quad \mathrm{f}^{\prime}(\mathrm{x})=\mathrm{f}(\mathrm{x}) \cdot \mathrm{D}(\ln (\mathrm{f}(\mathrm{x})))=\mathrm{x}^{\sin (\mathrm{x})} \cdot\left\{\sin (\mathrm{x}) \cdot \frac{1}{\mathrm{x}}+\ln (\mathrm{x}) \cdot \cos (\mathrm{x})\right\}