Powerful Trick for Taking Derivatives

Quickly Derive Anything

A remarkably simple and general rule for taking the derivative of a function, no matter how long and complicated, reads

\begin{equation}
\boxed{
\frac{d}{d x } \left[ f(x)^ag(x)^b\ldots \right] = \left( f(x)^ag(x)^b\ldots \right) \times \left( \frac{a}{f(x)}f'(x) + \frac{b}{g(x)}g'(x) + \ldots \right)
}
\end{equation}

In words, simply write down the function you want to derive verbatim,

\begin{equation}
\frac{d}{d x } \left[ x^3\cos(7x^2)e^{2x} \right] = \left( x^3\cos(7x^2)e^{2x} \right) \times (
\end{equation}

and then for each factor, add a term consisting of its exponent divided by the factor, times its derivative. The example has three factor functions, the first, \( x^3 \)

\begin{equation}
\frac{d}{d x } \left[ x^3\cos(7x^2)e^{2x} \right] = \left( x^3\cos(7x^2)e^{2x} \right) \times ( \frac{3}{x} +
\end{equation}

the second, \( \cos(7x^2) \)

\begin{equation}
\frac{d}{d x } \left[ x^3\cos(7x^2)e^{2x} \right] = \left( x^3\cos(7x^2)e^{2x} \right) \times ( \frac{3}{x} - \frac{1}{\cos(7x^2)}14x\sin(7x^2) +
\end{equation}

and the third, \( e^{2x}=(e^x)^2 \),

\begin{equation}
\frac{d}{d x } \left[ x^3\cos(7x^2)e^{2x} \right] = \left( x^3\cos(7x^2)e^{2x} \right) \times \left( \frac{3}{x} - \frac{1}{\cos(7x^2)}14x\sin(7x^2) + \frac{2}{e^x}e^x \right).
\end{equation}

This simplifies to

\begin{align}
\frac{d}{d x } \left[ x^3\cos(7x^2)e^{2x} \right] &= \left( x^3\cos(7x^2)e^{2x} \right) \times \left( \frac{3}{x} - 14x \frac{\sin(7x^2)}{\cos(7x^2)} + 2 \right) \\
&= e^{2x}x^2 \left((2x+3)\cos(7x^2) - 14x^2\sin(7x^2) \right).
\end{align}

You are done! With this you can take the derivative of any function you are likely to encounter in less than a minute. This works nicely for large and complicated functions, unlike the rules taught in middle school. I found this trick in Richard Feynman's lectures, in notes written by Margaret Keck.

Proof

Let \( f, g, \ldots \) be functions of \( x \), and let \( a, b,\ldots \) be constants. Using the properties of the logarithm,

\begin{align}
\frac{d}{d x } \log(f^ag^b\ldots) &= \frac{d}{d x } \left[ a\log(f) + b\log(g) + \ldots \right] \\
&= \frac{a}{f}f' + \frac{b}{g}g' + \ldots
\end{align}

and

\begin{equation}
\frac{d}{d x } \log(f^ag^b\ldots) = \frac{\frac{d}{d x } \left[ f^ag^b\ldots \right]}{f^ag^b\ldots}
\end{equation}

From which it follows that

\begin{equation}
\frac{d}{d x } \left[ f^ag^b\ldots \right] = \left( f^ag^b\ldots \right) \left( \frac{a}{f}f' + \frac{b}{g}g' + \ldots \right) \quad\blacksquare
\end{equation}

Author: Max Marshall

Created: 2024-01-31 Wed 12:01

Validate