Rearranging in calculus: slopes, steps and constants
Why this matters
Calculus questions often come backward. You know the slope you want and need the x. You know one point on a curve and need its constant. You know the step a training run took and need its learning rate. Once the calculus is done, each one is an ordinary rearrangement, with two conditions to watch: a slope you divide by can't be 0, and a square gives a ± to choose from.
- Find where a slope is 0 by setting f′(x) = 0 and making x the subject, keeping both roots when a square appears
- Rearrange the tangent line for the step to a target, and use it as Newton's method for roots and square roots
- Turn the chain rule around for an inner slope, and fix an integral's constant or upper limit from a known value
- Solve a gradient step for its learning rate, and find the rate that reaches a bowl's bottom in one step
- Find a model's best weight in closed form, and see Newton's method behind second-order optimizers
The math: solve the calculus for the letter you need
Purpose. Transposing in calculus: turn each formula of the module around for the letter a question asks about.
A quick recap: f′(x) is the slope of f at x (lesson 73), and f″(x) is how fast that slope changes, the curvature (lesson 75). Once the slope is worked out, the usual moves finish the job.
| You know | You want | Rearranged |
|---|---|---|
| the slope is 0 | x | solve f′(x) = 0 for x |
| the tangent line | the step h | h = (target − f(x))/f′(x) |
| dy/dx and dy/du | du/dx | du/dx = (dy/dx)/(dy/du) |
| one point on F | the constant C | C = F(x₀) − the rest of F at x₀ |
| a gradient step | the learning rate | η = (w − w_new)/g |
A lowest point. A curve f(x) = ax² − bx + c has slope f′(x) = 2ax − b. At the bottom the slope is 0, so 2ax − b = 0. Add b to both sides: 2ax = b. Divide by 2a: x = b/(2a). The conditions: a can't be 0, and a must be above 0 for a bowl with a lowest point.