Skip to main content

Implicit Differentiation and Linearization

Implicit differentiation handles curves described by equations that do not solve neatly for yy as a function of xx. Instead of rewriting the equation first, we differentiate both sides and remember that yy depends on xx. The chain rule then produces factors of dy/dxdy/dx.

The same idea drives related rates and linearization. In related rates, several quantities change with time and are tied together by an equation. In linearization, a differentiable curve is replaced near a point by its tangent line. Both topics ask for careful attention to variables, units, and the moment at which the information is evaluated.

Definitions

An implicit equation has the form

F(x,y)=0F(x,y)=0

instead of y=f(x)y=f(x). If yy is differentiable as a function of xx, then differentiating F(x,y)=0F(x,y)=0 with respect to xx uses the chain rule whenever a term contains yy.

For example,

ddx(y3)=3y2dydx.\frac{d}{dx}(y^3)=3y^2\frac{dy}{dx}.

If FxF_x and FyF_y are partial derivatives and Fy0F_y\ne 0, implicit differentiation gives

dydx=FxFy.\frac{dy}{dx}=-\frac{F_x}{F_y}.

A related rates problem uses time tt as the hidden independent variable. If x=x(t)x=x(t) and y=y(t)y=y(t), then differentiating an equation such as x2+y2=25x^2+y^2=25 gives

2xdxdt+2ydydt=0.2x\frac{dx}{dt}+2y\frac{dy}{dt}=0.

Linearization of ff at aa is the tangent-line approximation

L(x)=f(a)+f(a)(xa).L(x)=f(a)+f'(a)(x-a).

In differential notation,

dy=f(x)dx,dy=f'(x)\,dx,

which estimates the change in yy caused by a small change dxdx.

The symbol dxdx represents a chosen small input change in this setting, while dydy is the corresponding linear estimate for the output change. The actual change is

Δy=f(x+dx)f(x).\Delta y=f(x+dx)-f(x).

Usually dydy and Δy\Delta y are close but not identical. Linearization keeps only the tangent-line behavior and ignores curvature. This is why the approximation is strongest near the base point and weaker farther away.

Implicit equations can describe more than one branch. The circle x2+y2=25x^2+y^2=25 is not globally the graph of one function y=f(x)y=f(x), but near most points it splits into an upper branch and a lower branch. Implicit differentiation finds the slope of whichever local branch passes through the point being studied.

Key results

Implicit differentiation works because ordinary differentiation follows the chain rule. If F(x,y)=0F(x,y)=0 and y=y(x)y=y(x), then the composite function F(x,y(x))F(x,y(x)) is constantly zero. Differentiating gives

Fx(x,y)1+Fy(x,y)dydx=0.F_x(x,y)\cdot 1+F_y(x,y)\frac{dy}{dx}=0.

Solving for dy/dxdy/dx gives

dydx=FxFy,\frac{dy}{dx}=-\frac{F_x}{F_y},

as long as Fy0F_y\ne 0. If Fy=0F_y=0, the curve may have a vertical tangent, fail to define yy locally as a function of xx, or require a separate analysis.

Related rates problems have a consistent structure:

  1. Draw or describe the changing quantities.
  2. Assign variables and units.
  3. Write an equation connecting the variables.
  4. Differentiate with respect to time.
  5. Substitute values for the specific instant after differentiating.
  6. Solve for the requested rate and include units.

The instruction to substitute after differentiating is important. If a quantity such as x=3x=3 only at one instant, replacing xx by 33 before differentiating would incorrectly make dx/dt=0dx/dt=0.

Linearization is justified by differentiability:

f(x)=f(a)+f(a)(xa)+error,f(x)=f(a)+f'(a)(x-a)+\text{error},

where the error is small compared with xa\vert x-a\vert as xax\to a. This makes L(x)L(x) useful for quick approximations and for deriving Newton's method.

For functions with a known second derivative, Taylor's theorem gives a more quantitative picture:

f(x)=f(a)+f(a)(xa)+f(c)2(xa)2f(x)=f(a)+f'(a)(x-a)+\frac{f''(c)}{2}(x-a)^2

for some cc between aa and xx. The last term is the error in the linear approximation. This explains why halving the distance from the base point often makes the linearization error about four times smaller when the second derivative stays bounded.

The formula dydx=Fx/Fy\frac{dy}{dx}=-F_x/F_y also reveals vertical and horizontal tangent candidates. If Fy=0F_y=0 and Fx0F_x\ne 0, then solving for dy/dxdy/dx breaks down and the tangent may be vertical. If Fx=0F_x=0 and Fy0F_y\ne 0, then dy/dx=0dy/dx=0 and the tangent is horizontal. If both partial derivatives vanish, the point may be singular and needs a separate local analysis.

Linearization is also a practical estimation tool. To approximate 4.1\sqrt{4.1}, use f(x)=xf(x)=\sqrt{x} at a=4a=4. Since f(4)=2f(4)=2 and f(x)=1/(2x)f'(x)=1/(2\sqrt{x}), we have f(4)=1/4f'(4)=1/4. Thus

L(4.1)=2+14(0.1)=2.025.L(4.1)=2+\frac14(0.1)=2.025.

The actual value is close because 4.14.1 is near 44. The point is not to replace calculators, but to understand how local slope predicts nearby change and how errors depend on curvature.

In related rates, signs should be assigned from the actual motion, not from a memorized convention. A distance increasing from a wall has positive derivative; a height decreasing has negative derivative. Choosing variables as positive lengths is fine, but the derivatives of those lengths can still be negative.

A final check is reasonableness. If an answer says the top of a ladder is moving upward while the bottom slides away, the sign is probably wrong. If a linear approximation is requested near a=4a=4 but the estimate uses a tangent at a=9a=9, the base point is probably wrong. These checks are quick and often catch errors before algebra is reviewed line by line in homework, labs, or exams.

They also force the final number back into the original situation.

Visual

TechniqueGiven relationshipMain derivative ideaTypical output
Implicit differentiationF(x,y)=0F(x,y)=0Treat yy as y(x)y(x)Slope dy/dxdy/dx
Related ratesEquation among changing variablesDifferentiate with respect to ttA rate such as dx/dtdx/dt
LinearizationExplicit function near aaTangent lineApproximate value
DifferentialsSmall input change dxdxdy=f(x)dxdy=f'(x)dxApproximate change

Worked example 1: tangent slope on an implicit curve

Problem. Find dy/dxdy/dx for

x2+xy+y2=7x^2+xy+y^2=7

and find the tangent line at (1,2)(1,2).

Method.

  1. Differentiate both sides with respect to xx:
ddx(x2)+ddx(xy)+ddx(y2)=ddx(7).\frac{d}{dx}(x^2)+\frac{d}{dx}(xy)+\frac{d}{dx}(y^2)=\frac{d}{dx}(7).
  1. Compute each term. The product rule gives
ddx(xy)=xdydx+y.\frac{d}{dx}(xy)=x\frac{dy}{dx}+y.

Also,

ddx(y2)=2ydydx.\frac{d}{dx}(y^2)=2y\frac{dy}{dx}.
  1. Substitute into the differentiated equation:
2x+xdydx+y+2ydydx=0.2x+x\frac{dy}{dx}+y+2y\frac{dy}{dx}=0.
  1. Group terms containing dy/dxdy/dx:
(x+2y)dydx+2x+y=0.(x+2y)\frac{dy}{dx}+2x+y=0.
  1. Solve:
dydx=2x+yx+2y.\frac{dy}{dx}=-\frac{2x+y}{x+2y}.
  1. Evaluate at (1,2)(1,2):
m=2(1)+21+2(2)=45.m=-\frac{2(1)+2}{1+2(2)}=-\frac45.
  1. Write the tangent line:
y2=45(x1).y-2=-\frac45(x-1).

Checked answer. The slope is 4/5-4/5, and the tangent line is y2=45(x1)y-2=-\frac45(x-1).

Problem. A 1010 ft ladder leans against a wall. The bottom slides away from the wall at 22 ft/s. How fast is the top sliding down when the bottom is 66 ft from the wall?

Method.

  1. Let xx be the bottom's distance from the wall and yy be the top's height. The ladder length is constant:
x2+y2=102.x^2+y^2=10^2.
  1. The given rate is
dxdt=2 ft/s.\frac{dx}{dt}=2\ \text{ft/s}.

We want dy/dtdy/dt when x=6x=6.

  1. Find yy at that instant:
62+y2=100y2=64y=8.6^2+y^2=100 \quad\Rightarrow\quad y^2=64 \quad\Rightarrow\quad y=8.
  1. Differentiate the equation with respect to tt:
2xdxdt+2ydydt=0.2x\frac{dx}{dt}+2y\frac{dy}{dt}=0.
  1. Substitute the instant values:
2(6)(2)+2(8)dydt=0.2(6)(2)+2(8)\frac{dy}{dt}=0.
  1. Solve:
24+16dydt=0dydt=2416=32.24+16\frac{dy}{dt}=0 \quad\Rightarrow\quad \frac{dy}{dt}=-\frac{24}{16}=-\frac32.

Checked answer. The top slides down at 3/23/2 ft/s. The negative sign indicates decreasing height.

A unit check confirms the result. The expression

dydt=xydxdt\frac{dy}{dt}=-\frac{x}{y}\frac{dx}{dt}

has dimension

ftftfts=fts.\frac{\text{ft}}{\text{ft}}\cdot\frac{\text{ft}}{\text{s}} =\frac{\text{ft}}{\text{s}}.

The negative sign also fits the geometry: as the bottom distance xx increases, the top height yy must decrease because the ladder length is fixed.

Code

def tangent_line_implicit(x0, y0):
slope = -(2*x0 + y0) / (x0 + 2*y0)
intercept = y0 - slope * x0
return slope, intercept

def ladder_top_rate(x, dx_dt, length=10):
y = (length**2 - x**2) ** 0.5
dy_dt = -(x * dx_dt) / y
return y, dy_dt

print(tangent_line_implicit(1, 2))
print(ladder_top_rate(6, 2))

Common pitfalls

  • Forgetting to multiply by dy/dxdy/dx when differentiating a term containing yy.
  • Substituting instant values before differentiating in a related rates problem.
  • Losing the sign of a rate. A negative value often has a physical meaning, such as height decreasing.
  • Using the ladder length as a variable even though it is constant in the problem.
  • Treating linearization as exact. It is an approximation that improves near the base point.
  • Forgetting that implicit slopes may fail where the denominator in dy/dxdy/dx is zero.
  • Using dy/dxdy/dx in a related rates problem when the requested rates are with respect to time. Write dx/dtdx/dt, dy/dtdy/dt, or dV/dtdV/dt as appropriate.
  • Not drawing a diagram for geometric problems. The equation often comes directly from a right triangle, circle, cone, or similar figure.
  • Reporting a rate without units or direction. "Down at 3/23/2 ft/s" is clearer than just 3/2-3/2.
  • Applying linearization far from the base point without checking curvature or error.

Connections