Multivariable calculus
Gradient of e^x sin(y) cos(z): Separable Product
For f(x, y, z) = e^x sin(y) cos(z) the gradient is (e^x sin(y) cos(z), e^x cos(y) cos(z), -e^x sin(y) sin(z)). Each component differentiates exactly one factor and copies the other two. The x component equals the function itself. At (0, pi/2, 0) the gradient is (1, 0, 0).
A separable product: change one factor, copy the rest
This function is a product of three pieces, each depending on a single variable. That structure makes the gradient easy: in each component, differentiate the factor that owns that variable and leave the other two exactly as they are.
Since , the component is the original function again. That is a useful check: for this , everywhere.
Only the component picks up a sign, because .
The mistake: the lost minus sign, and the phantom product rule
Two errors dominate here. The first is writing without the minus. That single sign flips the direction of steepest ascent, so an otherwise perfect answer points the wrong way.
The second is applying the product rule across all three factors, producing a sum of three terms in every component. The product rule is only needed when more than one factor depends on the variable you are differentiating. Here exactly one does, so the other two are constants and their derivatives are zero.
- In , both and are constants, so no extra terms appear.
- Sign check: is positive in the formula, is negative.
- If a component of your gradient has three added terms, you have used the product rule where it was not needed.
Reading the gradient at a point
Take , where , and , so . This is a maximum of the trigonometric part.
The and components are zero because and : the trigonometric factors are each sitting at a peak, so a small move in or barely changes . Only growth in still pays, at rate 1.
The magnitude has a tidy closed form. Squaring and adding, the pair collapses and you are left with a two term expression.
Frequently asked questions
Why does equal itself?
Because the only dependence is the factor , which is its own derivative. Differentiating it reproduces the same product, so this function satisfies at every point.
Where is the gradient zero?
Where and at the same time, that is and . Since is never zero and and never vanish together, the middle component forces , and then the third component forces . The critical set is a grid of lines parallel to the -axis, and on all of them.