Multivariable calculus
Partial Derivatives of cos(x^2 + y^2)
For f(x, y) = cos(x squared plus y squared), the partial derivative with respect to x is negative 2x sin(x squared plus y squared), and the partial derivative with respect to y is negative 2y sin(x squared plus y squared). The chain rule contributes the minus sign from cosine and the factor 2x or 2y from the inside.
Chain rule with a two variable inside
Set . The outside derivative is , and it is the same for both partials. Only the inside derivative changes.
Multiply the two pieces together for each variable.
At the inside is , so both partials equal . Equal partials are no accident here: the point sits on the diagonal, and the surface is rotationally symmetric.
The mistake: losing the inside derivative or the sign
Two errors dominate. The first is writing with no factor of , which forgets that the inside is not simply . The second is writing with the sign of the cosine derivative dropped.
- Test the sign at , : the inside is , , so . The ripple is heading downhill away from the central crest, which matches.
- Test the missing factor along the axis: at the function is even in , so must be zero, and only the version carrying gives that.
The gradient lies along the radius
Collect the two partials into one vector.
The gradient is always a scalar multiple of the position vector , so it is radial. The sign of that multiple flips with the sine: the gradient points straight out from the origin where and straight back in where the sine is positive. That is the analytic version of the statement that the level curves are circles , and the gradient is perpendicular to them.
One consequence is worth memorising as a check: everywhere, because both partials share the same sine factor and differ only by against . Any function of alone satisfies that identity.
Frequently asked questions
Why do the ripples get steeper as you move outward?
The magnitude of the gradient is . The factor grows with distance, so each successive ring is squeezed into a narrower band and the slopes rise.
Where is the surface flat?
Both partials vanish when or when , that is on the circles for positive integers . Those circles are the crests and troughs of the ripple.