Differentiation rules

Level FundamentalDifficulty ★★★★★Concept⌖ Open in the map

What is it?

The derivative is linear, and there are rules for products and quotients. With the chain rule, they let you differentiate any formula mechanically — which is why computers can do it.

Formulas

(af+bg)′=af′+bg′(af + bg)' = af' + bg'
linearity
(fg)′=f′g+fg′(fg)' = f'g + fg'
product rule (Leibniz)
(fg)′=f′g−fg′g2\left(\frac fg\right)' = \frac{f'g - fg'}{g^2}
quotient rule

Where it shows up in computing

  • Symbolic computation (CAS)★★★★★fundamentalScientific computing and algorithms

    Each rule is a rewrite rule on the expression tree; the hard part is simplifying the result.

Where it shows up in AI

  • Automatic differentiation★★★★★fundamentalAI and machine learning

    AD applies exactly these rules, one elementary operation at a time, to numbers instead of formulas.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

Exercises

1Computation

Differentiate f(x)=x2ex1+xf(x) = \frac{x^2 e^x}{1 + x}.

Solution

f′(x)=(2x+x2)ex(1+x)−x2ex(1+x)2=xex(x2+2x+2)(1+x)2f'(x) = \frac{(2x + x^2)e^x(1 + x) - x^2 e^x}{(1+x)^2} = \frac{x e^x (x^2 + 2x + 2)}{(1 + x)^2}.

This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.

↑ ↓ to navigate · ↵ · Esc