Gradient and directional derivatives
Problem 10.21 · medium
Find the directional derivative of \( \displaystyle f(x, y) = x^{2} + 3 x y + y^{2} \) at \( \displaystyle (-1, 1) \) in the direction of \( \displaystyle \langle 5, 12 \rangle \).
- \[ \left[\begin{matrix}\frac{\partial}{\partial x} \left(x^{2} + 3 x y + y^{2}\right)\\\frac{\partial}{\partial y} \left(x^{2} + 3 x y + y^{2}\right)\end{matrix}\right] = \left[\begin{matrix}2 x + 3 y\\3 x + 2 y\end{matrix}\right] \]∇f.✓ Proved
- \[ \left[\begin{matrix}1\\-1\end{matrix}\right] \]∇f at the point.✓ Proved
- \[ \left[\begin{matrix}\frac{5}{13}\\\frac{12}{13}\end{matrix}\right] \]The unit direction u.✓ Proved
- \[ - \frac{7}{13} \]D_u f = ∇f · u.✓ Proved
Answer \( - \frac{7}{13} \)
Every line of this solution was proved by the computer algebra system SymPy. The answer was also checked a second way, without looking at the solution. The explanation has not been reviewed yet.
The full receipt
| Line | Status | Checked by | Detail |
|---|---|---|---|
| 1 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| 2 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| 3 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| 4 | ✓ Proved | sympy 1.14.0 | simplify(lhs - rhs) reduced to 0 |
| answer, a second way | ✓ Checked independently | sympy 1.14.0 + mpmath 1.3.0 | f differenced along the unit direction agrees |
Proved: SymPy reduced the difference between the two sides to zero. Checked independently: a separate
method, named above, confirmed it. Checked numerically: the two sides agree at every sampled point, which is evidence,
not proof. Reviewed: a model or a person read it; that is all a sentence can have. Solution by
generator:structured/gradient_directional, checked 2026-09-26 with SymPy 1.14.0.