Flagship subject
✓ Official Syllabus VerifiedStandards & Rigor ↗
13

Partial Derivatives & the Gradient

∫ Calculus I–III · Partial Derivatives & the Gradient University Core · 13  ·  Partial Derivatives and Gradient

For a multivariable surface z = f(x, y), rate of change is inherently multidirectional. Slicing the surface along coordinate planes isolates single-variable rates known as partial derivatives. Unifying these rates gives the gradient vector \nabla f, which governs directional derivatives, establishes tangent planes, dictates the trajectory of steepest ascent, and underpins the Second Derivative Test for spatial extrema.

● Definition 13.1 — Partial Derivatives of Functions of Two Variables

Let \(f: D \subseteq \mathbb{R}^2 \to \mathbb{R}\). The partial derivative of \(f\) with respect to \(x\) at \((x_0, y_0)\) is the limit:

\[ \frac{\partial f}{\partial x}(x_0, y_0) = f_x(x_0, y_0) = \lim_{h \to 0} \frac{f(x_0 + h, y_0) - f(x_0, y_0)}{h} \]

and the partial derivative with respect to \(y\) is:

\[ \frac{\partial f}{\partial y}(x_0, y_0) = f_y(x_0, y_0) = \lim_{k \to 0} \frac{f(x_0, y_0 + k) - f(x_0, y_0)}{k} \]

Geometrically, \(f_x(x_0, y_0)\) is the tangent slope of the trace curve formed by intersecting the surface \(z = f(x, y)\) with the vertical plane \(y = y_0\); \(f_y(x_0, y_0)\) is the tangent slope along the trace in the vertical plane \(x = x_0\).

Holding \(y = 1\) fixed slices \(f(x, y) = 4 - x^2 - y^2\) along the parabola \(z = 3 - x^2\), whose tangent line at \(x = 1\) has slope \(f_x(1, 1) = -2\).
▲ Theorem 13.1 — Clairaut's Theorem (Equality of Mixed Partials)

Let \(f(x, y)\) be defined on an open disk \(D\) containing \((a, b)\). If the mixed second-order partial derivatives \(f_{xy} = \frac{\partial^2 f}{\partial y \partial x}\) and \(f_{yx} = \frac{\partial^2 f}{\partial x \partial y}\) are continuous throughout \(D\), then:

\[ f_{xy}(a, b) = f_{yx}(a, b) \]

Consequently, the order of differentiation across independent spatial variables can be interchanged freely for all smooth functions.

Analytical Proof via Double Mean Value Theorem

Choose small non-zero \(h, k\) such that the rectangle with vertices \((a, b)\), \((a+h, b)\), \((a, b+k)\), and \((a+h, b+k)\) lies inside \(D\). Define the double-difference quantity:

\[ \Delta(h, k) = f(a+h, b+k) - f(a+h, b) - f(a, b+k) + f(a, b) \]

Define the single-variable auxiliary function \(g(t) = f(t, b+k) - f(t, b)\). Then \(\Delta(h, k) = g(a+h) - g(a)\).

By the single-variable Mean Value Theorem, there exists \(c_1\) between \(a\) and \(a+h\) such that:

\[ \Delta(h, k) = h g'(c_1) = h\big[ f_x(c_1, b+k) - f_x(c_1, b) \big] \]

Applying the Mean Value Theorem again to the function \(y \mapsto f_x(c_1, y)\) on \([b, b+k]\), there exists \(c_2\) between \(b\) and \(b+k\) such that:

\[ f_x(c_1, b+k) - f_x(c_1, b) = k f_{xy}(c_1, c_2) \implies \frac{\Delta(h, k)}{hk} = f_{xy}(c_1, c_2) \]

By exact symmetry, defining \(w(s) = f(a+h, s) - f(a, s)\) and repeating the argument yields numbers \(d_1\) between \(a\) and \(a+h\) and \(d_2\) between \(b\) and \(b+k\) such that:

\[ \frac{\Delta(h, k)}{hk} = f_{yx}(d_1, d_2) \]

Equating both expressions gives \(f_{xy}(c_1, c_2) = f_{yx}(d_1, d_2)\). Taking the limit as \((h, k) \to (0, 0)\), \((c_1, c_2) \to (a, b)\) and \((d_1, d_2) \to (a, b)\). By the continuity of \(f_{xy}\) and \(f_{yx}\):

\[ f_{xy}(a, b) = f_{yx}(a, b) \quad \blacksquare \]
◆ Why It Works — First-Principles Derivation (Partial Derivatives & the Gradient)

Why Differentiability Implies the Directional Derivative Formula: If \(f(x, y)\) is differentiable at \((a, b)\), then \(f(a + hu_1, b + hu_2) - f(a, b) = f_x(a, b)hu_1 + f_y(a, b)hu_2 + o(h)\). Dividing by \(h\) and letting \(h \to 0\) yields \(D_{\mathbf{u}}f(a, b) = \nabla f(a, b)\cdot \mathbf{u}\), maximized when \(\mathbf{u}\) aligns with \(\nabla f\).

Worked Example 13.1 — Foundations: Computing Partials & Verifying Clairaut's Symmetry
Problem. For \(f(x, y) = x^3 y^2 + e^{2x}\sin y\), compute \(f_x, f_y, f_{xy}\), and \(f_{yx}\), and verify Clairaut's Theorem.
▸ Show step-by-step solution

Step 1: Compute first-order partials.
Holding \(y\) constant: \(f_x = 3x^2 y^2 + 2e^{2x}\sin y\)
Holding \(x\) constant: \(f_y = 2x^3 y + e^{2x}\cos y\)

Step 2: Compute mixed second-order partials.
Differentiate \(f_x\) with respect to \(y\):

\[ f_{xy} = \frac{\partial}{\partial y}\big(3x^2 y^2 + 2e^{2x}\sin y\big) = 6x^2 y + 2e^{2x}\cos y \]

Differentiate \(f_y\) with respect to \(x\):

\[ f_{yx} = \frac{\partial}{\partial x}\big(2x^3 y + e^{2x}\cos y\big) = 6x^2 y + 2e^{2x}\cos y \]

Both expressions are identical: \(f_{xy} = f_{yx} = 6x^2 y + 2e^{2x}\cos y\), verifying Clairaut's Theorem.

Worked Example \(B\) — Partial Derivatives & the Gradient (Medium Application)
Problem. A piecewise function is defined by \( u(s) = 22s + 6 \) for \( s < 19 \) and \( u(s) = s^2 + v \) for \( s \ge 19 \). Determine the parameter \( v \) that makes \( u(s) \) continuous at \( s = 19 \).
▸ Show step-by-step solution

Continuity at \( s = 19 \) requires \( 22(19) + 6 = 19^2 + v \implies v = 63 \).

Error Diagnosis — Common Student Traps vs. Exam-Board Method (Partial Derivatives & the Gradient)
Common Student TrapWhy It Fails MathematicallyCorrect Exam-Board Method
Computing angle at \(B\) using \(\overrightarrow{AB}\cdot\overrightarrow{BC}\)Vectors are head-to-tail instead of tail-to-tail, giving \(180^\circ - \theta\).Reverse \(\overrightarrow{AB}\) so both emanate from \(B\): use \(\overrightarrow{BA}\cdot\overrightarrow{BC}\).
Using the same parameter \(t\) for two intersecting 3D lines \(\mathbf{r}_1(t) = \mathbf{r}_2(t)\)Tests for a simultaneous collision at time \(t\) rather than geometric intersection of paths.Assign distinct parameters \(\lambda\) and \(\mu\) to the two lines before equating components.
Assuming \((AB)^{-1} = A^{-1}B^{-1}\)Multiplying \((AB)(A^{-1}B^{-1})\) does not cancel inner factors when \(AB \ne BA\).Use the shoe-sock reversal law: \((AB)^{-1} = B^{-1}A^{-1}\).
▲ Exam Pacing & Verification Strategy — Partial Derivatives & the Gradient

Fast Matrix & Vector Verification (University Single-Variable & Multivariable Calculus): Check every \(2\times 2\) or \(3\times 3\) eigenvalue computation using the trace and determinant invariants: \(\sum \lambda_i = \operatorname{tr}(A)\) (sum of diagonal entries) and \(\prod \lambda_i = \det(A)\).

Level 1 · Foundations
Find \(f_x(2, 1)\) and \(f_y(2, 1)\) for the function \(f(x, y) = \ln(x^2 + 3y^2)\).
💡 Hint 1 of 3
Compute partial derivatives via Chain Rule: \(f_x = \frac{2x}{x^2 + 3y^2}, \qquad f_y = \frac{6y}{x^2 + 3y^2}\).
💡 Hint 2 of 3
Substitute \(x = 2\) and \(y = 1\): \(x^2 + 3y^2 = 2^2 + 3(1^2) = 4 + 3\).
💡 Hint 3 of 3
Use the resulting form to finish: \(f_x(2, 1) = \frac{2(2)}{7} = \frac{4}{7}, \qquad f_y(2, 1) = \frac{6(1)}{7}\).
Compute partial derivatives via Chain Rule:
\[ f_x = \frac{2x}{x^2 + 3y^2}, \qquad f_y = \frac{6y}{x^2 + 3y^2} \]
Substitute \(x = 2\) and \(y = 1\):
\[ x^2 + 3y^2 = 2^2 + 3(1^2) = 4 + 3 = 7 \]\[ f_x(2, 1) = \frac{2(2)}{7} = \frac{4}{7}, \qquad f_y(2, 1) = \frac{6(1)}{7} = \frac{6}{7} \]
⊙ Explorer · Slicing a surface
interactive
\(f(1, c)\)\(2.800\)
\(f\)\(x\)\((1, c)\)\(-0.400\)

Fixing \(y=c\) gives the curve \(g(x)=f(x,c)\). Its slope at \(x=1\) is the partial \(f_x(1,c)\) — and it shifts as \(c\) moves.

▲ Theorem 13.2 — Tangent Planes, Linear Approximations & The Gradient

Tangent Plane: If \(f_x\) and \(f_y\) are continuous at \((a, b)\), the tangent plane to \(z = f(x, y)\) at \(P(a, b, f(a, b))\) has normal vector \(\mathbf{n} = \langle f_x(a, b), f_y(a, b), -1 \rangle\) and scalar equation:

\[ z - f(a, b) = f_x(a, b)(x - a) + f_y(a, b)(y - b) \]

The Gradient Vector: \(\nabla f(x, y) = \langle f_x, f_y \rangle\). For any unit vector \(\mathbf{u} = \langle u_1, u_2 \rangle\), the directional derivative is:

\[ D_\mathbf{u}f(x, y) = \nabla f(x, y) \cdot \mathbf{u} = |\nabla f|\,|\mathbf{u}|\cos\theta = |\nabla f|\cos\theta \]

Fundamental Properties of \(\nabla f\):

  • Steepest Ascent: \(D_\mathbf{u}f\) attains its global maximum \(|\nabla f|\) when \(\mathbf{u}\) points in the direction of \(\nabla f\) (\(\theta = 0\)).
  • Steepest Descent: \(D_\mathbf{u}f\) attains its minimum \(-|\nabla f|\) in the opposite direction \(-\nabla f\) (\(\theta = \pi\)).
  • Orthogonality to Level Curves: \(\nabla f(a, b)\) is strictly orthogonal (perpendicular) to the level curve \(f(x, y) = c\) passing through \((a, b)\).
Level curves of paraboloid \(z = x^2 + y^2\) showing concentric circular contours and gradient vector \(\nabla f = \langle 2, 4\rangle\) orthogonal to the contour at \((1, 2)\).
Partial Derivative
\( f_x = \lim_{h\to 0}\frac{f(x+h,y)-f(x,y)}{h} \)
Gradient
\( \nabla f = \langle f_x, f_y \rangle \)
Directional Derivative
\( D_{\mathbf{u}}f = \nabla f \cdot \mathbf{u},\; |\mathbf{u}|=1 \)
Tangent Plane
\( z - z_0 = f_x(x-x_0) + f_y(y-y_0) \)
Worked Example 13.2 — Medium: Tangent Plane & Directional Rate of Change
Problem. For \(f(x, y) = 4x^2 + y^2\):
▸ Show step-by-step solution

(a) Find the equation of the tangent plane at \((1, 2)\).
\(z_0 = f(1, 2) = 4(1)^2 + 2^2 = 8\).
\(f_x = 8x \implies f_x(1, 2) = 8\)
\(f_y = 2y \implies f_y(1, 2) = 4\)
Tangent plane: \(z - 8 = 8(x - 1) + 4(y - 2) \implies 8x + 4y - z = 8\).

(b) Find the directional derivative at \((1, 2)\) toward \(Q(4, 6)\).
Direction vector: \(\mathbf{v} = \vec{PQ} = \langle 4 - 1, 6 - 2 \rangle = \langle 3, 4 \rangle\).
Magnitude: \(|\mathbf{v}| = \sqrt{3^2 + 4^2} = 5\).
Unit vector: \(\mathbf{u} = \langle 3/5, 4/5 \rangle\).
Gradient: \(\nabla f(1, 2) = \langle 8, 4 \rangle\).
\[ D_\mathbf{u}f(1, 2) = \nabla f \cdot \mathbf{u} = 8\left(\frac{3}{5}\right) + 4\left(\frac{4}{5}\right) = \frac{24 + 16}{5} = \frac{40}{5} = 8 \]

Level 2 · Medium
Find the maximum rate of change of \(f(x, y) = 3x^2y - y^3\) at the point \((1, 2)\), and determine the unit vector in which it occurs.
💡 Hint 1 of 3
Compute gradient: \( \nabla f = \langle 6xy, 3x^2 - 3y^2 \rangle\).
💡 Hint 2 of 3
At \((1, 2)\): \( \nabla f(1, 2) = \langle 6(1)(2), 3(1)^2 - 3(2)^2 \rangle = \langle 12, 3 - 12 \rangle = \langle 12, -9 \rangle\). Maximum rate of change is the gradient magnitude: \(| \nabla f(1, 2)| = \sqrt{12^2 + (-9)^2} = \sqrt{144 + 81} = \sqrt{225}\).
💡 Hint 3 of 3
The direction of maximum increase is the normalized gradient: \(u = \frac{ \nabla f}{| \nabla f|} = \frac{1}{15}\langle 12, -9 \rangle\).
Compute gradient: \( \nabla f = \langle 6xy, 3x^2 - 3y^2 \rangle\).
At \((1, 2)\): \( \nabla f(1, 2) = \langle 6(1)(2), 3(1)^2 - 3(2)^2 \rangle = \langle 12, 3 - 12 \rangle = \langle 12, -9 \rangle\).
Maximum rate of change is the gradient magnitude:
\[ | \nabla f(1, 2)| = \sqrt{12^2 + (-9)^2} = \sqrt{144 + 81} = \sqrt{225} = 15 \]
The direction of maximum increase is the normalized gradient:
\[ \mathbf{u} = \frac{ \nabla f}{| \nabla f|} = \frac{1}{15}\langle 12, -9 \rangle = \left\langle \frac{4}{5}, -\frac{3}{5} \right\rangle \]
▲ Theorem 13.3 — Critical Points and the Second Derivative Test

A point \((a, b)\) in the domain of \(f\) is a critical point if \(\nabla f(a, b) = \langle 0, 0 \rangle\) or if either partial derivative fails to exist.

Let \(f\) have continuous second partial derivatives on a disk centered at critical point \((a, b)\) where \(\nabla f(a, b) = \mathbf{0}\). Define the Hessian discriminant:

\[ D = D(a, b) = f_{xx}(a, b)f_{yy}(a, b) - \big[f_{xy}(a, b)\big]^2 = \begin{vmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{vmatrix} \]

Classification Criteria:

  • If \(D > 0\) and \(f_{xx}(a, b) > 0\), then \(f(a, b)\) is a local minimum.
  • If \(D > 0\) and \(f_{xx}(a, b) < 0\), then \(f(a, b)\) is a local maximum.
  • If \(D < 0\), then \((a, b, f(a, b))\) is a saddle point.
  • If \(D = 0\), the test is inconclusive.
Worked Example 13.3 — Advanced: Classifying Multivariable Critical Points & Saddle Surfaces
Problem. Find and classify all local extrema and saddle points of \(f(x, y) = x^3 + y^3 - 3xy\).
▸ Show step-by-step solution

Step 1: Find critical points by setting \(\nabla f = \langle 0, 0 \rangle\).
\(f_x = 3x^2 - 3y = 0 \implies y = x^2\)
\(f_y = 3y^2 - 3x = 0 \implies x = y^2\)
Substitute \(y = x^2\) into the second equation: \(x = (x^2)^2 = x^4 \implies x^4 - x = 0 \implies x(x^3 - 1) = 0\).
Real roots: \(x = 0\) (giving \(y = 0\)) and \(x = 1\) (giving \(y = 1\)).
The two critical points are \((0, 0)\) and \((1, 1)\).

Step 2: Compute second partial derivatives and discriminant \(D\).
\(f_{xx} = 6x\), \(f_{yy} = 6y\), \(f_{xy} = -3\)
\[ D(x, y) = f_{xx}f_{yy} - (f_{xy})^2 = (6x)(6y) - (-3)^2 = 36xy - 9 \]

Step 3: Classify each critical point.
• At \((0, 0)\): \(D(0, 0) = 36(0) - 9 = -9 < 0\). Thus \((0, 0, 0)\) is a saddle point.
• At \((1, 1)\): \(D(1, 1) = 36(1)(1) - 9 = 27 > 0\) and \(f_{xx}(1, 1) = 6(1) = 6 > 0\). Thus \(f(1, 1) = 1 + 1 - 3 = -1\) is a local minimum.

⚠ Common Traps & Exam Pitfalls
Directional Derivative Requires a Unit Vector: The formula is \(D_{\mathbf{u}}f = \nabla f \cdot \mathbf{u}\). If given an arbitrary direction \(\mathbf{v}\), you MUST normalize: \(\mathbf{u} = \frac{\mathbf{v}}{|\mathbf{v}|}\). Forgetting to normalize scales the directional derivative by \(|\mathbf{v}|\) and produces an incorrect rate.

Gradient Geometric Meaning: \(\nabla f(a, b)\) points in the direction of maximum rate of increase, and its magnitude \(|\nabla f|\) is that maximum rate. Crucially, the gradient vector is ALWAYS orthogonal (perpendicular) to the level curve \(f(x, y) = c\) at that point.

Second Derivative Test Discriminant: \(D = f_{xx}f_{yy} - (f_{xy})^2\). If \(D < 0\), the point is a saddle point regardless of the sign of \(f_{xx}\). Do not check \(f_{xx}\) unless \(D > 0\) has already been established!
Level 3 · Advanced
Find the extreme values of \(f(x, y) = x^2 + 2y^2\) on the circle constraint \(g(x, y) = x^2 + y^2 = 1\) using the Method of Lagrange Multipliers.
💡 Hint 1 of 3
Set up Lagrange system \( \nabla f = \lambda \nabla g\): \( \nabla f = \langle 2x, 4y \rangle\), \( \nabla g = \langle 2x, 2y \rangle\).
💡 Hint 2 of 3
1) \(2x = 2\lambda x \implies 2x(1 - \lambda) = 0\) 2) \(4y = 2\lambda y \implies 2y(2 - \lambda) = 0\).
💡 Hint 3 of 3
Value: \(f(\pm 1, 0) = (\pm 1)^2 + 0\).
Set up Lagrange system \( \nabla f = \lambda \nabla g\):
\( \nabla f = \langle 2x, 4y \rangle\), \( \nabla g = \langle 2x, 2y \rangle\).
1) \(2x = 2\lambda x \implies 2x(1 - \lambda) = 0\)
2) \(4y = 2\lambda y \implies 2y(2 - \lambda) = 0\)
3) \(x^2 + y^2 = 1\)
From (1), either \(x = 0\) or \(\lambda = 1\):
• If \(x = 0\): from constraint (3), \(y^2 = 1 \implies y = \pm 1\). Points: \((0, 1)\) and \((0, -1)\).
Value: \(f(0, \pm 1) = 0 + 2(1)^2 = 2\).
• If \(\lambda = 1\): from (2), \(2y(2 - 1) = 2y = 0 \implies y = 0\).
From constraint (3), \(x^2 = 1 \implies x = \pm 1\). Points: \((1, 0)\) and \((-1, 0)\).
Value: \(f(\pm 1, 0) = (\pm 1)^2 + 0 = 1\).
Conclusion:
The maximum value is \(2\) at \((0, \pm 1)\), and the minimum value is \(1\) at \((\pm 1, 0)\).
[Practice 4 · Hard] The number \(e\) to 3 decimal places is approximately:
💡 Hint 1 of 3
Identify the core mathematical definition or theorem that governs the relationship in the prompt.
💡 Hint 2 of 3
Rewrite and simplify to obtain: \(e\).
💡 Hint 3 of 3
Apply this step to \(e\) and simplify to determine the final result.
\(e\approx2.718\).
One-sided limit: \(f(x)=|x|/x\). \(\lim_{x\to0^-}f(x)=\)
💡 Hint 1 of 3
Identify the governing mathematical relationship for the given quantities.
💡 Hint 2 of 3
Set up the numerical expression: \(|x|/x\).
💡 Hint 3 of 3
Evaluate \(|x|/x\) step by step to obtain the final answer.
Applying Limits and Continuity principles, For \(x<0\), \(|x|/x=-1\). Therefore, the verified correct option is \(-1\).

Partial Derivatives & the Gradient — 6-Mark Structured Problem

6 pts No Calculator
For Partial Derivatives & the Gradient, examine the quadratic-rate model \(f(x) = 4x^2 - 5x + 1\) on \(x \in [0, 3]\).
  1. (a)2 pts
    Compute \(f(0)\) and \(f(2)\).
    Scoring Guideline & Justification
    • [M1] Substitutes x=0 and x=2 (1 pt)
    • [A1] Obtains 1 and 7 (1 pt)
  2. (b)2 pts
    Find the derivative/rate \(f'(x)\) and critical point \(x_c\).
    Scoring Guideline & Justification
    • [M1] Differentiates to 8x - 5 (1 pt)
    • [A1] Solves x_c = 5/8 (1 pt)
  3. (c)2 pts
    Calculate the average rate of change from \(x = 0\) to \(x = 2\).
    Scoring Guideline & Justification
    • [M1] Applies (f(2) - f(0)) / 2 (1 pt)
    • [A1] Evaluates 3 (1 pt)
Complete Worked Solution
(a) \(f(0)=1, f(2)=7\). (b) \(f'(x)=8x-5 \implies x_c = \frac{5}{8}\). (c) Average rate \(= \frac{6}{2} = 3\).
📝 Chapter Quiz