20 / 90

Day 20: 偏微分と勾配ベクトル

一度に一変数だけを微分し、勾配ベクトルを組み立て、共有する依存経路の寄与が足し合わされることを証明する。すべての主張は手計算・有限差分・直接代入で検証する。

AI数学・微積分・線形代数 480 分のアクティブ学習(集中学習 8 時間)
01 120 分

偏微分:他のすべての変数を固定する

予測と観察の証拠を記録した後にのみ支援を利用できる。

前提条件

Day 19 の連鎖律ドリル。スカラーの規則が不安なら、続行前に Day レベルの回復リンクを開くこと。

学習目標

偏微分を「他の変数をすべて固定した一軸方向の通常の微分」と定義し、多項式の 2 つの偏微分を手計算して有限差分で確認する。

手順

参照資料: この活動に割り当てられた既存の読解・練習時間内で、MIT OCW 18.02SC Multivariable Calculus の Part 2: Partial Derivatives; differentiation, chain rule and gradient sessions を参照し、ローカル課題とのつながりを一つ自分の言葉で説明する。既存の演習と合格基準は維持し、外部資料が開けない場合は本コース独自の説明を使う。f(x, y) = x^2 y + 3y - x について、y を固定して x で微分:∂f/∂x = 2xy - 1。x を固定して y で微分:∂f/∂y = x^2 + 3。点 (2, 1) では f = 4*1 + 3 - 2 = 5、∂f/∂x = 4 - 1 = 3、∂f/∂y = 4 + 3 = 7。中心差分で確認する前に予測せよ:(f(2.00001, 1) - f(1.99999, 1)) / 0.00002 は 3 に近づき、y 方向の切片は 7 に近づく。

演習と予測記録

手計算して数値検証せよ:(a) f(x, y) = x^2 y + 3y - x の (2, 1) での 2 つの偏微分。(b) f(x, y) = x y^2 の (3, 2) での 2 つの偏微分。各微分で固定した変数を記録せよ。

独立習得基準

助けなしで両方の関数の両方の偏微分を計算し、各行で固定した変数を述べ、3, 7, 4, 12 の 4 つの値が自分で実行した有限差分とすべて一致する。

公式ソースリソースと権利証跡

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

MIT OCW 18.02SC Multivariable Calculus

著者・提供機関: MIT OpenCourseWare (Prof. Denis Auroux) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Part 2: Partial Derivatives; differentiation, chain rule and gradient sessions

検証バージョンと日付: Fall 2010 (Verified: 2026-10-30)

選定理由:

Rigorous university-lecture treatment that lets motivated learners go deeper on partial derivatives and the gradient after the OpenStax primary text.

ソース前提知識:

Single-variable calculus and coordinate geometry

安全フォールバック(オフライン回復性):

All required formulas, worked examples, and numeric checks are contained in the localized lesson text.

比較対象候補リソースと選定評価 (2)
OpenStax Calculus Volume 3 ↗ compared_selected_for_day20 [CC BY-NC-SA 4.0]

Chosen as the primary written reference; MIT OCW is the deeper lecture companion.

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

More accessible pacing but less rigorous than the Auroux lectures for the path-sum chain rule.

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

OpenStax Calculus Volume 3

著者・提供機関: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 4.3 Partial Derivatives: definition, notation, and worked examples

検証バージョンと日付: OpenStax Calculus Volume 3 web edition (verified 2026-10-30)

選定理由:

Openly licensed primary definition of the partial derivative matching the day's slice-and-differentiate method.

ソース前提知識:

Single-variable derivatives and the chain rule (Study Days 16-19).

安全フォールバック(オフライン回復性):

The lesson contains complete local derivations, worked answers, and a finite-difference check.

比較対象候補リソースと選定評価 (2)
MIT OCW 18.02SC Multivariable Calculus (Prof. Denis Auroux) ↗ compared_selected_for_day20 [CC BY-NC-SA 4.0]

Selected as the lecture-depth companion for partial derivatives; OpenStax Volume 3 remains the written primary reference.

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

Strong visual coverage of gradients, but the OpenStax text better matches the lesson's theorem-plus-hand-check structure.

02 120 分

勾配ベクトルは最も急な上り方向を指す

独立練習:先に予測し、記録した無支援の試行を保存する。その後の助けは別段階の「支援つき回復」であり、その概念を独立した証拠とみなすには新しい同等の無支援チェックが必要。

前提条件

前のアクティビティを完了していること。詰まった場合は記載の回復リンクを使う。

学習目標

偏微分を勾配ベクトルに組み立て、単位方向に正規化し、勾配方向の方向微分がそのノルムに等しいことを検証する。

手順

勾配は ∇f = (∂f/∂x, ∂f/∂y)。f(x, y) = x^2 + y^2 なら ∇f = (2x, 2y)。(3, 4) では ∇f = (6, 8)、ノルム sqrt(36 + 64) = 10、単位方向 (0.6, 0.8)。重要な事実:勾配方向の方向微分はそのノルムに等しい。計算前に小さな h で (f(3 + 0.6h, 4 + 0.8h) - f(3, 4)) / h を予測せよ。10 に近づくはず。 保存した試行の後で助けを使った場合は「支援つき回復」として扱う:元の試行は変更せず、その概念を修復済みと呼ぶ前に新しい同等の無支援チェックに合格する。

演習と予測記録

手計算せよ:(a) f(x, y) = x^2 + y^2 の (3, 4) での ∇f とノルムを求め、単位勾配方向の方向微分がノルムに近づくことを検証。(b) f(x, y) = xy + y^2 の (1, 2) での ∇f とノルム。

独立習得基準

助けなしで勾配 (6, 8) と (2, 5)、ノルム 10 と sqrt(29) ≈ 5.385 を導き、(a) について単位勾配方向の傾きがノルムに等しいことを数値検証できる。

公式ソースリソースと権利証跡

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

OpenStax Calculus Volume 3

著者・提供機関: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 4.6: the gradient is the direction of maximum increase with magnitude equal to that rate

検証バージョンと日付: OpenStax Calculus Volume 3 web edition (verified 2026-10-30)

選定理由:

States and proves the steepest-ascent property verified numerically in the exercise.

ソース前提知識:

Partial derivatives (day-20-act-01).

安全フォールバック(オフライン回復性):

The exercise derives the norm equality locally and checks it with a finite difference.

比較対象候補リソースと選定評価 (2)
MIT OCW 18.02SC Multivariable Calculus (Prof. Denis Auroux) ↗ compared_selected_for_day20 [CC BY-NC-SA 4.0]

Selected as the lecture-depth companion for partial derivatives; OpenStax Volume 3 remains the written primary reference.

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

Strong visual coverage of gradients, but the OpenStax text better matches the lesson's theorem-plus-hand-check structure.

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

Gradient Descent, How Neural Networks Learn

著者・提供機関: Grant Sanderson (3Blue1Brown) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Chapter 2 video: the gradient points in the direction of steepest increase

検証バージョンと日付: 2017 video release (verified 2026-10-30)

選定理由:

Visual motivation for why gradient descent moves downhill, connecting the math to later optimization days.

ソース前提知識:

Partial derivative intuition from the previous activity.

安全フォールバック(オフライン回復性):

The steepest-ascent fact is stated and verified numerically in the local content.

比較対象候補リソースと選定評価 (2)
OpenStax Calculus Volume 3 Section 4.6 ↗ compared_selected_for_day20 [CC BY-NC-SA 4.0]

Chosen as the primary written source proving the steepest-ascent theorem; 3Blue1Brown supplies the ML-motivation layer.

Khan Academy: The gradient ↗ compared_alternative [Proprietary (free course)]

Free interactive drills on the same gradient concept; the 3Blue1Brown video was retained for its visual-first derivation of steepest descent.

03 120 分

多変数の連鎖律:共有経路の寄与は足し合わされる

予測と観察の証拠を記録した後にのみ支援を利用できる。

前提条件

前のアクティビティを完了していること。詰まった場合は記載の回復リンクを使う。

学習目標

多変数の連鎖律 dz/dt = (∂f/∂x)(dx/dt) + (∂f/∂y)(dy/dt) を適用し、直接代入で検証し、一つの変数が 2 経路で使われるとき寄与が 1 回ではなく 2 回入ることを証明する。

手順

z = f(x, y) = xy、x = t^2、y = 3t とする。連鎖律より dz/dt = y * 2t + x * 3 = 6t^2 + 3t^2 = 9t^2。先に代入して確認:z = 3t^3 より dz/dt = 9t^2 で一致。次に変数共有の場合:L = a*b で b = a + 1 とする。a は 2 経路で L に届く:第 1 因子に直接入る経路(寄与 b)と、b を経由して第 2 因子に入る経路(寄与 a * db/da = a * 1)。合計 dL/da = b + a = 2a + 1。1 経路だけ数えるのが再利用変数の反例である。

演習と予測記録

計算して検証せよ:(a) z = xy、x = t^2、y = 3t のとき t = 2 での dz/dt を連鎖律と代入 z = 3t^3 の両方で求める。(b) L = a*b、b = a + 1 のとき a = 3 での dL/da を、2 経路の寄与と誤った単一経路の答えを示して求める。

独立習得基準

各問題で両経路の積を示し、独立した方法で 36 と 7 を確認し、再利用変数の答えが寄与を 1 つ選ぶのではなく合計しなければならない理由を一文で説明できる。

公式ソースリソースと権利証跡

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

OpenStax Calculus Volume 3

著者・提供機関: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 4.5: dz/dt equals the sum of partial-derivative products over all paths

検証バージョンと日付: OpenStax Calculus Volume 3 web edition (verified 2026-10-30)

選定理由:

Primary statement of the tree-diagram rule that the day's shared-path counterexample verifies.

ソース前提知識:

Scalar chain rule (day-19) and partial derivatives (day-20-act-01).

安全フォールバック(オフライン回復性):

Both worked examples are derived locally and cross-checked against direct substitution.

比較対象候補リソースと選定評価 (2)
MIT OCW 18.02SC Multivariable Calculus (Prof. Denis Auroux) ↗ compared_selected_for_day20 [CC BY-NC-SA 4.0]

Selected as the lecture-depth companion for partial derivatives; OpenStax Volume 3 remains the written primary reference.

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

Strong visual coverage of gradients, but the OpenStax text better matches the lesson's theorem-plus-hand-check structure.

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

OpenStax Calculus Volume 1

著者・提供機関: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 3.6: scalar chain rule used to check each path product

検証バージョンと日付: OpenStax Calculus Volume 1 web edition (verified 2026-10-30)

選定理由:

Recovery reference for the single-variable products inside the multivariable sum.

ソース前提知識:

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

安全フォールバック(オフライン回復性):

Day 19 content already covers the scalar rule; this link is optional review.

比較対象候補リソースと選定評価 (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.

04 120 分

独立習得チェック:勾配、検証、エッジケース

独立習得チェック(AI 支援なし)。

前提条件

前のアクティビティを完了していること。詰まった場合は記載の回復リンクを使う。

学習目標

閉ブック条件で勾配とそのノルムを計算し、最急上昇の性質を数値検証し、勾配が存在しない点を特定する。

手順

チェック中はノートや AI を使わない。パート 1:f(x, y) = x^2 + 2y^2 の (1, 1) での ∇f と ||∇f|| を計算せよ。パート 2:単位勾配方向に進むと f が最も速く増えること、すなわち方向微分がノルムに等しいことを数値検証せよ。パート 3:f(x, y) = |x| + |y| の (0, 0) では、各軸に沿って左右から来る傾きを比較し、両方の偏微分が存在しないことを示せ。

演習と予測記録

提出物:パート 1 の勾配とノルム、パート 2 の検証数値、パート 3 の矛盾する傾き、その点で勾配が未定義である理由の一文。

独立習得基準

3 部すべてを自力で正解:(2, 4) とノルム 2*sqrt(5) ≈ 4.4721 を方向微分で検証、-1/+1 の傾きの矛盾を正しく説明、さらに抜けた内容への正直な回復メモ。

公式ソースリソースと権利証跡

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

OpenStax Calculus Volume 3

著者・提供機関: OpenStax, Rice University (Gilbert Strang, Edwin Herman, et al.) | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 4.6: gradient exists only where the partial derivatives exist

検証バージョンと日付: OpenStax Calculus Volume 3 web edition (verified 2026-10-30)

選定理由:

Frames the nondifferentiable edge case in the mastery check.

ソース前提知識:

Partial derivatives and the multivariable chain rule.

安全フォールバック(オフライン回復性):

The edge case is analyzed locally with directional slopes that disagree.

比較対象候補リソースと選定評価 (2)
MIT OCW 18.02SC Multivariable Calculus (Prof. Denis Auroux) ↗ compared_selected_for_day20 [CC BY-NC-SA 4.0]

Selected as the lecture-depth companion for partial derivatives; OpenStax Volume 3 remains the written primary reference.

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

Strong visual coverage of gradients, but the OpenStax text better matches the lesson's theorem-plus-hand-check structure.

linking PSF License Version 2

The Python Tutorial: Numbers and Expressions

著者・提供機関: Python Software Foundation | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 3.1.1 Numbers: arithmetic used by the finite-difference checks

検証バージョンと日付: Python 3.12 documentation (verified 2026-10-30)

選定理由:

Reference for the verification arithmetic used in the mastery check.

ソース前提知識:

Able to run a short Python file from the terminal.

安全フォールバック(オフライン回復性):

The verification snippets are embedded and run on a standard Python install.

比較対象候補リソースと選定評価 (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.