Multivariable calculus
Directional derivative of sin(xy) at (0, 2)
At (0, 2) the gradient of f(x,y) = sin(xy) is (2, 0), since the x partial is y cos(xy) and the y partial is x cos(xy). Dotting with the unit direction (0.6, -0.8) gives 6/5, that is 1.2. Only the x component contributes, because the y partial vanishes when x = 0.
At x = 0, y = 2, in the unit direction (0.6, -0.8).
Differentiate, then substitute
The chain rule gives times the partial of the product , which is in the slot and in the slot. Do that in general first, and only then put in the point.
At the argument is 0, so . The partial is and the partial is .
The mistake: substituting before you differentiate
Set first and collapses to for every . The zero function has zero derivative, so this route reports a directional derivative of 0, which is wrong by 1.2.
What went missing is the change in caused by moving off the line . Restricting to that line before differentiating throws away exactly the information the partial carries. Substitution is the last step, never the first.
The honest statement is narrower: the derivative of along the axis is 0 at this point, and that is why the in the direction contributes nothing here.
What the number says about the surface
The steepest ascent at is straight along the positive axis, at rate . Our direction is about 53.1 degrees away from that, and since is exactly 0.6 the rate is .
- Fastest increase: direction , rate 2
- Fastest decrease: direction , rate
- No change: directions , straight up or down the axis
The build re-checks that (0.6, -0.8) has length 1, rebuilds the gradient of sin(xy) at (0, 2) by central differences on the function itself, and fails unless the dot product is still 1.2.
Frequently asked questions
Why does the y part of the direction not matter at this point?
Because is 0 when . Any unit direction with the same component gives the same answer at , no matter what its component is.
Is the answer still 1.2 at a nearby point like (0.1, 2)?
No. There the gradient is about , and the dot product with is about 1.098. A directional derivative is a statement about one point only.