(hl_only) This lesson covers HL-only calculus techniques.
The chain rule differentiates a composite function — a function inside another. If $y = f(g(x))$, then $$\frac{dy}{dx} = f'(g(x)) \cdot g'(x).$$ A practical version: differentiate the outer function (leaving the inside alone), then multiply by the derivative of the inside.
Worked example. For $y = (3x^2 + 1)^5$, the outer power gives $5(3x^2+1)^4$ and the inside derivative is $6x$, so $\frac{dy}{dx} = 30x(3x^2+1)^4$. The chain rule also lets you differentiate HL standard functions such as $e^{f(x)}$, $\ln(f(x))$, and $\sin(f(x))$ by the same "outer times inner" pattern.
To differentiate a product of two functions $y = u(x)\,v(x)$: $$\frac{dy}{dx} = u'v + uv'.$$ Worked example. For $y = x^2 e^x$, take