As we have seen, there is a close relationship between the derivatives of $\ds e^x$ and $\ln x$ because these functions are inverses. Rather than relying on pictures for our understanding, we would like to be able to exploit this relationship computationally. In fact this technique can help us find derivatives in many situations, not just when we seek the derivative of an inverse function.

We will begin by illustrating the technique to find what we already know, the derivative of $\ln x$. Let's write $y=\ln x$ and then $\ds x=e^{\ln x}=e^y$, that is, $\ds x=e^y$. We say that this equation defines the function $y=\ln x$ implicitly because while it is not an explicit expression $y=\ldots$, it is true that if $\ds x=e^y$ then $y$ is in fact the natural logarithm function. Now, for the time being, pretend that all we know of $y$ is that $\ds x=e^y$; what can we say about derivatives? We can take the derivative of both sides of the equation: $${d\over dx}x={d\over dx}e^y.$$ Then using the chain rule on the right hand side: $$1 = \left({d\over dx}y\right) e^y = y'e^y.$$ Then we can solve for $y'$: $$y'={1\over e^y} = {1\over x}.$$ There is one little difficulty here. To use the chain rule to compute $\ds d/dx(e^y)=y'e^y$ we need to know that the function $y$ has a derivative. All we have shown is that if it has a derivative then that derivative must be $1/x$. When using this method we will always have to assume that the desired derivative exists, but fortunately this is a safe assumption for most such problems.

The example $y=\ln x$ involved an inverse function defined implicitly, but other functions can be defined implicitly, and sometimes a single equation can be used to implicitly define more than one function. Here's a familiar example. The equation $\ds r^2=x^2+y^2$ describes a circle of radius $r$. The circle is not a function $y=f(x)$ because for some values of $x$ there are two corresponding values of $y$. If we want to work with a function, we can break the circle into two pieces, the upper and lower semicircles, each of which is a function. Let's call these $y=U(x)$ and $y=L(x)$; in fact this is a fairly simple example, and it's possible to give explicit expressions for these: $\ds U(x)=\sqrt{r^2-x^2 }$ and $\ds L(x)=-\sqrt{r^2-x^2 }$. But it's somewhat easier, and quite useful, to view both functions as given implicitly by $\ds r^2=x^2+y^2$: both $\ds r^2=x^2+U(x)^2$ and $\ds r^2=x^2+L(x)^2$ are true, and we can think of $\ds r^2=x^2+y^2$ as defining both $U(x)$ and $L(x)$.

Now we can take the derivative of both sides as before, remembering that $y$ is not simply a variable but a function—in this case, $y$ is either $U(x)$ or $L(x)$ but we're not yet specifying which one. When we take the derivative we just have to remember to apply the chain rule where $y$ appears. $$ \eqalign{ {d\over dx}r^2&={d\over dx}(x^2+y^2)\cr 0&=2x+2yy'\cr y'&={-2x\over 2y}=-{x\over y}\cr }$$ Now we have an expression for $y'$, but it contains $y$ as well as $x$. This means that if we want to compute $y'$ for some particular value of $x$ we'll have to know or compute $y$ at that value of $x$ as well. It is at this point that we will need to know whether $y$ is $U(x)$ or $L(x)$. Occasionally it will turn out that we can avoid explicit use of $U(x)$ or $L(x)$ by the nature of the problem

Example 4.8.1 Find the slope of the circle $\ds 4=x^2+y^2$ at the point $\ds (1,-\sqrt{3})$. Since we know both the $x$ and $y$ coordinates of the point of interest, we do not need to explicitly recognize that this point is on $L(x)$, and we do not need to use $L(x)$ to compute $y$—but we could. Using the calculation of $y'$ from above, $$y'=-{x\over y}=-{1\over -\sqrt{3}}={1\over \sqrt{3}}.$$ It is instructive to compare this approach to others.

We might have recognized at the start that $\ds (1,-\sqrt{3})$ is on the function $\ds y=L(x)=-\sqrt{4-x^2}$. We could then take the derivative of $L(x)$, using the power rule and the chain rule, to get $$L'(x)=-{1\over 2}(4-x^2)^{-1/2}(-2x)={x\over\sqrt{4-x^2}}.$$ Then we could compute $\ds L'(1)=1/\sqrt{3}$ by substituting $x=1$.

Alternately, we could realize that the point is on $L(x)$, but use the fact that $y'=-x/y$. Since the point is on $L(x)$ we can replace $y$ by $L(x)$ to get $$y'=-{x\over L(x)}={x\over \sqrt{4-x^2}},$$ without computing the derivative of $L(x)$ explicitly. Then we substitute $x=1$ and get the same answer as before.

In the case of the circle it is possible to find the functions $U(x)$ and $L(x)$ explicitly, but there are potential advantages to using implicit differentiation anyway. In some cases it is more difficult or impossible to find an explicit formula for $y$ and implicit differentiation is the only way to find the derivative.

Example 4.8.2 Find the derivative of any function defined implicitly by $\ds yx^2+e^y=x$. We treat $y$ as an unspecified function and use the chain rule: $$\eqalign{ {d\over dx}(yx^2+e^y)&={d\over dx}x\cr (y\cdot 2x+y'\cdot x^2)+y'e^y &= 1\cr y'x^2+y'e^y&= 1-2xy\cr y'(x^2+e^y)&= 1-2xy\cr y'&={1-2xy\over x^2+e^y}\cr }$$

You might think that the step in which we solve for $y'$ could sometimes be difficult—after all, we're using implicit differentiation here because we can't solve the equation $\ds yx^2+e^y=x$ for $y$, so maybe after taking the derivative we get something that is hard to solve for $y'$. In fact, this never happens. All occurrences $y'$ come from applying the chain rule, and whenever the chain rule is used it deposits a single $y'$ multiplied by some other expression. So it will always be possible to group the terms containing $y'$ together and factor out the $y'$, just as in the previous example. If you ever get anything more difficult you have made a mistake and should fix it before trying to continue.

It is sometimes the case that a situation leads naturally to an equation that defines a function implicitly.

Example 4.8.3 Consider all the points $(x,y)$ that have the property that the distance from $(x,y)$ to $\ds (x_1,y_1)$ plus the distance from $(x,y)$ to $\ds (x_2,y_2)$ is $2a$ ($a$ is some constant). These points form an ellipse, which like a circle is not a function but can viewed as two functions pasted together. Because we know how to write down the distance between two points, we can write down an implicit equation for the ellipse: $$\sqrt{(x-x_1)^2+(y-y_1)^2}+\sqrt{(x-x_2)^2+(y-y_2)^2}=2a.$$ Then we can use implicit differentiation to find the slope of the ellipse at any point, though the computation is rather messy.

Example 4.8.4 We have already justified the power rule by using the exponential function, but we could also do it for rational exponents by using implicit differentiation. Suppose that $\ds y=x^{m/n}$, where $m$ and $n$ are positive integers. We can write this implicitly as $\ds y^n=x^m$, then because we justified the power rule for integers, we can take the derivative of each side: $$\eqalign{ ny^{n-1}y' &= mx^{m-1}\cr y'&= {m\over n}{x^{m-1}\over y^{n-1}}\cr y'&= {m\over n}{x^{m-1}\over (x^{m/n})^{n-1}}\cr y'&= {m\over n}x^{m-1-(m/n)(n-1)}\cr y'&= {m\over n}x^{m-1-m+(m/n)}\cr y'&= {m\over n}x^{(m/n)-1}\cr }$$

Exercises 4.8

In exercises 1–8, find a formula for the derivative $y'$ at the point $(x,y)$:

Ex 4.8.1 $\ds y^2=1+x^2$ (answer)

Ex 4.8.2 $\ds x^2+xy+y^2=7$ (answer)

Ex 4.8.3 $\ds x^3+xy^2=y^3+yx^2$ (answer)

Ex 4.8.4 $\ds 4\cos x \sin y = 1$ (answer)

Ex 4.8.5 $\ds\sqrt{x} + \sqrt{y} = 9$ (answer)

Ex 4.8.6 $\ds \tan(x/y) = x+ y$ (answer)

Ex 4.8.7 $\ds \sin (x+y ) =xy$ (answer)

Ex 4.8.8 $\ds{1\over x} + {1\over y} = 7$ (answer)

Ex 4.8.9 A hyperbola passing through $(8,6)$ consists of all points whose distance from the origin is a constant more than its distance from the point (5,2). Find the slope of the tangent line to the hyperbola at $(8,6)$. (answer)

Ex 4.8.10 Compute $y'$ for the ellipse of example 4.8.3.

Ex 4.8.11 If $\ds y=\log_a x$ then $\ds a^y=x$. Use implicit differentiation to find $\ds y'$.

Ex 4.8.12 The graph of the equation $\ds x^2 - xy + y^2 = 9$ is an ellipse. Find the lines tangent to this curve at the two points where it intersects the $x$-axis. Show that these lines are parallel. (answer)

Ex 4.8.13 Repeat the previous problem for the points at which the ellipse intersects the $y$-axis. (answer)

Ex 4.8.14 Find the points on the ellipse from the previous two problems where the slope is horizontal and where it is vertical. (answer)

Ex 4.8.15 Find an equation for the tangent line to $\ds x^4 = y^2 + x^2$ at $\ds (2, \sqrt{12})$. (This curve is the kampyle of Eudoxus.) (answer)

Ex 4.8.16 Find an equation for the tangent line to $\ds x^{2/3} + y^{2/3} = a^{2/3}$ at a point $\ds (x_1 ,y_1)$ on the curve, with $\ds x_1 \neq 0$ and $\ds y_1 \neq 0$. (This curve is an astroid.) (answer)

Ex 4.8.17 Find an equation for the tangent line to $\ds (x^2 +y^2 )^2 =x^2 -y^2$ at a point $\ds (x_1 , y_1)$ on the curve, when $\ds y_1 \neq 0$. (This curve is a lemniscate.) (answer)

Remark 4.8.5 Definition. Two curves are orthogonal if at each point of intersection, the angle between their tangent lines is $\pi/2$. Two families of curves, $\cal{A}$ and $\cal{B}$, are orthogonal trajectories of each other if given any curve $C$ in $\cal{A}$ and any curve $D$ in $\cal{B}$ the curves $C$ and $D$ are orthogonal. For example, the family of horizontal lines in the plane is orthogonal to the family of vertical lines in the plane.

Ex 4.8.18 Show that $\ds x^2 -y^2 =5$ is orthogonal to $\ds 4x^2 +9y^2 =72$. (Hint: You need to find the intersection points of the two curves and then show that the product of the derivatives at each intersection point is $-1$.)

Ex 4.8.19 Show that $\ds x^2 +y^2 = r^2$ is orthogonal to $y=mx$. Conclude that the family of circles centered at the origin is an orthogonal trajectory of the family of lines that pass through the origin.

Note that there is a technical issue when $m=0$. The circles fail to be differentiable when they cross the $x$-axis. However, the circles are orthogonal to the $x$-axis. Explain why. Likewise, the vertical line through the origin requires a separate argument.

Ex 4.8.20 For $k\not= 0$ and $c \neq 0$ show that $\ds y^2 -x^2 =k$ is orthogonal to $yx =c$. In the case where $k$ and $c$ are both zero, the curves intersect at the origin. Are the curves $\ds y^2 -x^2 =0$ and $yx=0$ orthogonal to each other?

Ex 4.8.21 Suppose that $m\neq 0$. Show that the family of curves $\ds \{y=mx+b \mid b\in \R \}$ is orthogonal to the family of curves $\ds \{y=-(x/m)+c \mid c \in \R\}$.