Recipe
Find a directional derivative and the direction of steepest ascent
Use when: you have f(x,y) and a point, and need either the rate of change in one specific given direction, or the direction and rate that give the fastest possible increase
Goal: a single number D_{\mathbf u}f for a given direction, or a unit vector and its matching maximum rate for steepest ascent
Taught in The gradient as the direction of steepest ascent
Quick recipe
-
1
Find f_x, f_y, and evaluate both at the given point to get \nabla f as one fixed vector.
Example
For f(x,y)=3x+2y^2 at (0,1): f_x=3 (constant), and f_y=4y\Rightarrow f_y(0,1)=4. So \nabla f(0,1)=\langle3,4\rangle.
Why: every later step in this recipe, whichever branch it takes, starts from this one fixed vector.
-
2
Reread the problem to see whether it names one specific direction or asks for the steepest one.
- a specific direction is given, as a vector, an angle, or "toward point Q" — continue to the next step to compute D_{\mathbf u}f in that one direction.
- the question asks for the direction and rate of steepest ascent, with no direction specified — skip ahead to the step after next; there is no dot product to compute.
Why: a given direction and "the steepest one" are different questions with different remaining work, even though both start from the same gradient.
-
3
Turn the given direction into a unit vector of length 1, then compute D_{\mathbf u}f=\nabla f\cdot\mathbf u.
Example
Given the direction toward (4,1) from (0,1): the direction vector is \langle4,0\rangle, length 4, so \mathbf u=\langle1,0\rangle. Then D_{\mathbf u}f=\langle3,4\rangle\cdot\langle1,0\rangle=3.
Why: only a unit vector makes D_{\mathbf u}f a genuine rate per unit distance, and the dot product with \nabla f is exactly the formula the last two sections derived.
-
4
No dot product is needed here. The direction of steepest ascent is \nabla f divided by its own length, and that same length is the maximum possible rate in any direction. If the question also asks for steepest DESCENT, negate this step's direction to get -\nabla f/|\nabla f|, with rate -|\nabla f|, the most negative rate available.
Example
|\nabla f(0,1)|=\sqrt{3^2+4^2}=5. Steepest-ascent direction: \langle3,4\rangle/5=\langle3/5,4/5\rangle. Steepest rate: 5, larger than the 3 found for the other direction in the previous step.
Why: a dot product between a fixed vector and a unit vector is largest exactly when the two point the same way, which makes \nabla f's own direction, not some other vector, the answer.
Common mistakes
- Forgetting to normalize the given direction before dotting it with the gradient.
- Reporting the un-normalized gradient itself as the "direction" of steepest ascent instead of dividing by its length.
- Confusing steepest ascent's rate, |\nabla f|, with D_{\mathbf u}f for whatever direction the problem happened to state. The stated direction gives a smaller rate unless it already is the gradient's own direction.
- Assuming steepest descent needs a fresh computation instead of just negating the steepest-ascent answer.