# Implicit Differentiation

Consider the following function $y=f(x)$ defined by the equation $2x^3-5xy-y^2=3$. Suppose that we want to find the derivative of $y$. How would we go about this? This equation is not in the standard form $y=\text{some function of }x$ that we’re used to, and it can’t be easily rewritten into this standard form because of the mixed terms like $-5xy$ that are present. At first glance, it seems like this function is not differentiable.

We call functions defined in this way to be *implicitly defined*. A function is called an **explicit function** when it’s written in the form of $y=\text{some function of }x$. There’s no terms dependent on $y$ on the right hand side, and there’s no terms dependent on $x$ on the left hand side. On the other hand, a function is called an **implicit function** when there are $x$- and $y$- dependent terms all mixed together. For example, the function $y=f(x)$ defined by the equation $2x^3-5xy-y^2=3$ above is considered to be an *implicit function*. Today, we’ll be learning how to differentiate implicit functions.

## Introduction

Let’s go back to our earlier example. Intuition might tell us to simply take the derivative of both sides of this equation with respect to $x$. Using linearity of the derivative, we have

The first term on the left hand side is pretty easy to evaluate, but how do we differentiate a term that is dependent on $y$, which it itself may be dependent on $x$? The trick is to use the chain rule. For example, consider the third term on the left hand side. We can use the chain rule to rewrite it:

Now, the differentiation variable exactly matches the function variable, and so the derivative is easy to evaluate:

Similarly, for the second term on the left hand side, we have (using the product rule)

Plugging in these results from above, we have

Note that since we are trying to solve for the derivative of $y=f(x)$, the $\frac{dy}{dx}$ term is exactly what we are solving for! Rearranging terms gives

This gives us the derivative of $y$. Now, you might be scratching your head and feel like something looks off. Why do we still have terms dependent on $y$ on the right hand side?

In the past, our explicit functions could yield explicitly defined derivatives that were solely a function of $x$. However, this may not be always the case. The derivative of $y$ can indeed depend on the function $y$ itself: this is not a problem! As an example consider the function $y=h(x)=x^n$. The power rule tells us that $h(x)=nx^{n-1}$. Another way of writing this derivative is

This definition of the derivative is equally valid. Here, the derivative of $y$ is defined as a function of both $y$ and $x$. In this case, we can switch back and forth between our explicit and implicit definitions of $dy/dx$. However, as we saw in the previous problem, this may not always be the case.

## Another Example

Consider the function $y=f(x)$ implicitly defined by the equation $x^2+y^2=r^2$, where $r$ is some constant. As you might remember from geometry, this is the equation of a circle with radius $r$ centered at the origin. We might be interested in finding the tangent line to the circle at a point $(r\cos\theta, r\sin\theta)$. Let’s try to accomplish this using implicit differentiation:

Again, using the chain rule,

The slope of the tangent line at $(r\cos\theta, r\sin\theta)$ is therefore

Therefore, using point-slope form, the equation for the tangent line is

How might we do this problem without implicit differentiation? Our first move would probably be to solve for $y$, giving . For convenience, we will only look at the positive root, although the same reasoning can be applied for the negative root. Using the chain rule (derive this for yourself), we have

Is this the same result as the one we obtained using implicit differentiation? Recall that , and so

as expected. This shows us that implicit and explicit differentiation (when possible) gives us the same result. However, with the explicit derivative result, the derivative is “uglier” and more complicated with the radical sign that we have to deal with. This shows that in some cases, it may be preferable to approach a problem using implicit differentiation, even if you can take the explicit derivative!

## Exercises

## Problem 1

Use implicit differentiation to find the derivative $dy/dx$ of the following functions:

- $\tan(x^2y^4)=3x+y^2$
- $7y^2+\sin(3x)=12-y^4$
- $2y^3+4x^2-y=x^6$
- $x^2+y^2=\sin(xy)$

## Problem 2

Consider the equation of the circle $x^2+y^2=r^2$ for fixed $r$ that we discussed above. We showed previously that $\frac{dy}{dx}=-\frac{x}{y}=-\cot\theta$ for any point on the circle.

- Using the result for the first derivative, find the second derivative $d^2y/dx^2$ in terms of $x$, $y$, and/or $y’$.
- Using the result for the first derivative, can you rewrite your expression for the second derivative in terms of only $x$ and $y$?
- Using equality $x^2+y^2=r^2$, can you rewrite your expression for the second derivative in terms of only $r$ and $y$?

## Problem 3

*This is a challenge problem.*

Suppose there is a function defined by for all $x$ and $y$, and .

- What is $f(0)$?
- What is $f’(0)$?
- What is $f(x)$?
- What is $f’(x)$?