Differentiate the outside function, keep the inside unchanged, then multiply by the derivative of the inside.
\[\left(f \circ g\right)' = f'(g)\,g'\]
What it says
When one function is applied to another, the rates of change multiply. If \(y\) changes three times as fast as \(u\), and \(u\) changes twice as fast as \(x\), then \(y\) changes six times as fast as \(x\). In Leibniz notation the statement is almost self-evident: \(\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}\).
The practical procedure is: identify the outer function and the inner one, differentiate the outer while leaving the inner argument exactly as it is, then multiply by the derivative of the inner. The factor \(g'\) is the part most often forgotten.
Chains can nest to any depth. For \(\sin\!\left(\sqrt{x^{2}+1}\right)\) you peel one layer at a time, multiplying a new factor at each step.
When it applies
A function is applied to something more complicated than the bare variable.
Any composite: \(\sin(3x)\), \(e^{x^{2}}\), \(\ln(1 + x^{2})\), \((2x + 1)^{5}\).
Whenever an inner expression would need a rule of its own to differentiate.
Five worked examples
Every line is the step the calculator would show, in the order it applies them. Each graph
is live: hover it to read both curves and see the tangent whose slope is the derivative,
drag to pan, scroll to zoom.
1
Example 1
\[\frac{d}{dx}\left[\sin\left(3 x\right)\right]\]
Outer is \(\sin\), inner is \(u = 3x\). Differentiate the outer, keeping \(3x\) inside.
Three full oscillations of f in the space \(\sin x\) would take for one, and a derivative reaching \(\pm 3\) rather than \(\pm 1\). The two curves stay a quarter of a compressed period apart the whole way along.
Without the factor \(3\) the answer would be wrong by a factor of three — the classic chain-rule slip.
Derivative Calculator would like your consent to use your data
Store and read cookies and similar identifiers on your device
Measure how the site is used, and — only if you allow it — personalise advertising
Learn more
How can I change my choice?
Open Privacy settings at the bottom of any page. Your answer can be changed or withdrawn at any time, and takes effect straight away.
What if I do not consent?
Everything still works. The calculator, the graph and every rule page run entirely in your browser, so refusing costs you nothing but the optional cookies.
Do I have to consent to everything?
No. Manage options lets you allow one category and refuse another, and nothing optional is switched on until you switch it on.
Necessary cookies keep the site working and are always on. Anything else — measurement and advertising — runs only with your permission, and no profile is built about you before you give it. Read the privacy policy
Data preferences
Choose what you allow
Each category is described below. Your choice is stored on this device and applies the moment you save it.
Strictly necessary
Keeps the site working: your light or dark theme, your recent expressions and the record of this consent choice. Nothing here identifies you, and it cannot be switched off.
Preferences
Remembers optional settings across visits, such as your language and the way you like results laid out.
Measurement
Counts visits and which rules people look up, so we know what to improve. Aggregated — never used to build a profile about you.
Advertising
Lets advertising partners use cookies to select and measure ads, including personalised ones. Refuse this and any ads shown stay non-personalised.