19 / 90

Day 19: The chain rule for composed functions

Derive the chain rule on minimal scalar examples, drill hand calculations against expansion checks, and verify every derivative with a central finite difference. Prediction, observation, review, and recovery are part of the 480-minute ledger.

AI Mathematics & Calculus 480 active minutes (8 hours focused study)
01 120 min

Composition intuition: derivatives multiply along the chain

Assistance allowed only after prediction and observed evidence are recorded.

Prerequisites

Study Days 16-18 derivative rules; if any rule is shaky, open the day-level recovery link before continuing.

Learning Objective

State the chain rule dy/dx = dy/du * du/dx for a composition y = g(u), u = h(x), motivate it with small changes, and apply it to a polynomial power with an independent expansion check.

Instructions

Study source: within this activity's existing reading/practice time, use MIT OCW 18.01SC Single Variable Calculus, Unit 1, Part A, Session 11: Chain Rule; lecture notes and worked example with solution, then explain one connection to the local task in your own words. Keep the local exercise and acceptance checks; use its original explanation if the external source is unavailable. Let y = (3x + 1)^2. Set u = 3x + 1 so y = u^2. A small change dx scales to du = 3 dx, and du scales to dy = 2u du, so dy/dx = 2u * 3 = 6(3x + 1) = 18x + 6. Verify by expanding first: (3x + 1)^2 = 9x^2 + 6x + 1, whose derivative is also 18x + 6. Write the two derivations side by side and predict dy/dx at x = 1 before computing.

Practice & Prediction Log

Predict, then compute: (a) d/dx (3x + 1)^2 evaluated at x = 1, using the chain rule and again by expansion; (b) d/dx (2x - 1)^3 evaluated at x = 1 using the chain rule.

Independent Mastery Criterion

You state the chain rule with named inner and outer functions, reproduce both derivations of 18x + 6 without notes, and your predicted values 24 and 6 match a finite-difference check you ran yourself.

Authoritative Source Resources & Provenance

linking CC BY-NC-SA 4.0 noncommercial share-alike

MIT OCW 18.01SC Single Variable Calculus

Author: MIT OpenCourseWare (David Jerison) | Original Source Link ↗

Relevant Section / Range: Unit 1, Part A, Session 11: Chain Rule; lecture notes and worked example with solution

Verified Version & Date: Public edition checked 2026-11-01; moving pages may change

Selection Rationale:

Independent-study teaching sequence with lectures, worked recitations, problem sets and solutions for Days 16-19; OpenStax remains the numbered written reference.

Source Prerequisites:

Functions, algebra and high-school trigonometry.

Safe Fallback (Offline Resilience):

Use the original localized explanations, exercises and checks already present in this activity; no external account or purchase is required for that fallback.

Compared Candidate Sources & Selection Analysis (2)
OpenStax Calculus Volume 1 ↗ compared_alternative [CC BY-NC-SA 4.0]

Stable numbered text and exercises; retained alongside the lecture and recitation sequence.

Essence of Calculus ↗ compared_alternative [Copyright 3Blue1Brown / Grant Sanderson (no general open license)]

Visual motivation without an answer-keyed exercise sequence; retained for intuition.

linking CC BY-NC-SA 4.0 attribution noncommercial share-alike

OpenStax Calculus Volume 1

Author: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | Original Source Link ↗

Relevant Section / Range: Section 3.6 The Chain Rule: 'Rule: The Chain Rule' box (Equation 3.17), 'Rule: Chain Rule Using Leibniz’s Notation', Example 3.48 Using the Chain and Power Rules

Verified Version & Date: OpenStax Calculus Volume 1 web edition (verified 2026-10-30)

Selection Rationale:

Openly licensed primary treatment of the scalar chain rule with worked examples that match the day's hand calculations.

Source Prerequisites:

Derivative rules for powers and polynomials (Study Days 16-18).

Safe Fallback (Offline Resilience):

The lesson contains complete local derivations and worked answers; offline study is unaffected.

Compared Candidate Sources & Selection Analysis (3)
MIT OpenCourseWare 18.01SC Single Variable Calculus ↗ compared_selected_for_visual_practice [CC BY-NC-SA 4.0]

Strong exercises and transcripts, but the noncommercial share-alike terms and course navigation make OpenStax the primary stable text.

Paul's Online Math Notes: Calculus I ↗ compared_rejected_for_reuse [All Rights Reserved]

Useful reference, but rights and redistribution terms are less suitable for embedded recovery material.

SciPy Numerical Differentiation Documentation ↗ compared_selected_for_numerics [BSD-3-Clause]

A primary API reference for numerical derivative step-size behavior; it complements rather than replaces the hand derivation.

linking 3Blue1Brown copyright (all rights reserved); site FAQ permits only short clips under stated conditions No video, audio, transcript or frame redistribution permitted

Essence of Calculus

Author: Grant Sanderson (3Blue1Brown) | Original Source Link ↗

Relevant Section / Range: Chapter 4 video: composing functions and why derivatives multiply

Verified Version & Date: 2017 video release (verified 2026-10-30)

Selection Rationale:

Visual-first treatment of why the derivative of a composition is a product of derivatives; selected for its geometric explanation of the chain rule.

Source Prerequisites:

Basic derivative intuition from Study Days 16-18.

Safe Fallback (Offline Resilience):

All visual intuitions are restated as text derivations and finite-difference checks in the local content.

Compared Candidate Sources & Selection Analysis (2)
OpenStax Calculus Volume 1 Section 3.6 ↗ compared_selected_for_day19 [CC BY-NC-SA 4.0]

Chosen as the primary written source; 3Blue1Brown supplies the geometric motivation layer.

Khan Academy: Differential Calculus ↗ compared_alternative [CC BY-NC-SA 4.0]

Good drill coverage but less memorable visual intuition for the chain rule's product structure.

02 120 min

Hand computation drills and the missing inner derivative

Independent practice: predict first and preserve the recorded unaided attempt; any later help is a separate assisted-recovery phase, and a fresh equivalent unaided check is required before the idea counts as independent evidence.

Prerequisites

Complete the previous activity; use the listed recovery link if blocked.

Learning Objective

Compute derivatives of composed powers by hand, confirm each result by polynomial expansion or a finite difference, and diagnose the classic error of dropping the inner derivative.

Instructions

Work without looking at answers first. For f(x) = (5x - 2)^3, the chain rule gives f'(x) = 3(5x - 2)^2 * 5 = 15(5x - 2)^2. Confirm at x = 1 by expanding (5x - 2)^3 = 125x^3 - 150x^2 + 60x - 8, whose derivative 375x^2 - 300x + 60 evaluates to 135 at x = 1 — the same as 15 * 3^2. Then repeat for g(x) = (x^2 + 1)^2 at x = 2, where the inner derivative is 2x instead of a constant. If you use help after the preserved attempt, treat it as assisted recovery: keep the original attempt unchanged, and pass a fresh equivalent unaided check before calling the idea remediated.

Practice & Prediction Log

Compute by hand and verify: (a) f'(1) for f(x) = (5x - 2)^3; (b) g'(2) for g(x) = (x^2 + 1)^2. For each, also write the wrong answer produced by forgetting the inner derivative, and explain the size of the error.

Independent Mastery Criterion

Unaided, you produce 135 and 40 with a chain-rule derivation and an independent check for each, and you can state which factor the common omission loses (5 and 4 respectively).

Authoritative Source Resources & Provenance

linking CC BY-NC-SA 4.0 attribution noncommercial share-alike

OpenStax Calculus Volume 1

Author: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | Original Source Link ↗

Relevant Section / Range: Section 3.6 worked examples and end-of-section exercises

Verified Version & Date: OpenStax Calculus Volume 1 web edition (verified 2026-10-30)

Selection Rationale:

Provides additional independent drill problems once the local exercises are mastered.

Source Prerequisites:

Derivative rules for powers and polynomials (Study Days 16-18).

Safe Fallback (Offline Resilience):

The exercise answers are fully worked locally, so the drill never depends on the external site.

Compared Candidate Sources & Selection Analysis (3)
MIT OpenCourseWare 18.01SC Single Variable Calculus ↗ compared_selected_for_visual_practice [CC BY-NC-SA 4.0]

Strong exercises and transcripts, but the noncommercial share-alike terms and course navigation make OpenStax the primary stable text.

Paul's Online Math Notes: Calculus I ↗ compared_rejected_for_reuse [All Rights Reserved]

Useful reference, but rights and redistribution terms are less suitable for embedded recovery material.

SciPy Numerical Differentiation Documentation ↗ compared_selected_for_numerics [BSD-3-Clause]

A primary API reference for numerical derivative step-size behavior; it complements rather than replaces the hand derivation.

linking 3Blue1Brown copyright (all rights reserved); site FAQ permits only short clips under stated conditions No video, audio, transcript or frame redistribution permitted

Essence of Calculus

Author: Grant Sanderson (3Blue1Brown) | Original Source Link ↗

Relevant Section / Range: Chapter 4 video: the inner-function correction factor

Verified Version & Date: 2017 video release (verified 2026-10-30)

Selection Rationale:

Explains geometrically why omitting the inner derivative undercounts the change, matching the worked failure case.

Source Prerequisites:

Basic derivative intuition from Study Days 16-18.

Safe Fallback (Offline Resilience):

The failure case is demonstrated locally with an expansion check and numerical values.

Compared Candidate Sources & Selection Analysis (2)
OpenStax Calculus Volume 1 Section 3.6 ↗ compared_selected_for_day19 [CC BY-NC-SA 4.0]

Chosen as the primary written source; 3Blue1Brown supplies the geometric motivation layer.

Khan Academy: Differential Calculus ↗ compared_alternative [CC BY-NC-SA 4.0]

Good drill coverage but less memorable visual intuition for the chain rule's product structure.

03 120 min

Deeper chains and finite-difference verification

Assistance allowed only after prediction and observed evidence are recorded.

Prerequisites

Complete the previous activity; use the listed recovery link if blocked.

Learning Objective

Apply the chain rule through three nested links, then write a tiny Python helper that verifies any hand derivative by a central finite difference.

Instructions

For w = (2x^2 + 1)^3, decompose as w = v^3 with v = 2x^2 + 1. Then dw/dx = 3v^2 * dv/dx = 3(2x^2 + 1)^2 * 4x = 12x(2x^2 + 1)^2. At x = 1 that is 12 * 9 = 108 while w = 27. Verification helper: def central_fd(f, x, h=1e-5): return (f(x + h) - f(x - h)) / (2 * h). Predict the printed value before running central_fd(lambda x: (2*x2 + 1)3, 1).

Practice & Prediction Log

Write the three-link derivation for dw/dx of w = (2x^2 + 1)^3, evaluate it at x = 1, and run the finite-difference helper to confirm. Then use the helper to re-verify 24 for d/dx (3x + 1)^2 at x = 1 and record any mismatch.

Independent Mastery Criterion

Your written chain has exactly three factors in the right order, your prediction precedes the run, and the finite-difference output matches 108 and 24 to at least four decimal places.

Authoritative Source Resources & Provenance

linking CC BY-NC-SA 4.0 attribution noncommercial share-alike

OpenStax Calculus Volume 1

Author: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | Original Source Link ↗

Relevant Section / Range: Section 3.6: applying the chain rule more than once

Verified Version & Date: OpenStax Calculus Volume 1 web edition (verified 2026-10-30)

Selection Rationale:

Documents repeated application of the chain rule used in the three-link composition drill.

Source Prerequisites:

Derivative rules for powers and polynomials (Study Days 16-18).

Safe Fallback (Offline Resilience):

The worked answer derives the three-link product locally step by step.

Compared Candidate Sources & Selection Analysis (3)
MIT OpenCourseWare 18.01SC Single Variable Calculus ↗ compared_selected_for_visual_practice [CC BY-NC-SA 4.0]

Strong exercises and transcripts, but the noncommercial share-alike terms and course navigation make OpenStax the primary stable text.

Paul's Online Math Notes: Calculus I ↗ compared_rejected_for_reuse [All Rights Reserved]

Useful reference, but rights and redistribution terms are less suitable for embedded recovery material.

SciPy Numerical Differentiation Documentation ↗ compared_selected_for_numerics [BSD-3-Clause]

A primary API reference for numerical derivative step-size behavior; it complements rather than replaces the hand derivation.

linking PSF License Version 2

The Python Tutorial: Numbers and Expressions

Author: Python Software Foundation | Original Source Link ↗

Relevant Section / Range: Section 3.1.1 Numbers: arithmetic operators used by the finite-difference helper

Verified Version & Date: Python 3.12 documentation (verified 2026-10-30)

Selection Rationale:

Reference for the arithmetic syntax used by the central finite-difference verification helper.

Source Prerequisites:

Able to run a short Python file from the terminal.

Safe Fallback (Offline Resilience):

The full helper listing is embedded in the lesson and runs on a standard Python install.

Compared Candidate Sources & Selection Analysis (2)
math — Mathematical functions ↗ compared_alternative [PSF License Version 2]

Extends the operator set to transcendental functions; kept as a follow-on once the arithmetic expressions are fluent.

The Python Tutorial: Floating Point Arithmetic Issues ↗ compared_alternative [PSF License Version 2]

Explains binary float representation limits; deferred to the numerics days where tolerance reasoning is rehearsed.

04 120 min

Independent mastery check, kink edge cases, and recovery

Independent Mastery Check (no AI assistance).

Prerequisites

Complete the previous activity; use the listed recovery link if blocked.

Learning Objective

Under closed-book conditions, state and apply the chain rule, verify a derivative numerically, and explain why the rule fails at a nondifferentiable kink.

Instructions

No notes or AI during the check. Part 1: state the chain rule for y = g(u), u = h(x). Part 2: compute d/dx (4x + 3)^2 at x = 0 and verify with a finite difference. Part 3: f(x) = |2x - 2| has a kink at x = 1. Compute the left difference-quotient slope and the right slope there, and explain why the chain rule does not apply at that point even though |u| and 2x - 2 are simple functions.

Practice & Prediction Log

Submit: the chain rule statement, the value of d/dx (4x + 3)^2 at x = 0 with your verification number, the left and right slopes of |2x - 2| at x = 1, and one sentence on what hypothesis fails.

Independent Mastery Criterion

All four parts correct unaided: the rule statement, 24 with numeric agreement, slopes -2 and +2 with a correct hypothesis-failure explanation, plus an honest recovery note for anything missed.

Authoritative Source Resources & Provenance

linking CC BY-NC-SA 4.0 attribution noncommercial share-alike

OpenStax Calculus Volume 1

Author: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | Original Source Link ↗

Relevant Section / Range: Section 3.6 hypothesis: both links must be differentiable at the evaluation point

Verified Version & Date: OpenStax Calculus Volume 1 web edition (verified 2026-10-30)

Selection Rationale:

States the differentiability hypotheses that explain the kink counterexample in the mastery check.

Source Prerequisites:

Derivative rules for powers and polynomials (Study Days 16-18).

Safe Fallback (Offline Resilience):

The edge case is analyzed locally with left and right difference quotients.

Compared Candidate Sources & Selection Analysis (3)
MIT OpenCourseWare 18.01SC Single Variable Calculus ↗ compared_selected_for_visual_practice [CC BY-NC-SA 4.0]

Strong exercises and transcripts, but the noncommercial share-alike terms and course navigation make OpenStax the primary stable text.

Paul's Online Math Notes: Calculus I ↗ compared_rejected_for_reuse [All Rights Reserved]

Useful reference, but rights and redistribution terms are less suitable for embedded recovery material.

SciPy Numerical Differentiation Documentation ↗ compared_selected_for_numerics [BSD-3-Clause]

A primary API reference for numerical derivative step-size behavior; it complements rather than replaces the hand derivation.

linking 3Blue1Brown copyright (all rights reserved); site FAQ permits only short clips under stated conditions No video, audio, transcript or frame redistribution permitted

Essence of Calculus

Author: Grant Sanderson (3Blue1Brown) | Original Source Link ↗

Relevant Section / Range: Chapter 4 video: where the product picture assumes smooth behavior

Verified Version & Date: 2017 video release (verified 2026-10-30)

Selection Rationale:

Optional review link for learners who want the geometric picture before the independent check.

Source Prerequisites:

Basic derivative intuition from Study Days 16-18.

Safe Fallback (Offline Resilience):

The assessment is fully specified locally and needs no external media.

Compared Candidate Sources & Selection Analysis (2)
OpenStax Calculus Volume 1 Section 3.6 ↗ compared_selected_for_day19 [CC BY-NC-SA 4.0]

Chosen as the primary written source; 3Blue1Brown supplies the geometric motivation layer.

Khan Academy: Differential Calculus ↗ compared_alternative [CC BY-NC-SA 4.0]

Good drill coverage but less memorable visual intuition for the chain rule's product structure.