Slopes of curves that are not functions — differentiate both sides, treat $y$ as a function of $x$, then solve for $\dfrac{dy}{dx}$.
We have already found slopes and rates of change when we had an explicit formula $y=f(x)$. Suppose instead we want the slope of an arbitrary curve such as a circle. In this section we find the derivatives of functions that define $y$ implicitly in terms of $x$.
Implicit Differentiation
When we write $y=x^2+1$, $y$ is an explicit function of $x$. The equation $y-x^2=1$ defines the same function implicitly. Implicit differentiation lets us find slopes of tangents to curves that are not functions at all — curves that fail the vertical line test — by treating portions of the curve as functions of $x$.
For example, $x^2+y^2=25$ defines many functions implicitly: $y=\sqrt{25-x^2}$, $y=-\sqrt{25-x^2}$, and mixtures of the two. For the slope at $(3,4)$ we could differentiate $y=\sqrt{25-x^2}$; at $(3,-4)$ we would need $y=-\sqrt{25-x^2}$. Implicit differentiation handles both at once, without ever solving for $y$.
Take the derivative of both sides of the equation. Keep in mind that $y$ is a function of $x$: whereas $\dfrac{d}{dx}(\sin x)=\cos x$, we have $\dfrac{d}{dx}(\sin y)=\cos y\,\dfrac{dy}{dx}$ by the chain rule.
Rewrite the equation so that all terms containing $\dfrac{dy}{dx}$ are on the left and all other terms are on the right.
Factor out $\dfrac{dy}{dx}$ on the left.
Solve for $\dfrac{dy}{dx}$ by dividing both sides by the remaining factor.
Interactive 1 — The Implicit Slope Tracer
The curve is drawn straight from its equation — no formula $y=f(x)$ is ever used. A point slides along the curve carrying a short line with the current slope; the slope readout comes from the implicit formula for $\dfrac{dy}{dx}$. The orange ring marks a reference point on the curve.
$x$—
$y$—
$dy/dx$—
✏️ Example 1 — Using implicit differentiation
Assuming that $y$ is defined implicitly by the equation $x^2+y^2=25$, find $\dfrac{dy}{dx}$.
💡 Show solution▶
Step 1 Differentiate both sides with respect to $x$: $$\frac{d}{dx}\left(x^2+y^2\right)=\frac{d}{dx}(25)\ \Longrightarrow\ \frac{d}{dx}\left(x^2\right)+\frac{d}{dx}\left(y^2\right)=0.$$
Step 2 The chain rule gives $\dfrac{d}{dx}\left(y^2\right)=2y\dfrac{dy}{dx}$, so $$2x+2y\frac{dy}{dx}=0.$$
✏️ Example 3 — Using implicit differentiation to find a second derivative
Find $\dfrac{d^2y}{dx^2}$ if $x^2+y^2=25$.
💡 Show solution▶
Step 1 From Example 1, $\dfrac{dy}{dx}=-\dfrac{x}{y}$. Differentiate this with the quotient rule, keeping $y$ as a function of $x$: $$\frac{d^2y}{dx^2}=\frac{d}{dx}\left(-\frac{x}{y}\right)=-\frac{1\cdot y-x\,\dfrac{dy}{dx}}{y^2}.$$
Step 3 Use the original equation $x^2+y^2=25$ to simplify the numerator: $$\frac{d^2y}{dx^2}=-\frac{25}{y^3}.$$
Meaning On the upper half ($y>0$) the second derivative is negative — the arc bends down; on the lower half it is positive.
Logarithmic Differentiation
We can differentiate $y=(f(x))^n$ and $y=b^{f(x)}$, but not yet $y=x^x$ or $y=(\sin x)^x$, where both the base and the exponent vary. These need logarithmic differentiation, which handles any $h(x)=(g(x))^{f(x)}$ and also turns messy products and quotients such as $\dfrac{x\sqrt{2x+1}}{e^x\sin^3x}$ into sums.
Take the natural logarithm of both sides: $\ln y=\ln h(x)$.
Use the properties of logarithms to expand $\ln h(x)$ as much as possible.
Differentiate both sides. On the left you get $\dfrac1y\dfrac{dy}{dx}$.
Multiply both sides by $y$ to solve for $\dfrac{dy}{dx}$.
Replace $y$ by $h(x)$.
✏️ Example 4 — Using logarithmic differentiation
Find the derivative of $y=\left(2x^4+1\right)^{\tan x}$.
💡 Show solution▶
Step 1 Take logarithms and bring the exponent down: $$\ln y=\ln\left(2x^4+1\right)^{\tan x}=\tan x\,\ln\left(2x^4+1\right).$$
Step 2 Differentiate both sides (product rule on the right): $$\frac1y\frac{dy}{dx}=\sec^2x\,\ln\left(2x^4+1\right)+\tan x\cdot\frac{1}{2x^4+1}\cdot8x^3.$$
Step 3 Multiply by $y$ and substitute back: $$\frac{dy}{dx}=\left(2x^4+1\right)^{\tan x}\left(\sec^2x\,\ln\left(2x^4+1\right)+\frac{8x^3\tan x}{2x^4+1}\right).$$
✏️ Example 5 — Using logarithmic differentiation on a product and quotient
Find the derivative of $y=\dfrac{x\sqrt{2x+1}}{e^x\sin^3x}$.
💡 Show solution▶
Step 1 Take logarithms and expand fully: $$\ln y=\ln x+\tfrac12\ln(2x+1)-\ln e^x-\ln(\sin x)^3=\ln x+\tfrac12\ln(2x+1)-x-3\ln(\sin x).$$
Step 2 Differentiate each term: $$\frac1y\frac{dy}{dx}=\frac1x+\frac12\cdot\frac{2}{2x+1}-1-3\cdot\frac{\cos x}{\sin x}=\frac1x+\frac{1}{2x+1}-1-3\cot x.$$
Step 3 Multiply by $y$: $$\frac{dy}{dx}=\frac{x\sqrt{2x+1}}{e^x\sin^3x}\left(\frac1x+\frac{1}{2x+1}-1-3\cot x\right).$$
Why it helps The quotient rule on the original would need a product rule inside a quotient rule with a chain rule inside that. Logarithms turned all of it into four one-line derivatives.
The right panel draws the derivative obtained by logarithmic differentiation. The tangent on the left always matches it — try the $x^x$ option and watch the slope reach zero at $x=1/e$.
$f$ with its tangent
$f'$ being traced
$x$—
$f(x)$—
$f'(x)$—
$f$ is…—
Exercises
I
Find $\dfrac{dy}{dx}$ for $y$ defined implicitly by the equation $4x^5+\tan y=y^2+5x$.
💡 Show solution▶
Step 1 Differentiate both sides: $20x^4+\sec^2y\,\dfrac{dy}{dx}=2y\dfrac{dy}{dx}+5$.
5 Let $u=xy$, $u^\prime=y+xy^\prime$. Then $u^\prime+\sin(xy)\,u^\prime=0$, i.e. $(1+\sin xy)(y+xy^\prime)=0$. Since $1+\sin(xy)\neq0$ generally, $y+xy^\prime=0$ and $\dfrac{dy}{dx}=-\dfrac{y}{x}$.
5 $\ln y=4x\ln(\sin2x)\Rightarrow\dfrac{y^\prime}{y}=4\ln(\sin2x)+4x\cdot\dfrac{2\cos2x}{\sin2x}$. So $\dfrac{dy}{dx}=(\sin2x)^{4x}\left(4\ln(\sin2x)+8x\cot2x\right)$.
6 $\ln y=\ln x\cdot\ln\left(x^2-1\right)\Rightarrow\dfrac{y^\prime}{y}=\dfrac{\ln\left(x^2-1\right)}{x}+\dfrac{2x\ln x}{x^2-1}$. So $\dfrac{dy}{dx}=\left(x^2-1\right)^{\ln x}\left(\dfrac{\ln\left(x^2-1\right)}{x}+\dfrac{2x\ln x}{x^2-1}\right)$.
8 $\ln y=\ln(x+1)-\tfrac13\ln\left(x^2-4\right)\Rightarrow\dfrac{y^\prime}{y}=\dfrac{1}{x+1}-\dfrac{2x}{3\left(x^2-4\right)}$. So $\dfrac{dy}{dx}=\dfrac{x+1}{\sqrt[3]{x^2-4}}\left(\dfrac{1}{x+1}-\dfrac{2x}{3\left(x^2-4\right)}\right)$.
IV
Find $\dfrac{dy}{dx}$ by implicit differentiation, then evaluate it at the given point (check first that the point lies on the curve).
6Production. A factory's output is held fixed along the curve $L^{1/3}K^{2/3}=8$, where $L$ is labour and $K$ is capital (both in suitable units). Find $\dfrac{dK}{dL}$ at $L=8$ and interpret the result.
Watch the slope along each curve
$x$—
$y$—
$dy/dx$—
💡 Show solutions▶
1 Product rule on both terms: $2xy+x^2y^\prime+y^2+2xyy^\prime=0\ \Rightarrow\ y^\prime\left(x^2+2xy\right)=-\left(2xy+y^2\right)\ \Rightarrow\ \dfrac{dy}{dx}=-\dfrac{2xy+y^2}{x^2+2xy}$. The point is on the curve ($2+4=6$), and there $\dfrac{dy}{dx}=-\dfrac{4+4}{1+4}=-\dfrac85$.
2 $y^\prime\cos x-y\sin x=2x+2yy^\prime\ \Rightarrow\ y^\prime\left(\cos x-2y\right)=2x+y\sin x\ \Rightarrow\ \dfrac{dy}{dx}=\dfrac{2x+y\sin x}{\cos x-2y}$. Check: $1\cdot\cos0=0+1$. At $(0,1)$: $\dfrac{dy}{dx}=\dfrac{0+0}{1-2}=0$ — the curve is momentarily level there (the top of its loop).
3 Chain rule, then product rule on $xy$: $e^{xy}\left(y+xy^\prime\right)+y^\prime=0\ \Rightarrow\ y^\prime\left(xe^{xy}+1\right)=-ye^{xy}\ \Rightarrow\ \dfrac{dy}{dx}=-\dfrac{ye^{xy}}{xe^{xy}+1}$. Check: $e^0+1=2$. At $(0,1)$: $\dfrac{dy}{dx}=-\dfrac{1\cdot1}{0+1}=-1$.
6 At $L=8$: $2K^{2/3}=8\Rightarrow K^{2/3}=4\Rightarrow K=8$. Differentiate with respect to $L$: $\tfrac13L^{-2/3}K^{2/3}+\tfrac23L^{1/3}K^{-1/3}\dfrac{dK}{dL}=0\ \Rightarrow\ \dfrac{dK}{dL}=-\dfrac{\tfrac13L^{-2/3}K^{2/3}}{\tfrac23L^{1/3}K^{-1/3}}=-\dfrac{K}{2L}$. At $(8,8)$: $\dfrac{dK}{dL}=-\dfrac12$. Meaning: near this point, one extra unit of labour replaces about half a unit of capital while output stays at the same level.
V
Second derivatives by implicit differentiation. Express $\dfrac{d^2y}{dx^2}$ in terms of $x$ and $y$, simplifying with the original equation where possible.
1 $x^2-y^2=9$
2 $x^3+y^3=1$
3 $\sqrt{x}+\sqrt{y}=1$
4 $y+\sin y=x$
5 For $x^2+xy+y^2=3$, find $\dfrac{dy}{dx}$ and $\dfrac{d^2y}{dx^2}$ at $(1,1)$. Is the curve bending up or down there?
💡 Show solutions▶
1 $2x-2yy^\prime=0\Rightarrow y^\prime=\dfrac{x}{y}$. Quotient rule: $y^{\prime\prime}=\dfrac{y-xy^\prime}{y^2}=\dfrac{y-\dfrac{x^2}{y}}{y^2}=\dfrac{y^2-x^2}{y^3}$. Since $x^2-y^2=9$, $$\frac{d^2y}{dx^2}=-\frac{9}{y^3}.$$
2 $3x^2+3y^2y^\prime=0\Rightarrow y^\prime=-\dfrac{x^2}{y^2}$. Then $y^{\prime\prime}=-\dfrac{2xy^2-x^2\cdot2yy^\prime}{y^4}=-\dfrac{2xy^2+\dfrac{2x^4}{y}}{y^4}=-\dfrac{2x\left(y^3+x^3\right)}{y^5}$. Since $x^3+y^3=1$, $$\frac{d^2y}{dx^2}=-\frac{2x}{y^5}.$$
5 $2x+y+xy^\prime+2yy^\prime=0\Rightarrow y^\prime=-\dfrac{2x+y}{x+2y}$; at $(1,1)$ (on the curve: $1+1+1=3$), $y^\prime=-1$. Differentiate $2x+y+xy^\prime+2yy^\prime=0$ once more: $2+y^\prime+y^\prime+xy^{\prime\prime}+2\left(y^\prime\right)^2+2yy^{\prime\prime}=0$. At $(1,1)$ with $y^\prime=-1$: $2-2+y^{\prime\prime}+2+2y^{\prime\prime}=0\Rightarrow y^{\prime\prime}=-\dfrac23$. Negative, so the curve bends down (is concave down) at $(1,1)$.
2 $\ln y=\dfrac{\ln(1+x)}{x}\Rightarrow\dfrac{y^\prime}{y}=\dfrac{\dfrac{x}{1+x}-\ln(1+x)}{x^2}$. So $\dfrac{dy}{dx}=(1+x)^{1/x}\,\dfrac{x-(1+x)\ln(1+x)}{x^2(1+x)}$.
3 $\ln y=e^x\ln x\Rightarrow\dfrac{y^\prime}{y}=e^x\ln x+\dfrac{e^x}{x}$. So $\dfrac{dy}{dx}=x^{e^x}e^x\left(\ln x+\dfrac1x\right)$.
4 $\ln y=3\ln\left(x^2+1\right)+\tfrac12\ln(x-1)-4\ln(2x+3)\Rightarrow\dfrac{y^\prime}{y}=\dfrac{6x}{x^2+1}+\dfrac{1}{2(x-1)}-\dfrac{8}{2x+3}$. So $\dfrac{dy}{dx}=\dfrac{\left(x^2+1\right)^3\sqrt{x-1}}{(2x+3)^4}\left(\dfrac{6x}{x^2+1}+\dfrac{1}{2(x-1)}-\dfrac{8}{2x+3}\right)$.
5 $\ln y=3\ln x+2x-2\ln(x+1)-\tfrac12\ln(x+3)\Rightarrow\dfrac{y^\prime}{y}=\dfrac3x+2-\dfrac{2}{x+1}-\dfrac{1}{2(x+3)}$. So $\dfrac{dy}{dx}=\dfrac{x^3e^{2x}}{(x+1)^2\sqrt{x+3}}\left(\dfrac3x+2-\dfrac{2}{x+1}-\dfrac{1}{2(x+3)}\right)$.
6 $\ln V=\dfrac{\ln t}{t}\Rightarrow\dfrac{V^\prime}{V}=\dfrac{\tfrac1t\cdot t-\ln t}{t^2}=\dfrac{1-\ln t}{t^2}$, so $V^\prime(t)=t^{1/t}\,\dfrac{1-\ln t}{t^2}$. Since $t^{1/t}>0$ and $t^2>0$, the sign of $V^\prime$ is the sign of $1-\ln t$: positive for $t<e$, zero at $t=e$, negative after. $V$ stops increasing at $t=e\approx2.718$, where it reaches its largest value $e^{1/e}\approx1.445$.
7 $\ln y=n\ln x\Rightarrow\dfrac{y^\prime}{y}=\dfrac nx\Rightarrow y^\prime=x^n\cdot\dfrac nx=nx^{n-1}$. Nothing here needed $n$ to be an integer or rational, so $\dfrac{d}{dx}x^n=nx^{n-1}$ for every real $n$ (e.g. $\dfrac{d}{dx}x^{\pi}=\pi x^{\pi-1}$).
🔬 Research–Teaching NexusResearch-based · optional, about 30 minutes
Research question. Does the implicit derivative of an ellipse match the slope you can measure on a photo?
Why it matters. Computer vision systems fit ellipses to photos to find circles seen at an angle, for example in car cameras, satellite images and medical scans.
What to do.
Photograph a round plate from an angle, or the curved outline of an arch or dome (e.g. at Nizwa Fort).
Load the photo into GeoGebra and mark 5 points on the curve; fit an ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ (Conic Through 5 Points).
Differentiate implicitly: $\frac{dy}{dx}=-\frac{b^2x}{a^2y}$. Compute the slope at one point.
Draw a tangent line by eye at the same point and measure its slope. Compare.
Tools: Phone camera, GeoGebra
Hand in: A half-page note: the photo with fitted curve, the two slopes, and one limitation.
Going further. Anywhere: use any round object such as a clock or a wheel photographed at an angle.
Instructor note: Students should notice the ellipse must be centred at the origin for this formula; if not, shift coordinates first.
🧪 Self-check quiz
0/5 correct
Q1. If $x^2+y^2=25$, then $\dfrac{dy}{dx}$ equals:
Q2. $\dfrac{d}{dx}\left(y^3\right)$, where $y$ is a function of $x$, is:
Q3. If $x^2+y^2=25$, then $\dfrac{d^2y}{dx^2}$ equals:
Q4. Which function needs logarithmic differentiation?