Lesson 34 Exercise Review
Overall Assessment
The work demonstrates readiness for Lesson 35. The central idea is secure: a partial derivative isolates one coordinate while the others are held fixed, and the complete collection of partial derivatives is needed to describe multivariable change.
Problems 1-7 and 9 are correct apart from minor wording precision. Problems 8 and 10 need corrections, but neither exposes a prerequisite gap.
Problem-by-Problem Review
-
Correct. The distinction is clear. A slightly sharper version is that an ordinary derivative is the full local derivative for a one-input function, while a partial derivative is one coordinate sensitivity of a multi-input function.
-
Correct:
-
Correct. At the values are and . It is the function that locally increases when increases and locally decreases when increases; the derivatives themselves are not what is increasing or decreasing.
-
Correct:
The held-fixed variables were identified correctly.
-
Conceptually correct. The exact point on the surface is , and the slope belongs to the curve produced by intersecting the surface with the plane .
-
Correct. Both the chain-rule factors and the expanded forms are right.
-
Correct:
-
The setup was copied with instead of the exercise’s , and the multiplier terms were then differentiated as though they contained products and .
For the exercise as written in the Lesson Page,
the correct partials are:
Setting the first two to zero enforces stationarity with respect to the decision variables; it does not by itself guarantee a minimum or maximum. Setting the third to zero restores the constraint.
-
Correct. One partial reports only one coordinate component. The full gradient is needed to compare every direction and identify the steepest local increase.
-
The types communicate the intended scalar-field input and output, but the formula is a forward difference around the wrong point rather than a centered difference around
at. The perturbations must be copies ofat, with coordinateishifted in opposite directions:
type ScalarField = (x: readonly number[]) => number;
function partialDerivative(
f: ScalarField,
at: readonly number[],
coordinate: number,
h = 1e-5,
): number {
const plus = at.map((value, index) =>
index === coordinate ? value + h : value,
);
const minus = at.map((value, index) =>
index === coordinate ? value - h : value,
);
return (f(plus) - f(minus)) / (2 * h);
}
Readiness
Ready for Gradients. Lesson 35 should reinforce two refinements:
- the gradient is the local linear sensitivity object assembled from every partial derivative;
- numerical derivative checks must perturb the evaluation point, not replace it with a perturbation vector.