NapkinCalc

Calculus 1B — The Derivative

Power, product & quotient rules

continues from lesson 2 — values defined earlier in the course stay live here

ELI5: these are shortcuts so you never have to redo the shrinking-h limit by hand.

  • Power + sum: differentiate each term with n·xⁿ⁻¹.
  • Product: (f·g)′ = f′g + fg′ — each factor takes a turn changing.
  • Quotient: (f/g)′ = (f′g − fg′) / g².
diff(3x45x2+7,x)\mathrm{diff}\left(3 \cdot x^{4} - 5 \cdot x^{2} + 7, x\right) = 12x310x12 \cdot x^{3}-10 \cdot x power + sum: 12x³ − 10x — Steps shows each term
diff(x2sin(x),x)\mathrm{diff}\left(x^{2} \cdot \mathrm{sin}\left(x\right), x\right) = 2sin(x)x+cos(x)x22 \cdot \mathrm{sin}\left(x\right) \cdot x+\mathrm{cos}\left(x\right) \cdot x^{2} product rule — Steps narrates both turns

Real-world hook: revenue = price × quantity, and in a sale both change at once — that's the product rule. Density = mass / volume, and as a balloon heats both shift — that's the quotient rule.

qfn(x)=xx+1q_{fn}\left(x\right) = \frac{x}{x + 1} we differentiate this below

Try it yourself: define dq(x), the derivative of x/(x + 1). (Quotient rule gives 1/(x + 1)².)

dq(x)=1(x+1)2dq\left(x\right) = \frac{1}{\left(x + 1\right)^{2}} ✏️ Your turn: define dq(x) = the derivative of x/(x+1). Green when it matches the true slope at x = 1 and x = 3.
✓ pass abs(dq(1)(qfn(1+1e5)qfn(11e5))/(21e5))<1e2andabs(dq(3)(qfn(3+1e5)qfn(31e5))/(21e5))<1e2abs(dq(1) - (q_{fn}(1 + 1e-5) - q_{fn}(1 - 1e-5)) / (2 * 1e-5)) < 1e-2 and abs(dq(3) - (q_{fn}(3 + 1e-5) - q_{fn}(3 - 1e-5)) / (2 * 1e-5)) < 1e-2 matches the real slope of x/(x+1) at two points