Implicit Differentiation

# Implicit Differentiation

So far we have done calculus with explicit functions. That is we have a function $f$ explicitly in terms of x. For example, $f(x) = \sin x + 3x$ is a function explicitly in terms of $x$. However, sometimes we have a curve given by an equation that is not explicitly in terms of just $x$. For example $x^2 + y^2 = 1$, or $x^y - y + x = 3y^x$. We can use a technique known as implicit differentiation to differentiate these curves.

Recall that if we have an explicit function, for example $y = x^3$, then it follows that:

(1)
\begin{align} \frac{d}{dx} y = \frac{d}{dx} x^3 \\ \frac{dy}{dx} = 3x^2 \end{align}

What we are really doing is differentiating both sides of the equation. The derivative of $y$ is $\frac{dy}{dx}$, while the derivative of $x^3$ is $3x^2$ and:

(2)
\begin{align} \frac{d}{dx} y = \frac{dy}{dx} \quad \mathrm{or} \quad \frac{dy}{dx} = y' \end{align}

We already know this of course, so we can use this intuition to differentiate implicit equations. For example, let's differentiate the $y^2 - x = x^2 - 2y$

Let's first differentiate both sides of the equation, that is:

(3)
\begin{align} \frac{d}{dx}[ y^2 - x ] = \frac{d}{dx} [ x^2 - 2y ] \\ \frac{d}{dx} y^2 - 1 = 2x - 2y' \end{align}

Recall that $y^2 = y \cdot y$, so we can use the Derivative Chain Rule to differentiate this:

(4)
\begin{align} \frac{d}{dx} y^2 \\ = \frac{d}{dx} y \cdot y \\ = y \cdot y' + y \cdot y' \\ = 2y \cdot y' \end{align}

Hence we get that $\frac{d}{dx} y^2 = 2y \cdot y'$, and substituting this in and isolating for $y'$ we get:

(5)
\begin{align} \frac{d}{dx} y^2 - x = \frac{d}{dx} x^2 - 2y \\ 2y\cdot y' - 1 = 2x - 2y' \\ 2y\cdot y' - 1 = 2x - 2y' \\ 2y\cdot y' + 2y' = 2x + 1 \\ y' (2y + 2) = 2x + 1 \\ y' = \frac{2x +1}{2y +2} \end{align}
 Note: We differentiated $y^2$ in this example and got $2y \cdot y'$. We can of course generalize this in differentiating $y^n$ for $n \in \mathbb{Z}^+$ (the symbol $\mathbb{Z}^+$ represents the set of positive integers, for example $1, 2, 3, ...$) with the formula $\frac{d}{dx} y^n = ny^{n-1} \cdot y'$.

We will now look at some examples of implicit differentiation.

## Example 1

Differentiate $xy - x^3 = y^3 - \cos y$.

We will first differentiate both sides of the equation to get:

(6)
\begin{align} \quad \frac{d}{dx} (xy - x^3 ) = \frac{d}{dx} ( y^3 - \cos y ) \end{align}

We will need to use the chain rule to differentiate $xy$ and $\cos y$:

(7)
\begin{align} \quad \frac{d}{dx} (xy - x^3 ) = \frac{d}{dx} ( y^3 - \cos y ) \\ xy' + y - 3x^2 = 3y^2 \cdot y' + y' \sin y \end{align}

Then let's isolate $y'$:

(8)
\begin{align} \: xy' - 3y^2 \cdot y' - y' \sin y = 3x^2 - y \\ y' (x - 3y^2 - \sin y) = 3x^2 - y \\ y' = \frac{3x^2 - y}{x - 3y^2 - \sin y} \end{align}

## Example 2

Differentiate the $x^2 + \cos y = y$.

Taking the derivative of both sides and applying the chain rule we obtain:

(9)
\begin{align} \frac{d}{dx} x^2 + \frac{d}{dx} \cos y = \frac{d}{dx} y \\ 2x - y' \cdot \sin y = y' \\ 2x = y' \cdot \sin y + y' \\ 2x = y' (\sin y + 1) \\ y' = \frac{2x}{\sin y + 1} \end{align}