# Calculus/Implicit Differentiation

 ← Higher Order Derivatives Calculus Derivatives of Exponential and Logarithm Functions → Implicit Differentiation

Generally, you will encounter functions expressed in explicit form, that is, in the form ${\displaystyle y=f(x)}$ . To find the derivative of ${\displaystyle y}$ with respect to ${\displaystyle x}$ , you take the derivative with respect to ${\displaystyle x}$ of both sides of the equation to get

${\displaystyle {\frac {dy}{dx}}={\frac {d}{dx}}[f(x)]=f'(x)}$

But suppose you have a relation of the form ${\displaystyle f{\bigl (}x,y(x){\bigr )}=g{\bigl (}x,y(x){\bigr )}}$ . In this case, it may be inconvenient or even impossible to solve for ${\displaystyle y}$ as a function of ${\displaystyle x}$ . A good example is the relation ${\displaystyle y^{2}+2yx+3=5x}$ . In this case you can utilize implicit differentiation to find the derivative. To do so, one takes the derivative of both sides of the equation with respect to ${\displaystyle x}$ and solves for ${\displaystyle y'}$ . That is, form

${\displaystyle {\frac {d}{dx}}{\bigl [}f{\bigl (}x,y(x){\bigr )}{\bigr ]}={\frac {d}{dx}}{\big [}g{\bigl (}x,y(x){\bigr )}{\big ]}}$

and solve for ${\displaystyle {\frac {dy}{dx}}}$ . You need to employ the chain rule whenever you take the derivative of a variable with respect to a different variable. For example,

${\displaystyle {\frac {d}{dx}}(y^{3})={\frac {d}{dy}}[y^{3}]\cdot {\frac {dy}{dx}}=3y^{2}\cdot y'}$

## Implicit Differentiation and the Chain Rule

To understand how implicit differentiation works and use it effectively it is important to recognize that the key idea is simply the chain rule. First let's recall the chain rule. Suppose we are given two differentiable functions ${\displaystyle f(x),g(x)}$  and that we are interested in computing the derivative of the function ${\displaystyle f{\bigl (}g(x){\bigr )}}$  , the chain rule states that:

${\displaystyle {\frac {d}{dx}}{\bigl [}f{\bigl (}g(x){\bigr )}{\bigr ]}=f'{\bigl (}g(x){\bigr )}\cdot g'(x)}$

That is, we take the derivative of ${\displaystyle f}$  as normal and then plug in ${\displaystyle g}$  , finally multiply the result by the derivative of ${\displaystyle g}$  .

Now suppose we want to differentiate a term like ${\displaystyle y^{2}}$  with respect to ${\displaystyle x}$  where we are thinking of ${\displaystyle y}$  as a function of ${\displaystyle x}$  , so for the remainder of this calculation let's write it as ${\displaystyle y(x)}$  instead of just ${\displaystyle y}$  . The term ${\displaystyle y^{2}}$  is just the composition of ${\displaystyle f(x)=x^{2}}$  and ${\displaystyle y(x)}$  . That is, ${\displaystyle f{\bigl (}y(x){\bigr )}=y(x)^{2}}$  . Recalling that ${\displaystyle f'(x)=2x}$  then the chain rule states that:

${\displaystyle {\frac {d}{dx}}{\bigl [}f{\bigl (}y(x){\bigr )}{\bigr ]}=f'{\bigl (}y(x){\bigr )}\cdot y'(x)=2y(x)y'(x)}$

Of course it is customary to think of ${\displaystyle y}$  as being a function of ${\displaystyle x}$  without always writing ${\displaystyle y(x)}$  , so this calculation usually is just written as

${\displaystyle {\frac {d}{dx}}(y^{2})=2yy'}$

Don't be confused by the fact that we don't yet know what ${\displaystyle y'}$  is, it is some function and often if we are differentiating two quantities that are equal it becomes possible to explicitly solve for ${\displaystyle y'}$  (as we will see in the examples below.) This makes it a very powerful technique for taking derivatives.

## Explicit Differentiation

For example, suppose we are interested in the derivative of ${\displaystyle y}$  with respect to ${\displaystyle x}$  , where ${\displaystyle x,y}$  are related by the equation

${\displaystyle x^{2}+y^{2}=1}$

This equation represents a circle of radius 1 centered on the origin. Note that ${\displaystyle y}$  is not a function of ${\displaystyle x}$  since it fails the vertical line test (${\displaystyle y=\pm 1}$  when ${\displaystyle x=0}$  , for example).

To find ${\displaystyle y'}$  , first we can separate variables to get

${\displaystyle y^{2}=1-x^{2}}$

Taking the square root of both sides we get two separate functions for ${\displaystyle y}$  :

${\displaystyle y=\pm {\sqrt {1-x^{2}}}}$

We can rewrite this as a fractional power:

${\displaystyle y=\pm (1-x^{2})^{\frac {1}{2}}}$

Using the chain rule we get,

${\displaystyle y'=\pm {\frac {(1-x^{2})^{-{\frac {1}{2}}}\cdot (-2x)}{2}}=\mp {\frac {x}{\sqrt {1-x^{2}}}}}$

And simplifying by substituting ${\displaystyle y}$  back into this equation gives

${\displaystyle y'=-{\frac {x}{y}}}$

## Implicit Differentiation

Using the same equation

${\displaystyle x^{2}+y^{2}=1}$

First, differentiate with respect to ${\displaystyle x}$  on both sides of the equation:

${\displaystyle {\frac {d}{dx}}[x^{2}+y^{2}]={\frac {d}{dx}}[1]}$
${\displaystyle {\frac {d}{dx}}[x^{2}]+{\frac {d}{dx}}[y^{2}]=0}$

To differentiate the second term on the left hand side of the equation (call it ${\displaystyle f(y(x))=y^{2}}$ ), use the chain rule:

${\displaystyle {\frac {df}{dx}}={\frac {df}{dy}}\cdot {\frac {dy}{dx}}=2y\cdot y'}$

So the equation becomes

${\displaystyle 2x+2yy'=0}$

Separate the variables:

${\displaystyle 2yy'=-2x}$

Divide both sides by ${\displaystyle 2y}$  , and simplify to get the same result as above:

${\displaystyle y'=-{\frac {2x}{2y}}}$
${\displaystyle y'=-{\frac {x}{y}}}$

### Uses

Implicit differentiation is useful when differentiating an equation that cannot be explicitly differentiated because it is impossible to isolate variables.

For example, consider the equation,

${\displaystyle x^{2}+xy+y^{2}=16}$

Differentiate both sides of the equation (remember to use the product rule on the term ${\displaystyle xy}$ ):

${\displaystyle 2x+y+xy'+2yy'=0}$

Isolate terms with ${\displaystyle y'}$ :

${\displaystyle xy'+2yy'=-2x-y}$

Factor out a ${\displaystyle y'}$  and divide both sides by the other term:

${\displaystyle y'={\frac {-2x-y}{x+2y}}}$

### Example

${\displaystyle xy=1}$

can be solved as:

${\displaystyle y={\frac {1}{x}}}$

then differentiated:

${\displaystyle {\frac {dy}{dx}}=-{\frac {1}{x^{2}}}}$

However, using implicit differentiation it can also be differentiated like this:

${\displaystyle {\frac {d}{dx}}[xy]={\frac {d}{dx}}[1]}$

use the product rule:

${\displaystyle x{\frac {dy}{dx}}+y=0}$

solve for ${\displaystyle {\frac {dy}{dx}}}$ :

${\displaystyle {\frac {dy}{dx}}=-{\frac {y}{x}}}$

Note that, if we substitute ${\displaystyle y={\frac {1}{x}}}$  into ${\displaystyle {\frac {dy}{dx}}=-{\frac {y}{x}}}$  , we end up with ${\displaystyle {\frac {dy}{dx}}=-{\frac {1}{x^{2}}}}$  again.

### Application: inverse trigonometric functions

Arcsine, arccosine, arctangent. These are the functions that allow you to determine the angle given the sine, cosine, or tangent of that angle.

${\displaystyle y=\arcsin(x)}$

To find ${\displaystyle {\frac {\mathrm {d} y}{\mathrm {d} x}}}$  we first need to break this down into a form we can work with:

${\displaystyle x=\sin(y)}$

Then we can take the derivative of that:

${\displaystyle 1=\cos(y)\cdot {\frac {\mathrm {d} y}{\mathrm {d} x}}}$

...and solve for ${\displaystyle {\frac {\mathrm {d} y}{\mathrm {d} x}}}$  :

${\displaystyle y=\arcsin(x)}$  gives us this unit triangle.
${\displaystyle {\frac {\mathrm {d} y}{\mathrm {d} x}}={\frac {1}{\cos(y)}}}$

At this point we need to go back to the unit triangle. Since ${\displaystyle y}$  is the angle and the opposite side is ${\displaystyle \sin(y)=x}$  , the adjacent side is ${\displaystyle \cos(y)={\sqrt {1-x^{2}}}}$  , and the hypotenuse is 1. Since we have determined the value of ${\displaystyle \cos(y)}$  based on the unit triangle, we can substitute it back in to the above equation and get:

 Derivative of the Arcsine${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} x}}\arcsin(x)={\frac {1}{\sqrt {1-x^{2}}}}}$

We can use an identical procedure for the arccosine and arctangent:

 Derivative of the Arccosine${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} x}}\arccos(x)={\frac {\mathrm {d} }{\mathrm {d} x}}\left({\frac {\pi }{2}}\right)-{\frac {\mathrm {d} }{\mathrm {d} x}}\arcsin(x)=-{\frac {1}{\sqrt {1-x^{2}}}}}$ Derivative of the Arctangent${\displaystyle {\frac {\mathrm {d} }{\mathrm {d} x}}\arctan(x)={\frac {1}{1+x^{2}}}}$

 ← Higher Order Derivatives Calculus Derivatives of Exponential and Logarithm Functions → Implicit Differentiation