# Implicit Differentiation (and Logarithmic Differentiation)

Okay, so you have an equation in two variables, and you either are not willing, not able, or it’s impossible to solve for one of the variables as a function of the other. But you know that the equation represents a smooth curve, and at a point, there must be a tangent line. But how do we find this tangent line? Enter implicit differentiation.

The procedure of implicit differentiation is outlined and many examples are given. Proofs of the derivative formulas for the inverse trigonometric functions are provided and several examples of using them are given. Also detailed is the logarithmic differentiation procedure which can simplify the process of taking derivatives of equations involving products and quotients.

## Implicit Differentiation as a Procedure

Finding the slope of a tangent line is a local process; for example, a circle locally around a point, can have a tangent line even though it is not a function. In fact, every circle has a tangent line at every point.

The following process allows us to find derivatives of more general curves (not just functions); and in particular for an implicitly defined function. Notice that the process relies heavily on the chain rule.

Theorem. (Implicit Differentiation) Suppose that $f(x,y)=0$ is a given equation involving both $x$ and $y$ and that $\displaystyle \frac{dy}{d x}$ exists at $\left(x_0, y_0\right).$ Then $$\left.\frac{dy}{d x} \right|_{\left(x_0,y_0\right)}$$ can be found using the following procedure:

(1) Using the chain rule where appropriate, differentiate both sides of the equation with respect to $x.$

(2) If possible, solve the differentiated equation algebraically for $\frac{dy}{dx}$ and evaluate at $\left(x_0,y_0\right). Example. Use implicit differentiation to find$\displaystyle \frac{dy}{d x}given $$\sin (x+y)=y^2 \cos x.$$ Solution. We will use implicit differentiation, and in doing so we use the chain rule on the right hand and the product rule together with the chain rule on the left hand side of the equation: \begin{align*} \cos (x+y)\frac{d}{dx}(x+y) & =2 y \cos x \frac{dy}{dx}-y^2\sin x \\ \cos (x+y)\left(1+\frac{dy}{dx}\right)-2 y \cos x \frac{dy}{dx}& =-y^2\sin x\\ \cos (x+y)+\frac{dy}{dx}\cos (x+y)-2 y \cos x \frac{dy}{dx}& =-y^2\sin x\\ \frac{dy}{dx}(\cos (x+y)-2 y \cos x)& =-y^2\sin x-\cos (x+y)\\ \frac{dy}{dx}& =-\frac{y^2\sin x+\cos (x+y)}{\cos (x+y)-2 y \cos x} \end{align*} as desired. Example. Use implicit differentiation to find the tangent to the folium of Descartesx^3+y^3=6x y$at$(3,3).$Solution. Using implicit differentiation we have, $$3x^2+3y^2\frac{dy}{dx}=6y+6x\frac{dy}{dx}$$ $$\frac{dy}{dx}=\frac{6y-3x^2}{3y^2-6x}=\frac{x^2-2 y}{2 x-y^2}$$ So an equation of the tangent line at$(3,3)$is$ y-3=\left.\frac{dy}{dx}\right|_{(3,3)}(x-3)$which simplifies to$y=-x+6.$Example. Use implicit differentiation to find the tangent to the lemniscate of Bernoulli $$2\left(x^2+y^2\right)^2=25\left(x^2-y^2\right).$$ Solution. Using implicit differentiation we have, $$4 \left(x^2+y^2\right) \left(2x+2y\frac{dy}{dx}\right) = 50x-50y\frac{dy} {dx}$$ and so $$\frac{dy}{dx}=\frac{25 x-4 x \left(x^2+y^2\right)}{25 y+4 y \left(x^2+y^2\right)}$$ So an equation of the tangent line at$(3,1)$is$y-1=\frac{dy}{dx}|_{(3,1)}(x-3)$which simplifies to$y=\frac{-9}{13}x+\frac{40}{13}.$## Examples of Implicit Differentiation Example. Use implicit differentiation to find all points on the lemniscate of Bernoulli$\left(x^2+y^2\right)^2=4\left(x^2-y^2\right)$where the tangent line is horizontal. Solution. Using implicit differentiation we have, 2\left(x^2+y^2\right)\left(2x+2y\frac{dy}{dx}\right)=8x-8y\frac{dy}{dx} and so $$\frac{dy}{dx}=-\frac{x \left( -2+x^2+y^2 \right)}{y \left(2+x^2+y^2\right)}\$$ we need to find all$(x,y)$where$\frac{dy}{dx}=0.$Clearly, the point$(0,0)$is ruled out and so$-2+x^2+y^2=0$; that is$x^2+y^2=2.$Using$x^2+y^2=2$with the original we see$x^2-y^2=1$also. Therefore,$2x^2=3$and so$x=\pm \sqrt{\frac{3}{2}}$and$y=\pm \sqrt{\frac{1}{2}}.$Example. Use implicit differentiation to find two points on the curve whose equation is$x^2-3x y+2y^2=-2,$where the tangent line is vertical. Solution. Using implicit differentiation we determine, 2x-3y-3x\frac{dy}{dx}+4y\frac{dy}{dx}=0 and so,$\frac{dy}{dx}=\frac{3y-2x}{4y-3x}.$Since we want vertical tangent lines we need$4y-3x=0;$that is,$y=\frac{3}{4}x$and with the original equation this means; $$x^2-3x \left(\frac{3}{4}x\right)+2\left(\frac{3}{4}x\right)^2=-2$$ which is solved as$x=\pm 4.$So the points where the tangent line is vertical are$(-4,-3)$and$(4,3).$## Logarithmic Differentiation Logarithmic differentiation is a procedure that uses the chain rule and implicit differentiation. Basically the idea is to apply an appropriate logarithmic function to both sides of the given equation and then use some properties of logarithms to simplify before using implicit differentiation. Theorem. (Logarithmic Differentiation) Suppose that$f(x,y)=0$is a given equation involving both$x$and$y$; and that$\frac{dy}{dx}$exists at$\left(x_0,y_0\right).$Then$\frac{dy}{dx}$can be found using the following procedure: (1) Apply a logarithmic function with the appropriate base to both sides. (2) Use properties of logarithms to simplify. (3) Differentiate both sides of the equation with respect to$x.$(4) If possible, solve the differentiated equation algebraically for$\frac{dy}{dx}.$Example. Find the derivative of $$y=\frac{1}{(x-1)^3-(x+1)^3}$$ without using the quotient rule. Example. Use logarithmic differentiation to find$\frac{dy}{dx}given $$y=\frac{e^{2x}}{\left(x^2-3\right)^2\ln \sqrt{x}}.$$ Solution. Using the natural logarithmic function, we have $$\ln y=2x-2\ln \left(x^2-3\right)-\ln \left(\ln \left(\sqrt{x}\right)\right)$$ and applying implicit differentiation we have, \begin{align} \frac{1}{y}\frac{dy}{dx}= & 2-\frac{4x}{x^2-3}-\frac{1}{\ln \left(\sqrt{x}\right)}\frac{1}{\sqrt{x}}\frac{1}{2\sqrt{x}} \frac{dy}{dx} \\ & =\frac{e^{2x}}{\left(x^2-3\right)^2\ln \sqrt{x}}\left(2-\frac{4x}{x^2-3}-\frac{1}{\ln \left(\sqrt{x}\right)}\frac{1}{\sqrt{x}}\frac{1}{2\sqrt{x}}\right) \end{align} as desired. Example. Use logarithmic differentiation to find\frac{dy}{dx}$given$y=x^{\sin x}.$Solution. Using the natural logarithmic function, we have$\ln y=(\sin x)( \ln x )$and applying implicit differentiation we have, $$\frac{1}{y}\frac{dy}{dx}=(\cos x)(\ln x)+\frac{\sin x}{x} \frac{dy}{dx}=x^{\sin x}(\cos x)(\ln x)+\frac{\sin x}{x}$$ as desired. ## Exercises on Implicit Differentiation Exercise. Let$f$be the function defined by $$f(x)=\frac{2x-3}{7-5x}.$$ Sketch the graph of$f$and state whether or not the graph of$f$passes the horizontal line test. If so, find a rule for$f^{-1}$and then use it to find$\left(f^{-1}\right) ‘(0).$Verify the formula $$\left(f^{-1}\right)'(0)=\frac{1}{f ‘\left(f^{-1}(0)\right)}.$$ Exercise. Let$\displaystyle f(x)=\frac{5 x}{1-2x}.$Without finding a rule for$f^{-1}(x)$determine$\left(f^{-1}\right)'(1).$Exercise. Find$\displaystyle \frac{dy}{dx}$given$\displaystyle y=\frac{e^{2x}}{\left(x^2-3\right)^2\ln \sqrt{x}}.$Exercise. Find$\displaystyle \frac{dy}{dx}$given$\displaystyle y=x^{\sin x}.$Exercise. Determine whether the following functions are one-to-one.$(1) \quad f(x)=x^2+4(2) \quad f(x)=2x^3-4(3) \quad f(x)=-54+54 x-15 x^2+2 x^3(4) \quad f(x)=\frac{2x-3}{x-7}$Exercise. Determine whether or not the given functions are inverses of each other or not.$(1) \quad f(x)=x^3-4$and$g(x)=\sqrt[3]{x+4}(2) \quad f(x)=x^2+5, x\leq 0$and$g(x)=-\sqrt{x-5}, x\geq 5$Exercise. Find the inverse of the given function, it if exists.$(1) \quad \displaystyle f(x)=\frac{4x}{x-2}(2) \quad \displaystyle f(x)=\left(x^3+1\right)^5(3) \quad \displaystyle f(x)=x^2-6x, x\geq 3(4) \quad \displaystyle f(x)=\frac{x}{x^2-2}$Exercise. Solve the following equations for real$x$and give the number of solutions you find for each one. Also clearly state any extraneous solutions that you find for each one.$(1) \quad \displaystyle \log _2x=\log _45+3 \log _23(2) \quad \displaystyle \left(\sqrt[3]{5}\right)^{x+2}=5^{x^2}(3) \quad \displaystyle \log _5|x+3|+\log _5|x-3|=1(4) \quad \displaystyle \frac{1}{e^{x+3}+6e^{-x-3}}=\frac{1}{5}$Exercise. Given$f(x)=5-4x$and$a=1/2$find$f^{-1}(x)$and graph$f$and$f^{-1}$together. Then evaluate$\displaystyle \frac{ df}{dx}$at$x=a$and$\displaystyle \frac{ df^{-1}}{dx}$at$x=f(a)$to show that at these points $$\frac{ d f^{-1}}{dx}=\frac{1}{\left(\frac{ df}{dx}\right)}.$$ Exercise. Show that$h(x)=\left.x^3\right/4$and$k(x)=(4x)^{1/3}$are inverses of one another. Graph$h$an$k$over an$x$-interval large enough to show the graphs intersecting at$(2,2)$and$(-2,-2).$Find the slopes of the tangents to the graphs at$h$and$k$at$(2,2)$and$(-2,-2).$What lines are tangent to the graphs at$h$and$k$at$(2,2)$and$(-2,-2).$Exercise. Suppose that the differentiable function$y=f(x)$has an inverse and that the graph of$f$passes through the point$(2,4)$and has a slope of$1/3$there. Find the value of$\displaystyle \frac{ df^{-1}}{dx}$at$x=4.\$

David Smith (Dave) has a B.S. and M.S. in Mathematics and has enjoyed teaching precalculus, calculus, linear algebra, and number theory at both the junior college and university levels for over 20 years. David is the founder and CEO of Dave4Math.