Source: cirosantilli/chain-rule

= Chain rule
{wiki}

Here's an example of the chain rule. Suppose we want to calculate:
$$
\dv{}{x} e^{2x}
$$
So we have:
$$
f(x) = e^x \\
g(x) = 2x
$$
and so:
$$
f'(x) = e^x \\
g'(x) = 2
$$
Therefore the final result is:
$$
f'(g(x))g'(x) = e^{2x} 2 = 2 e ^{2x}
$$