Multivariable calculus
Gradient of sin(x + 2y + 3z): A Fixed Direction
For f(x, y, z) = sin(x + 2y + 3z) the gradient is cos(x + 2y + 3z) times the fixed vector (1, 2, 3). Every component shares the same cosine factor, and the coefficients 1, 2 and 3 come from the chain rule. At the origin the gradient is (1, 2, 3), of length about 3.742.
One outer derivative, three inner derivatives
Set . The outer function is , whose derivative is no matter which variable you are differentiating. What changes from component to component is the inner derivative.
Multiply the shared outer factor by each inner derivative in turn.
Factoring the cosine out shows the structure at a glance. The gradient is always a scalar multiple of , so its direction is fixed up to sign for the whole of space.
The mistake: losing the coefficients 2 and 3
Writing is the standard error. It comes from treating as and stopping, which skips the inner derivative. Those coefficients are the whole point: responds three times as strongly to a change in as to the same change in .
- Rewrite the argument first if it helps: has inner function , and is not 1.
- A quick test: at the origin the true rate in the direction is 3, so a small step of 0.01 in changes by about 0.03, not 0.01.
- The reverse error, attaching the coefficients to the argument as in , changes the function rather than the derivative.
Level surfaces are parallel planes
At the origin, and , so the gradient takes its largest possible size.
The level surfaces are stacks of parallel planes , and is the normal vector to those planes. This matches the general rule that the gradient is perpendicular to level surfaces, and here it is visible directly in the coefficients.
The gradient vanishes where , that is on the planes . Those are the crests and troughs of the wave, entire planes of critical points where .
Frequently asked questions
Why is the direction of steepest ascent the same everywhere?
Because every component carries the same cosine factor, so is always a multiple of . When the cosine is positive, steepest ascent is . When it is negative, ascent points the opposite way.
What is the largest rate of change this function ever has?
It is , reached wherever , which happens on the planes . There , so the wave is steepest as it crosses zero.