Feynman’s Differentiation Trick

Feynman’s Tips on Physics describes the following trick to take derivatives quickly.

Suppose

f = u^av^bw^c

is a function mapping reals to reals.

Then

\frac{df}{dx} = a\frac{du}{dx}u^{a-1}v^bw^c + u^ab\frac{dv}{dx}v^{b-1}w^c + u^av^bc\frac{dw}{dx}w^{c-1}

Next notice that each of these terms almost has f itself in it, so we factor f out.

\frac{df}{dx} = f\left(a\frac{du/dx}{u} + b\frac{dv/dx}{v} + c\frac{dw/dx}{w}\right) .

That’s the trick. It’s not incredibly powerful, but here’s how it works on an example:

f=\frac{\sin^3(x)\sqrt{e^{x+x^2}}}{\left(x^2+1\right)^{1/3}} .

We’ll let

u = \sin(x), a=3
v = e^{x+x^2}, b=1/2
w = x^2 + 1, c=-1/3

Next we write f over again.

\frac{df}{dx} = \frac{\sin^3(x)\sqrt{e^{x+x^2}}}{\left(x^2+1\right)^{1/3}}*[\ldots].

Then insert a\frac{du/dx}{u}.

\frac{df}{dx} = \frac{\sin^3(x)\sqrt{e^{x+x^2}}}{\left(x^2+1\right)^{1/3}}*\left[3\frac{\cos(x)}{\sin(x)}+\ldots\right]

And then add b\frac{dv/dx}{v} .

\frac{df}{dx} = \frac{\sin^3(x)\sqrt{e^{x+x^2}}}{\left(x^2+1\right)^{1/3}}*\left[3\frac{\cos(x)}{\sin(x)}+\frac{1}{2}\frac{e^{x+x^2}(1+2x)}{e^{x+x^2}}+\ldots\right] .

Finish it up with c\frac{dw/dx}{w}.

\frac{df}{dx} = \frac{\sin^3(x)\sqrt{e^{x+x^2}}}{\left(x^2+1\right)^{1/3}}*\left[3\frac{\cos(x)}{\sin(x)}+\frac{1}{2}\frac{e^{x+x^2}(1+2x)}{e^{x+x^2}}+\frac{-1}{3}\frac{2x}{x^2+1} \right] .

Advertisements

Tags:

2 Responses to “Feynman’s Differentiation Trick”

  1. Michael A. Gottlieb Says:

    Nice Tip. Thanks!

  2. Marcus Campbell Says:

    This is a fun one. You can also derive the general formula using logarithmic differentiation, which is a little faster.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: