Composite and implicit functions

Some quantities are not handed to you as a single explicit formula but are built by composing functions — a temperature z=f(x,y)z=f(x,y) where the position (x,y)(x,y) itself moves along a path (x(t),y(t))(x(t),y(t)) — or are tangled up in an equation like F(x,y)=0F(x,y)=0 that never gets solved for yy at all. The multivariable chain rule tells you how zz changes as tt changes without ever writing zz as an explicit function of tt, and the implicit-function rule tells you the slope dy/dxdy/dx of a curve F(x,y)=0F(x,y)=0 without ever solving for yy. Both tools sit right after the total differential in MA10001's Differential Calculus of Several Variables unit, and both are really the same idea in two disguises: differentiate the total differential and divide.

The core insight

Differentiating the total differential df=fx dx+fy dydf=f_x\,dx+f_y\,dy along a path, or along the implicit constraint F(x,y)=0F(x,y)=0, converts a several-variable derivative problem into one algebraic equation you solve for the rate you want.

The core idea

One parameter, one path. If z=f(x,y)z=f(x,y) is differentiable and both x=x(t)x=x(t), y=y(t)y=y(t) trace out a path as tt varies, then zz becomes, indirectly, a function of tt alone, and its rate of change is a weighted sum of the two partial rates of ff, weighted by how fast xx and yy themselves move:

dzdt=∂f∂xdxdt+∂f∂ydydt.\frac{dz}{dt} = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt}.

where: fx=∂f/∂xf_x=\partial f/\partial x and fy=∂f/∂yf_y=\partial f/\partial y are the partial derivatives of ff held at the current point, and x˙=dx/dt\dot x=dx/dt, y˙=dy/dt\dot y=dy/dt are the ordinary derivatives of the path coordinates. This is nothing but the total differential df=fx dx+fy dydf=f_x\,dx+f_y\,dy divided through by dtdt.

Several parameters, a dependency tree. If z=f(x1,…,xn)z=f(x_1,\dots,x_n) and every xix_i is itself a function of variables u1,…,umu_1,\dots,u_m, the same idea sums over every route from zz down to a given uju_j:

∂z∂uj=∑i=1n∂f∂xi∂xi∂uj.\frac{\partial z}{\partial u_j} = \sum_{i=1}^{n} \frac{\partial f}{\partial x_i}\frac{\partial x_i}{\partial u_j}.

where: the sum runs over every intermediate variable xix_i that both depends on uju_j and feeds into zz; skipping a branch of the tree is the most common way to lose a term. The picture below shows why: zz sits at the top, each xix_i is a middle node, each uju_j a bottom node, and ∂z/∂uj\partial z/\partial u_j adds up one product per path connecting top to bottom.

Figure
A dependency tree with z at the top branching to x and y, each of which branches down to t, showing every path from z to t contributing one product term to dz by dt
Chain rule as a sum over paths z x y t f_x f_y dx/dt dy/dt dz/dt = f_x (dx/dt) + f_y (dy/dt) — one term per path

Implicit differentiation. Suppose yy is defined only implicitly by F(x,y)=0F(x,y)=0 — say x2+y2−4=0x^2+y^2-4=0, which never mentions yy alone. Near any point where Fy≠0F_y\neq0 this equation still pins down yy as some function y(x)y(x), even without an explicit formula, and the chain rule above (applied to F(x,y(x))F(x,y(x)), a composite of xx with itself and with y(x)y(x)) gives a shortcut for dy/dxdy/dx directly from the partial derivatives of FF — worked out fully in the derivation below.

Derivation AThe implicit-differentiation formula dy by dx equals minus Fx over Fy

The goal is to find dy/dxdy/dx for a curve F(x,y)=0F(x,y)=0 whenever an explicit formula for yy in terms of xx is inconvenient, impossible to write in closed form, or simply not worth the algebra — by treating F(x,y(x))=0F(x,y(x))=0 as a composite function of the single variable xx and applying the one-parameter chain rule from above to differentiate straight through it, rather than solving for yy first.

Step 1. Treat yy as an unknown function of xx, so F(x,y(x))F(x,y(x)) is, along the curve, a composite of xx with xx itself and with y(x)y(x) — exactly the one-parameter chain-rule setup with the roles z→Fz\to F, and "tt" →x\to x, where the first branch x=xx=x trivially has dx/dx=1dx/dx=1 and the second branch is y=y(x)y=y(x).

Step 2. Because F(x,y(x))≡0F(x,y(x))\equiv 0 identically along the curve, its derivative with respect to xx must also be zero. Apply the chain rule from the core idea, term by term:

ddxF(x,y(x))=Fx⋅dxdx+Fy⋅dydx=Fx+Fydydx=0.\frac{d}{dx}F(x,y(x)) = F_x\cdot\frac{dx}{dx} + F_y\cdot\frac{dy}{dx} = F_x + F_y\frac{dy}{dx} = 0.

Step 3. Solve this single algebraic equation for the one unknown rate, dy/dxdy/dx, by isolating it on one side:

Fx+Fydydx=0  ⟹  Fydydx=−Fx  ⟹  dydx=−FxFy,Fy≠0.F_x + F_y\frac{dy}{dx}=0 \;\Longrightarrow\; F_y\frac{dy}{dx} = -F_x \;\Longrightarrow\; \frac{dy}{dx} = -\frac{F_x}{F_y}, \qquad F_y\neq 0.

Step 4. Note the one restriction that survives: the division requires Fy≠0F_y\neq0. Geometrically, wherever Fy=0F_y=0 (with Fx≠0F_x\neq0) the level curve F(x,y)=0F(x,y)=0 has a vertical tangent, so no finite slope dy/dxdy/dx can exist there — the formula's blow-up is a genuine feature of the curve, not a defect of the method.

Worked example

Find the slope dy/dxdy/dx at the point (1,2)(1,2) on the curve defined implicitly by F(x,y)=x3+y3−3xy−3=0F(x,y)=x^3+y^3-3xy-3=0, then use that slope to write the tangent line at (1,2)(1,2).

Step 1 — verify the point lies on the curve. F(1,2)=13+23−3(1)(2)−3=1+8−6−3=0F(1,2)=1^3+2^3-3(1)(2)-3=1+8-6-3=0. Confirmed, so (1,2)(1,2) is a genuine point of the curve and the implicit-differentiation formula applies there.

Step 2 — compute the partial derivatives Fx,FyF_x,F_y.

Fx=3x2−3y,Fy=3y2−3x.F_x = 3x^2-3y, \qquad F_y = 3y^2-3x.

Step 3 — evaluate at (1,2)(1,2).

Fx(1,2)=3(1)−3(2)=3−6=−3,Fy(1,2)=3(4)−3(1)=12−3=9.F_x(1,2)=3(1)-3(2)=3-6=-3, \qquad F_y(1,2)=3(4)-3(1)=12-3=9.

Step 4 — apply the formula from the derivation.

dydx∣(1,2)=−FxFy=−−39=13.\frac{dy}{dx}\bigg|_{(1,2)} = -\frac{F_x}{F_y} = -\frac{-3}{9} = \frac{1}{3}.

So the curve has slope 13\dfrac{1}{3} at (1,2)(1,2), found without ever solving the cubic relation x3+y3−3xy−3=0x^3+y^3-3xy-3=0 explicitly for yy. The slope at (1,2)(1,2) is 1/3\mathbf{1/3}.

Competitive stretch

With the slope in hand, the tangent line at (1,2)(1,2) is y−2=13(x−1)y-2=\tfrac13(x-1), i.e. 3y−6=x−13y-6=x-1, i.e. x−3y+5=0x-3y+5=0. As a quick cross-check, compare with the single-parameter chain rule from the core idea: for z=x2+3xyz=x^2+3xy with x=cos⁡t, y=sin⁡tx=\cos t,\ y=\sin t, the same machinery gave dz/dt∣t=π/2=(2x+3y)(−sin⁡t)+(3x)(cos⁡t)=−3dz/dt|_{t=\pi/2}=(2x+3y)(-\sin t)+(3x)(\cos t)=-3 at t=π/2t=\pi/2 — a reminder that both the ordinary chain rule and implicit differentiation reduce to the same algebraic step of substituting partial derivatives into a linear combination. This pattern — differentiate an identity, then solve one algebraic equation for the rate you actually want — is the single most reusable trick in this part of the syllabus: it is exactly how the age-of-a-curve slope above was found, and it generalizes without change to surfaces F(x,y,z)=0F(x,y,z)=0, where the same steps give ∂z/∂x=−Fx/Fz\partial z/\partial x=-F_x/F_z and ∂z/∂y=−Fy/Fz\partial z/\partial y=-F_y/F_z.

Common traps

  • Dropping a branch of the dependency tree. With three or more intermediate variables, every one of them contributes a term fxi⋅∂xi/∂ujf_{x_i}\cdot\partial x_i/\partial u_j; skipping a branch silently throws away part of the answer.
  • Writing ∂z/∂t\partial z/\partial t instead of dz/dtdz/dt. When z=f(x,y)z=f(x,y) with x,yx,y functions of one variable tt, the result is a total (ordinary) derivative, even though the calculation uses the partial derivatives of ff.
  • Forgetting dy/dxdy/dx on yy-terms when differentiating F(x,y)=0F(x,y)=0 directly. Differentiating y3y^3 with respect to xx gives 3y2 dy/dx3y^2\,dy/dx, not 3y23y^2 — every yy-term needs the extra factor because y=y(x)y=y(x).
  • Using dy/dx=−Fx/Fydy/dx=-F_x/F_y without checking Fy≠0F_y\neq0. At points where Fy=0F_y=0, the tangent is vertical and the formula is undefined — not a computational slip but a real geometric feature of the curve.

Ask the tutor: if a multi-step chain-rule computation with several intermediate variables gets tangled, or an implicit-differentiation slope is not simplifying the way you expect, ask the AI tutor to walk through the dependency tree with you step by step.

Why does implicit differentiation work even when I cannot solve F(x,y)=0 for y explicitly?

Because the argument never actually needs an explicit formula for y(x)y(x) — it only assumes such a function exists locally (true whenever Fy≠0F_y\neq0, by the implicit function theorem you take on faith at this stage) and then applies the ordinary chain rule to the identity F(x,y(x))≡0F(x,y(x))\equiv0. Differentiating an identity that is zero everywhere along the curve gives another identity that is zero, and that second identity is exactly the equation Fx+Fy dy/dx=0F_x+F_y\,dy/dx=0 you solve for the slope — no explicit y(x)y(x) ever appears.

How is the multivariable chain rule different from the one I learned in single-variable calculus?

It is the same principle with more bookkeeping. The single-variable chain rule has one path into zz; here z=f(x,y)z=f(x,y) has two (or more) routes in, through xx and through yy, so you add a term for each route. The total differential df=fx dx+fy dydf=f_x\,dx+f_y\,dy makes this transparent: dividing by dtdt turns each differential into a rate, and you simply sum both contributions instead of having only one.

What actually goes wrong at a point where F_y equals zero?

Geometrically the curve's tangent there is vertical, so no ordinary slope dy/dxdy/dx exists — a vertical line has infinite or undefined slope in the usual sense. Algebraically the formula dy/dx=−Fx/Fydy/dx=-F_x/F_y literally divides by zero at that point, which is the algebra correctly flagging the geometric fact. If you also had Fx=0F_x=0 there, the point may instead be a singular point of the curve (a cusp or self-intersection), which needs separate, more careful analysis.

Before this

Where this leads