Calculus I
A Toolkit for Slopes
Or: how to differentiate almost anything without ever touching a difference quotient again
Companion notebook. Play with this chapter’s ideas — sliders, animations, and drills — in
notebooks/ch4_rules.ipynb.
In Chapter 3 you computed derivatives the hard way — every one from the definition, expanding and rationalizing roots until the canceled. That was the right way to learn what a derivative is. It is a terrible way to use them. This chapter fixes that, permanently.
By the end you will own a handful of rules — power, sum, product, quotient, chain — that let you differentiate polynomials, roots, fractions, compositions, trigonometric functions, and exponentials in seconds, never again returning to a limit. But here is the rule of this book: you will not be handed these rules to memorize. Every one of them is derived from the definition you learned last chapter. You’ll see exactly why each is true, which is the only way to know when you’re using it correctly.
One of them — the chain rule — stands above the rest. It is the rule for differentiating a function inside a function, and it is the single most important computation in modern machine learning: training a neural network is the chain rule applied, backward, across millions of nested functions. We’ll get there. First, the easy wins.
The power rule
In Chapter 3 you computed, by hand, that , , — and in the Diamond problems you proved the pattern for every positive whole number using the binomial theorem:
The Power Rule.
What’s remarkable is that this one formula also absorbs the other derivatives you computed from scratch. Recall and . Plug those exponents into the power rule:
Both match exactly what you ground out by hand in Chapter 3 — the reciprocal and the square root were special cases of the power rule all along. In fact the rule holds for every real exponent — negative, fractional, even irrational. (The whole-number case you’ve proven; the negative case follows from the quotient rule below; the general case needs and waits for Chapter 5. We’ll use the full rule now and settle the last piece there — an honest loan.) From now on, no more expanding . Just bring the exponent down and subtract one.