Implicit differentiation
So far, every function has had the form $y=f(x)$. The variable $y$ is alone on one side. We say $y$ is given explicitly.
Some curves are described by an equation in $x$ and $y$ instead. For example, the circle
$x^2+y^2=25$.
Here $y$ is given implicitly: the equation connects $x$ and $y$, but $y$ is not alone.
We could solve for $y$: $y=\pm\sqrt{25-x^2}$. But that gives two functions, and the square roots make the derivative messy. For other curves, such as $x^3+y^3=6xy$, solving for $y$ is very hard.
Implicit differentiation finds $\dfrac{dy}{dx}$ without solving for $y$.
The idea
We think of $y$ as a function of $x$, even though we do not know its formula. Then we differentiate both sides of the equation with respect to $x$.
The key step is differentiating a term with $y$ in it. Because $y$ is a function of $x$, we must use the chain rule. For example, $y^2$ is a square with $y$ inside. So
$\dfrac{d}{dx}(y^2)=2y\cdot\dfrac{dy}{dx}$.
Compare this with $\dfrac{d}{dx}(x^2)=2x$. The extra factor $\dfrac{dy}{dx}$ is the derivative of the inner function, $y$.
In general, every time we differentiate a term with $y$, we multiply by $\dfrac{dy}{dx}$:
- $\dfrac{d}{dx}(y)=\dfrac{dy}{dx}$
- $\dfrac{d}{dx}(y^n)=ny^{n-1}\dfrac{dy}{dx}$
- $\dfrac{d}{dx}(\sin y)=\cos y\,\dfrac{dy}{dx}$
To keep the lines short, we often write $y'$ for $\dfrac{dy}{dx}$.
A common mistake: writing $\dfrac{d}{dx}(y^2)=2y$. This forgets the factor $y'$.
How to differentiate implicitly
- Differentiate both sides of the equation with respect to $x$. Multiply by $y'$ each time you differentiate a term with $y$.
- Move all the terms with $y'$ to one side, and all other terms to the other side.
- Factor out $y'$.
- Divide to solve for $y'$.
Example 1: For the circle $x^2+y^2=25$:
(a) Find $\dfrac{dy}{dx}$.
(b) Find the equation of the tangent line at $(3,4)$.
Solution:
(a) Differentiate both sides with respect to $x$:
$\dfrac{d}{dx}(x^2)+\dfrac{d}{dx}(y^2)=\dfrac{d}{dx}(25)$
$\begin{align*}2x+2yy'&=0\\2yy'&=-2x\\y'&=-\dfrac{x}{y}\end{align*}$
(b) The point $(3,4)$ is on the circle, because $3^2+4^2=25$.
The slope at $(3,4)$:
$y'=-\dfrac{3}{4}$
The tangent line:
$\begin{align*}y-4&=-\tfrac{3}{4}(x-3)\\y&=-\tfrac{3}{4}x+\tfrac{25}{4}\end{align*}$
Check: Near $(3,4)$, the circle is the top half, $y=\sqrt{25-x^2}$. By the chain rule,
$y'=\dfrac{-x}{\sqrt{25-x^2}}$.
At $x=3$, this is $\dfrac{-3}{\sqrt{16}}=-\dfrac{3}{4}$. The answers match.
Notice that the slope $y'=-\dfrac{x}{y}$ uses both $x$ and $y$. This is normal in implicit differentiation. To find a slope, you need the whole point, not only $x$. For example, at $(3,-4)$ the slope is $-\dfrac{3}{-4}=\dfrac{3}{4}$.
Example 2: Find the slope of the tangent line to
$x^3+y^3=6xy$
at the point $(3,3)$.
Solution:
First, check the point: $27+27=54$ and $6(3)(3)=54$. So $(3,3)$ is on the curve.
Differentiate both sides. The right side, $6xy$, is a product, so use the product rule:
$\begin{align*}&\dfrac{d}{dx}(6xy)\\&=6(1\cdot y+x\cdot y')\\&=6y+6xy'\end{align*}$
So the equation becomes
$3x^2+3y^2y'=6y+6xy'$.
Move the $y'$ terms to the left, and the other terms to the right:
$3y^2y'-6xy'=6y-3x^2$
Factor out $y'$:
$y'(3y^2-6x)=6y-3x^2$
Divide both sides by $3y^2-6x$:
$y'=\dfrac{6y-3x^2}{3y^2-6x}$
Divide the numerator and the denominator by $3$:
$y'=\dfrac{2y-x^2}{y^2-2x}$
At $(3,3)$:
$y'=\dfrac{2(3)-9}{9-2(3)}=\dfrac{-3}{3}=-1$
Example 3: Find $y'$ for
$x+\sin y=xy$.
Solution:
Differentiate each term:
- $\dfrac{d}{dx}(x)=1$.
- $\dfrac{d}{dx}(\sin y)=\cos y\cdot y'$, by the chain rule.
- $\dfrac{d}{dx}(xy)=y+xy'$, by the product rule.
So the equation becomes
$1+\cos y\cdot y'=y+xy'$.
Solve for $y'$:
$\begin{align*}\cos y\cdot y'-xy'&=y-1\\y'(\cos y-x)&=y-1\\y'&=\dfrac{y-1}{\cos y-x}\end{align*}$
As always with trigonometric functions, $y$ is in radians.
Horizontal and vertical tangent lines
When $y'$ is a fraction, it tells us two things:
- The tangent line is horizontal where the numerator is $0$ (and the denominator is not $0$). The slope is $0$ there.
- The tangent line is vertical where the denominator is $0$ (and the numerator is not $0$). The slope is undefined there.
For example, the circle in Example 1 has vertical tangent lines at $(5,0)$ and $(-5,0)$. There, $y'=-\dfrac{x}{y}$ has the denominator $0$.
Example 4: Find the points on the curve
$x^2+xy+y^2=3$
where the tangent line is horizontal or vertical.
Solution:
Differentiate both sides. The middle term $xy$ needs the product rule:
$2x+(y+xy')+2yy'=0$
Solve for $y'$:
$\begin{align*}xy'+2yy'&=-2x-y\\y'(x+2y)&=-(2x+y)\\y'&=-\dfrac{2x+y}{x+2y}\end{align*}$
Horizontal: The numerator is $0$ when
$2x+y=0$, that is, $y=-2x$.
Put this into the equation of the curve:
$\begin{align*}x^2+x(-2x)+(-2x)^2&=3\\x^2-2x^2+4x^2&=3\\3x^2&=3\\x&=\pm 1\end{align*}$
Then $y=-2x$ gives the points $(1,-2)$ and $(-1,2)$.
Vertical: The denominator is $0$ when
$x+2y=0$, that is, $x=-2y$.
Put this into the equation of the curve:
$\begin{align*}(-2y)^2+(-2y)y+y^2&=3\\4y^2-2y^2+y^2&=3\\3y^2&=3\\y&=\pm 1\end{align*}$
Then $x=-2y$ gives the points $(-2,1)$ and $(2,-1)$.
At all four points, only one of the numerator and the denominator is $0$.
The power rule for fraction exponents
In basic differentiation rules, we said the power rule also works when the exponent is a fraction. Implicit differentiation shows why.
Let $y=x^{p/q}$, where $p$ and $q$ are integers, and $q$ is positive. Raise both sides to the power $q$:
$y^q=x^p$
Differentiate both sides implicitly:
$qy^{q-1}y'=px^{p-1}$
Divide both sides by $qy^{q-1}$:
$y'=\dfrac{p}{q}\cdot\dfrac{x^{p-1}}{y^{q-1}}$
Now replace $y$ by $x^{p/q}$. The denominator becomes
$y^{q-1}=x^{p(q-1)/q}=x^{p-p/q}$.
So
$\begin{align*}&y'\\&=\dfrac{p}{q}\cdot\dfrac{x^{p-1}}{x^{p-p/q}}\end{align*}$
Subtract the exponents:
$\begin{align*}&=\dfrac{p}{q}\,x^{(p-1)-(p-p/q)}\end{align*}$
Simplify the exponent:
$\begin{align*}&\dfrac{d}{dx}\left(x^{p/q}\right)=\dfrac{p}{q}\,x^{p/q-1}\end{align*}$
This is exactly the power rule with $n=\dfrac{p}{q}$.
Example 5: Find each derivative.
(a) $y=x^{3/4}$
(b) $y=\sqrt[3]{x^2+1}$
Solution:
(a) $y'=\dfrac{3}{4}x^{-1/4}$
(b) Rewrite the root as a power:
$y=(x^2+1)^{1/3}$
Inner function: $u=x^2+1$, so $u'=2x$.
$\begin{align*}&y'\\&=\tfrac{1}{3}(x^2+1)^{-2/3}\cdot 2x\\&=\dfrac{2x}{3(x^2+1)^{2/3}}\end{align*}$
Summary
- Differentiate both sides with respect to $x$.
- Each time you differentiate a term with $y$, multiply by $y'$ (the chain rule).
- Collect the $y'$ terms, factor out $y'$, and solve.
- The slope $y'$ usually depends on both $x$ and $y$, so you need the whole point.
- Numerator $0$: horizontal tangent. Denominator $0$: vertical tangent.
← The chain ruleDerivatives of exponential and logarithmic functions →