Derivative rules
Why this matters
Lesson 72 found slopes by shrinking secants, one point at a time. That works, but it's slow, and it only gives numbers, never a formula. A handful of rules give the derivative of most everyday functions as a formula, in one line: the derivative of x³ is 3x², of 5 is 0, of eˣ is eˣ. With them you can write down the slope of a loss as an expression and see what drives it. For the squared error of a one-weight model, that slope turns out to contain the error itself, which is why big mistakes push the weights hard and small ones barely move them. This lesson learns the rules, checks each one against a numerical slope, and applies them to that loss.
- Differentiate constants, powers, constant multiples and sums with four short rules
- Use the two special derivatives: eˣ is its own derivative, and ln x gives 1/x
- Check every rule against a numerical slope, and write d_poly for any polynomial
- Find the slope of a squared-error loss, 2x(wx − y), and see the error inside it
The math: four rules and two special cases
Purpose. Slopes without the limit every time.
- Constant: the derivative of a number is 0.
- Power rule: bring the power down, then lower it by one.
- Constant multiple: a number in front stays in front: (5x³)′ = 5 × 3x² = 15x².
- Sum: differentiate each term and add: (x² + x)′ = 2x + 1.
In plain words: x⁴ becomes 4x³, x² becomes 2x, and x becomes 1 (since x⁰ = 1).
Lesson 72 found the slope of x² to be 2x by estimating; the power rule gives it at once.