Maths WorkshopMaths problems with full solutions
Exercise 771Calculus › Multivariable calculus › Partial derivativesL2Added 2 Nov 2026

The chain rule for a composition

#chain rule#composition#directional derivative

Statement

Let f(x,y)=x2yf(x,y) = x^2 y and γ(t)=(cos⁡t,sin⁡t)\gamma(t) = (\cos t, \sin t). Compute ddtf(γ(t))\frac{d}{dt} f(\gamma(t)) in two ways: by direct composition, then by the chain rule.

Hint

The chain rule gives ddtf(γ(t))=∇f(γ(t))⋅γ′(t)\frac{d}{dt}f(\gamma(t)) = \nabla f(\gamma(t)) \cdot \gamma'(t).

Show solutionHide solution

Solution

Method 1: direct composition.
f(γ(t))=cos⁡2t⋅sin⁡t.f(\gamma(t)) = \cos^2 t \cdot \sin t.
Differentiating:
ddt(cos⁡2tsin⁡t)=2cos⁡t(−sin⁡t)sin⁡t+cos⁡2tcos⁡t=−2cos⁡tsin⁡2t+cos⁡3t.\frac{d}{dt}(\cos^2 t \sin t) = 2\cos t (-\sin t)\sin t + \cos^2 t \cos t = -2\cos t \sin^2 t + \cos^3 t.

Method 2: chain rule.
∇f(x,y)=(2xy,x2),γ′(t)=(−sin⁡t,cos⁡t).\nabla f(x,y) = (2xy, x^2), \qquad \gamma'(t) = (-\sin t, \cos t).
Hence
ddtf(γ(t))=2cos⁡tsin⁡t⋅(−sin⁡t)+cos⁡2t⋅cos⁡t=−2cos⁡tsin⁡2t+cos⁡3t.\frac{d}{dt}f(\gamma(t)) = 2\cos t \sin t \cdot (-\sin t) + \cos^2 t \cdot \cos t = -2\cos t \sin^2 t + \cos^3 t.

Conclusion. Both methods give the same result, illustrating the chain rule.