1.2.3 · D3Calculus & Optimization Basics

Worked examples — Partial derivatives

2,578 words12 min readBack to topic

Parent: Partial derivatives. Here we don't teach a new idea — we drill the one rule (Freeze Others, Differentiate) against every kind of input it can meet, so no surprise catches you later.

Before we start, one promise: every symbol you see was already earned in the parent note. = "nudge only , freeze the rest, measure the output's slope". = the list of all such slopes. If any line feels unfamiliar, re-read the parent — we build strictly on top of it.


The scenario matrix

Think of every partial-derivative problem as landing in one of these cells. If we work one clean example per cell, you have seen the whole map.

# Case class What makes it tricky Covered by
A Pure polynomial, both partials terms with no moving variable must vanish Ex 1
B Product of two variables (needs product/constant-multiple care) is it product rule or constant multiple? Ex 2
C Composition — chain rule inside must multiply by inner slope Ex 3
D Quotient / negative powers — sign of the slope flips by region denominator can make slope positive or negative Ex 4
E Degenerate / zero input — evaluate at a point, incl. does a "vanishing" term really vanish numerically? Ex 5
F Symmetry & mixed second partials order of differentiation, does it matter? Ex 6
G Real-world word problem (heat / area) with units keep track of what each slope means physically Ex 7
H ML payoff — a full gradient of a loss, both signs of residual which way does each weight get pushed? Ex 8
I Exam twist — variable appears in the exponent AND base you cannot treat it as a simple power Ex 9

We now hit every cell.








Figure — Partial derivatives

Geometric read of Ex 7: the rectangle's area . The blue arrow shows growth when you push the width ; the orange arrow shows growth when you push the height . The slope in each direction is literally the length of the other side.




Recall Which rule for which mover? (the whole matrix in one card)

Constant exponent, moving base ::: power rule, Constant base, moving exponent ::: exponential rule, Term with no copy of the moving variable ::: slope is , it vanishes Division , take ::: rewrite as , get Composite ::: chain rule, multiply by inner's partial Order of mixed partials vs ::: equal for smooth functions (Clairaut)


Connections

Case Map

Any partial problem

What moves?

Polynomial term - power rule

Composite - chain rule

Quotient - negative power

Mover in exponent - use e to the power

No mover inside gives zero

Multiply by inner slope

Sign flips by region

Log factor appears

ML loss gradient

Gradient descent update