Intuition What this page is for
The parent note taught you the three rules. But rules only feel solid once you have seen them survive every kind of input you can be handed: positive and negative points, zero, a product of three things, a fraction whose bottom vanishes, a nesting three layers deep, and a real word problem.
This page is a scenario matrix — a checklist of every trap — followed by fully worked examples, each stamped with the matrix cell it clears.
Prerequisites you should have skimmed: Limits and Continuity (what lim h → 0 means) and Power Rule and Basic Derivatives (so d x d x n = n x n − 1 is already yours).
Every example below is a tick in one of these boxes. Read the table first — it is the map. ("ML" below is short for machine learning — the field these derivatives power.)
#
Cell (the scenario)
Which rule stress-tested
Cleared by
C1
Product, evaluated at a specific point (plug in a number)
Product
Ex 1
C2
Product of THREE factors (rule used twice)
Product ×2
Ex 2
C3
Quotient at a normal point + sign of the slope
Quotient
Ex 3
C4
Quotient where the derivative is ZERO (turning point)
Quotient
Ex 4
C5a
Denominator → 0, removable hole (the 0 0 that cancels)
Quotient limit
Ex 5
C5b
Denominator → 0, genuine blow-up (vertical asymptote, 0 nonzero )
Quotient limit
Ex 5b
C6
Chain, negative-inside & positive-inside (sign of inner)
Chain
Ex 6
C7
Chain nested THREE deep (three gears)
Chain ×2
Ex 7
C8
All three rules in one expression (machine-learning: sigmoid × input)
Product+Quotient+Chain
Ex 8
C9
Real-world word problem with units
Product
Ex 9
C10
Exam twist: implicit differentiation (curve not solved for y )
Chain + algebra
Ex 10
Recall Quick reminders (open if a rule is fuzzy)
Product ::: ( uv ) ′ = u ′ v + u v ′
Quotient ::: ( v u ) ′ = v 2 u ′ v − u v ′
Chain ::: ( f ( g ( x )) ) ′ = f ′ ( g ( x )) ⋅ g ′ ( x )
Let f ( x ) = x 3 cos x . Find f ′ ( x ) , then evaluate f ′ ( 0 ) .
Forecast: guess the sign of f ′ ( 0 ) before reading on. Is the slope at x = 0 positive, negative, or zero?
Step 1 — name the two factors.
u = x 3 , v = cos x .
Why this step? The function is a product of two things I can each differentiate — that is the exact trigger for the product rule.
Step 2 — differentiate each piece.
u ′ = 3 x 2 (power rule), v ′ = − sin x .
Why this step? The product rule needs both derivatives before I can assemble it.
Step 3 — assemble u ′ v + u v ′ .
f ′ ( x ) = 3 x 2 cos x + x 3 ( − sin x ) = 3 x 2 cos x − x 3 sin x
Why this step? Two rectangle strips: one from x 3 growing, one from cos x changing.
Step 4 — plug in x = 0 .
f ′ ( 0 ) = 3 ( 0 ) 2 cos 0 − ( 0 ) 3 sin 0 = 0 − 0 = 0
Why this step? The question asked for the slope at a specific point , so after finding the general f ′ ( x ) I substitute that point in — a general formula is only useful once evaluated.
Verify: Near x = 0 , x 3 is flat and tiny (its slope 3 x 2 is 0 there) and it multiplies a bounded cos , so the whole product barely moves — slope 0 is exactly right. Forecast check: the answer was zero .
Differentiate g ( x ) = x e x sin x .
Forecast: how many terms will the answer have — 2, 3, or 4? Guess before proceeding.
Step 1 — bracket it as (two things) × (one thing).
Set P = x e x (a product) and treat g = P ⋅ sin x .
Why this step? The product rule is built for two factors. So I nest: apply it once for the outer split, then again inside P .
Step 2 — differentiate the inner product P = x e x .
P ′ = ( 1 ) e x + x e x = e x ( 1 + x ) .
Why this step? P itself is a product, so it earns its own product rule.
Step 3 — outer product rule on P ⋅ sin x .
g ′ = P ′ sin x + P ( sin x ) ′ = e x ( 1 + x ) sin x + x e x cos x
Why this step? Now that P ′ is known, g = P ⋅ sin x is just one product of two known pieces, so the standard two-strip product rule finishes it.
Step 4 — tidy.
g ′ ( x ) = e x [ ( 1 + x ) sin x + x cos x ]
Why this step? Factoring the common e x makes the structure visible and easier to check; not required but clean.
Verify: The general pattern for three factors ab c is a ′ b c + a b ′ c + ab c ′ — three terms. Expanding our answer: e x sin x + x e x sin x + x e x cos x — exactly the three terms (a ′ = 1 , b ′ = e x , c ′ = cos x ). Forecast: 3 terms .
h ( x ) = x − 3 2 x + 1 . Find h ′ ( x ) and its value at x = 1 .
Forecast: at x = 1 the denominator is 1 − 3 = − 2 . Will the slope be positive or negative?
Step 1 — label top and bottom.
u = 2 x + 1 , u ′ = 2 ; v = x − 3 , v ′ = 1 .
Why this step? "Lo D-Hi minus Hi D-Lo" needs each part named.
Step 2 — apply the quotient rule.
h ′ ( x ) = v 2 u ′ v − u v ′ = ( x − 3 ) 2 2 ( x − 3 ) − ( 2 x + 1 ) ( 1 )
Why this step? The minus sign encodes that a growing denominator shrinks the fraction.
Step 3 — simplify the numerator.
2 x − 6 − 2 x − 1 = − 7 ⇒ h ′ ( x ) = ( x − 3 ) 2 − 7
Why this step? The x terms cancel — a hint the numerator is constant.
Step 4 — evaluate at x = 1 .
h ′ ( 1 ) = ( 1 − 3 ) 2 − 7 = 4 − 7 = − 1.75
Why this step? We were asked for the slope at x = 1 , so the general derivative must be evaluated at that point to produce the single number the question wants.
Verify: The denominator ( x − 3 ) 2 is always positive, and the numerator is the negative constant − 7 , so this function is decreasing everywhere it is defined. Forecast: negative , confirmed at − 1.75 .
f ( x ) = x 2 + 1 x (the sigmoid-ish bump from the parent note). Find where f ′ ( x ) = 0 and classify those points.
Forecast: look at the figure — two special x -values where the tangent goes flat. Guess them.
Step 1 — quotient rule.
u = x , u ′ = 1 ; v = x 2 + 1 , v ′ = 2 x .
f ′ ( x ) = ( x 2 + 1 ) 2 ( 1 ) ( x 2 + 1 ) − ( x ) ( 2 x ) = ( x 2 + 1 ) 2 1 − x 2
Why this step? This matches the parent's example; here we go further and use it.
Step 2 — set the derivative to zero.
A fraction is zero only when its numerator is zero (and denominator isn't):
1 − x 2 = 0 ⇒ x = ± 1
Why this step? The flat tangent (amber dashes in the figure) is where slope = 0 ; solving the numerator finds exactly those x -values.
Step 3 — classify each.
At x = − 1 : just left, 1 − x 2 < 0 (slope − ); just right, 1 − x 2 > 0 (slope + ) → valley (min) .
At x = + 1 : slope goes + → − → peak (max) .
Why this step? The sign of f ′ on each side tells you whether the curve turns up or down there.
Verify: f ( 1 ) = 2 1 , f ( − 1 ) = − 2 1 — the amber dots in the figure sit at those heights. Forecast: turning points at x = ± 1 .
q ( x ) = x − 2 x 2 − 4 . Naïvely the quotient rule applies — but something special happens at x = 2 . Investigate.
Forecast: is x = 2 a genuine "blow-up to infinity", or a removable hole ?
Step 1 — check the point directly.
At x = 2 the bottom is 0 and the top is 2 2 − 4 = 0 . So it is 0 0 — indeterminate , not automatically infinite.
Why this step? The quotient rule assumes v = 0 . When v = 0 we must first ask what kind of zero this is (see Limits and Continuity ).
Step 2 — factor and cancel.
q ( x ) = x − 2 ( x − 2 ) ( x + 2 ) = x + 2 ( x = 2 )
Why this step? The top shares the factor ( x − 2 ) , so the singularity cancels — it is a removable hole, not a pole.
Step 3 — differentiate the simplified form.
For x = 2 , q ( x ) = x + 2 , so q ′ ( x ) = 1 everywhere it is defined.
Why this step? Once simplified there is no division left; the derivative is trivially the slope of a line.
Step 4 — the limit at the hole.
lim x → 2 q ( x ) = 2 + 2 = 4
so q behaves like the line y = x + 2 with a single missing point at ( 2 , 4 ) .
Why this step? At x = 2 the function is not defined , so we cannot differentiate at the point — instead we ask what value it approaches . The limit tells us the hole could be "plugged" at height 4 , which is what makes it removable rather than a true break.
Verify: Plug x = 3 into the original: 3 − 2 9 − 4 = 5 , and x + 2 = 5 ✓. The two forms agree away from the hole; the slope is a flat 1 . Forecast: removable hole , not a blow-up.
Common mistake Applying the quotient rule blindly at
x = 2
If you'd shoved q into v 2 u ′ v − u v ′ you'd get v 2 v 2 -type garbage with v = 0 in the bottom — undefined . Always inspect a 0 0 first; cancel, then differentiate.
r ( x ) = x − 2 x + 1 . What happens near x = 2 ? Contrast this with Ex 5.
Forecast: at x = 2 the top is 2 + 1 = 3 (nonzero) and the bottom is 0 . Hole, or infinite spike?
Step 1 — check the point directly.
At x = 2 : top = 3 = 0 , bottom = 0 . This is 0 3 — a nonzero over zero , which does not cancel.
Why this step? We repeat the Ex 5 diagnosis, but the outcome differs precisely because the numerator is not zero — nothing shares the ( x − 2 ) factor to cancel.
Step 2 — test the two sides of the singularity.
Just above x = 2 (say x = 2.01 ): bottom is a tiny positive number, so r → + ∞ .
Just below x = 2 (say x = 1.99 ): bottom is a tiny negative number, so r → − ∞ .
Why this step? A "nonzero / tiny" ratio explodes; its sign flips with the sign of the tiny denominator, so we must check both sides to see the full behaviour.
Step 3 — conclude: vertical asymptote.
lim x → 2 + r ( x ) = + ∞ , lim x → 2 − r ( x ) = − ∞
The line x = 2 is a vertical asymptote — the curve shoots off in opposite directions on each side, and r can never be "repaired" at x = 2 .
Why this step? Unlike Ex 5, no finite limit exists, so there is no value to fill the gap — this is the genuine "where the rule breaks" case the matrix promised.
Step 4 — differentiate away from the asymptote.
u = x + 1 , u ′ = 1 ; v = x − 2 , v ′ = 1 :
r ′ ( x ) = ( x − 2 ) 2 ( 1 ) ( x − 2 ) − ( x + 1 ) ( 1 ) = ( x − 2 ) 2 − 3
Why this step? The derivative exists for every x = 2 ; the numerator − 3 being negative tells us r is decreasing on both branches, but the derivative itself also blows up as x → 2 (the tangents become vertical).
Verify: At x = 3 : r = 1 4 = 4 ; at x = 1 : r = − 1 2 = − 2 — values on opposite branches, huge in magnitude near x = 2 , confirming the asymptote. And r ′ ( 3 ) = 1 − 3 = − 3 < 0 ✓ decreasing. Forecast: infinite blow-up , not a hole.
y = 9 − x 2 (the upper half of a circle of radius 3). Find y ′ at x = + 2 and at x = − 2 .
Forecast: on the right half of a hill the slope goes down , on the left half it goes up . Guess the two signs.
Step 1 — spot the nesting.
Outer f ( u ) = u = u 1/2 , inner u = 9 − x 2 .
Why this step? A function inside a square root is a composition — the chain rule's home turf.
Step 2 — differentiate each layer.
f ′ ( u ) = 2 1 u − 1/2 = 2 u 1 ; inner u ′ = − 2 x .
Why this step? Two gears: the root gear and the inside gear. I need both ratios.
Step 3 — multiply (chain).
y ′ = 2 9 − x 2 1 ⋅ ( − 2 x ) = 9 − x 2 − x
Why this step? Forgetting ⋅ ( − 2 x ) would drop the sign information entirely.
Step 4 — plug both signs of x .
y ′ ( 2 ) = 9 − 4 − 2 = 5 − 2 ≈ − 0.894
y ′ ( − 2 ) = 9 − 4 − ( − 2 ) = 5 2 ≈ + 0.894
Why this step? The whole point of this cell is to see the sign flip : the − x in the numerator means a positive x gives a negative slope and vice-versa, so we must test both signs to confirm the formula behaves symmetrically.
Verify: On a dome, the right side slopes down (negative ✓) and the left side slopes up (positive ✓), mirror-symmetric — exactly what the − x in the numerator guarantees. Forecast confirmed.
y = sin ( ( 3 x + 1 ) 2 ) . Differentiate.
Forecast: how many factors will the chain produce — 2 or 3?
Step 1 — peel the layers, outside-in.
Layer 1 (outer): sin ( ⋅ ) . Layer 2 (middle): ( ⋅ ) 2 . Layer 3 (inner): 3 x + 1 .
Why this step? Each ( is a gear. Three shells → three gear ratios to multiply.
Step 2 — differentiate each shell, keeping the inside untouched.
Outer: d ( mid ) d sin ( mid ) = cos ( ( 3 x + 1 ) 2 )
Middle: d ( inner ) d ( inner ) 2 = 2 ( 3 x + 1 )
Inner: d x d ( 3 x + 1 ) = 3
Why this step? The chain rule says: differentiate outer at the inner, and carry the inners along untouched, layer by layer.
Step 3 — multiply all three.
y ′ = cos ( ( 3 x + 1 ) 2 ) ⋅ 2 ( 3 x + 1 ) ⋅ 3 = 6 ( 3 x + 1 ) cos ( ( 3 x + 1 ) 2 )
Why this step? Rates multiply (the gear-ratio insight from the parent): the total speed-up from x all the way out is the product of every shell's individual rate, so we simply multiply the three factors and combine the constants 2 ⋅ 3 = 6 .
Verify: At x = 0 : inner = 1 , so y ′ = 6 ( 1 ) cos ( 1 ) ≈ 6 ( 0.5403 ) ≈ 3.242 . The count of factors is 3 — one per shell. Forecast: 3 factors.
Mnemonic Peeling an onion
Outside in. Differentiate the outermost skin (leave its inside frozen), then multiply by the derivative of the next skin, and so on until you hit bare x .
The building block L ( x ) = x ⋅ σ ( x ) where σ ( x ) = 1 + e − x 1 is the SiLU / swish activation . Find L ′ ( x ) .
Forecast: the answer should contain σ and σ ( 1 − σ ) . Guess how they combine.
Step 1 — outer structure is a product.
u = x , u ′ = 1 ; v = σ ( x ) , and from the parent note v ′ = σ ( x ) ( 1 − σ ( x ) ) (that itself used chain + quotient ).
Why this step? L is input × activation — a product, so the product rule frames it.
Step 2 — apply the product rule.
L ′ ( x ) = ( 1 ) σ ( x ) + x ⋅ σ ( x ) ( 1 − σ ( x ) )
Why this step? Two strips: one from x growing, one from the activation changing.
Step 3 — factor σ .
L ′ ( x ) = σ ( x ) [ 1 + x ( 1 − σ ( x ) ) ]
Why this step? Pulling the common σ ( x ) out gives the compact form a library like PyTorch actually stores; it feeds straight into Backpropagation .
Step 4 — sanity numbers at x = 0 .
σ ( 0 ) = 2 1 , so L ′ ( 0 ) = 2 1 [ 1 + 0 ] = 2 1 = 0.5 .
Why this step? We pick x = 0 because σ ( 0 ) = 2 1 is a value we know exactly and the x ( 1 − σ ) term vanishes — the simplest possible input to catch an algebra slip before trusting the general formula.
Verify: At x = 0 , L ( x ) = x σ ( x ) ≈ x ⋅ 2 1 near the origin, so the slope should be about 2 1 — matches. Forecast: product rule glued σ to σ ( 1 − σ ) , confirmed.
A rectangular solar panel is expanding as it heats . Its width is w ( t ) = 2 + 0.1 t metres and its height is h ( t ) = 1 + 0.05 t metres, where t is in seconds. How fast is the area growing at t = 10 s ?
Forecast: both sides grow, so the area rate should be bigger than either side's rate alone. Guess above or below 0.5 m 2 / s .
Step 1 — area is a product.
A ( t ) = w ( t ) h ( t ) . So A ′ ( t ) = w ′ h + w h ′ — the product rule is the "two growing strips" from the parent.
Why this step? Area of a rectangle whose both sides move gains a strip on each side.
Step 2 — the rates.
w ′ = 0.1 m/s , h ′ = 0.05 m/s (slopes of the linear widths).
Why this step? The product rule needs each side's rate of change; since w and h are straight lines in t , their derivatives are just the constant slopes 0.1 and 0.05 .
Step 3 — evaluate the sizes at t = 10 .
w ( 10 ) = 2 + 1 = 3 m , h ( 10 ) = 1 + 0.5 = 1.5 m .
Why this step? The strips' lengths depend on the current side lengths.
Step 4 — assemble with units.
A ′ ( 10 ) = w ′ h ( 0.1 ) ( 1.5 ) + w h ′ ( 3 ) ( 0.05 ) = 0.15 + 0.15 = 0.30 s m 2
Why this step? Plugging the four numbers into w ′ h + w h ′ combines both growing strips into the single area-rate the question asked for; the question wants the rate at t = 10 , so we use the sizes computed in Step 3.
Verify units: ( m/s ) ( m ) = m 2 / s ✓ — a rate of area, correct. Value 0.30 m 2 / s is below 0.5 ; the forecast "both sides grow → bigger than one side" holds since each strip is 0.15 , together 0.30 .
A point moves on the circle x 2 + y 2 = 25 . The curve is not solved for y — you cannot write a single clean y = f ( x ) for the whole circle. Find the slope d x d y of the tangent at the point ( 3 , 4 ) .
Forecast: at ( 3 , 4 ) we are on the upper-right of the circle. Will the tangent slope be positive or negative? Guess before solving.
Step 1 — differentiate BOTH sides with respect to x , treating y as a function of x .
d x d ( x 2 ) + d x d ( y 2 ) = d x d ( 25 )
Why this step? We can't isolate y first, so we differentiate the equation as it stands . Because y secretly depends on x , every y -term needs the chain rule — this is exactly what "implicit differentiation" means.
Step 2 — apply the chain rule to the y 2 term.
d x d ( x 2 ) = 2 x , and d x d ( y 2 ) = 2 y ⋅ d x d y (outer u 2 gives 2 y , times inner rate d x d y ). The constant 25 has derivative 0 :
2 x + 2 y d x d y = 0
Why this step? The extra d x d y factor is the whole point — forgetting it is the classic implicit-differentiation error.
Step 3 — solve algebraically for d x d y .
2 y d x d y = − 2 x ⇒ d x d y = − y x
Why this step? We want the slope alone, so we isolate d x d y by moving the 2 x across and dividing by 2 y . The answer is a formula in both x and y — normal for implicit curves.
Step 4 — plug in the point ( 3 , 4 ) .
d x d y ( 3 , 4 ) = − 4 3 = − 0.75
Why this step? The slope formula depends on where you are on the circle, so we substitute the specific point ( 3 , 4 ) to get the single tangent slope the question asks for.
Verify: The upper half of the circle solved explicitly is y = 25 − x 2 ; by the Ex 6 method y ′ = 25 − x 2 − x , and at x = 3 that is 16 − 3 = 4 − 3 = − 0.75 ✓ — the implicit and explicit routes agree. A radius to ( 3 , 4 ) has slope 3 4 , and the tangent (perpendicular) has slope − 4 3 , the negative reciprocal ✓. Forecast: negative , confirmed.
Recall Did we hit every matrix cell?
C1 (product@point) ::: Ex 1
C2 (three-factor product) ::: Ex 2
C3 (quotient sign) ::: Ex 3
C4 (quotient zero-slope) ::: Ex 4
C5a (denominator→0 removable hole) ::: Ex 5
C5b (denominator→0 genuine blow-up) ::: Ex 5b
C6 (chain, inside sign) ::: Ex 6
C7 (triple nested chain) ::: Ex 7
C8 (all three, machine learning) ::: Ex 8
C9 (word problem + units) ::: Ex 9
C10 (exam twist, implicit differentiation) ::: Ex 10
Onward: these hand-derivatives are exactly the numbers that flow through Gradient and Partial Derivatives and get chained in Backpropagation to power Gradient Descent .