Multivariable calculus
Partial Derivatives of sin(x + 2y)
For f(x, y) = sin(x + 2y), the partial derivative with respect to x is cos(x + 2y), and the partial derivative with respect to y is 2 cos(x + 2y). Both partials share the same cosine because the inside is the same; only the inside derivative differs, and it is 1 for x and 2 for y.
A linear inside makes the chain rule easy
Let . Since is linear, its partials are constants: and . The outside derivative is in both cases.
So is exactly twice at every point. At the origin they are and . Moving in changes the phase twice as fast as moving in , so the surface is twice as steep in that direction.
The mistake: putting the 2 in the wrong place
The two wrong answers you see most are , which differentiates the inside as if it were a product, and , which moves the coefficient inside the cosine. The inside function is not touched by differentiation, only evaluated.
- The inside stays in every answer. Only the multiplier out front can change.
- The multiplier is the partial derivative of the inside, and , not .
- Sanity check by restricting to : the function is , whose derivative is , and setting in gives the same.
A wave moving through the plane
The level curves are the lines , and the function is a wave crest sliding along the direction . Differentiating twice gives and , so the second derivatives are locked together.
Reading as time, this is the wave equation with speed : a crest sits where , so each unit of moves it two units in the negative direction. Every function of the form satisfies the same relation, which is how you recognise a travelling wave from its partial derivatives alone.
Frequently asked questions
Why do both partials have the same cosine factor?
Because the chain rule evaluates the outside derivative at the same inside value no matter which variable you differentiate by. Only the inside derivative, or , distinguishes them.
Is the gradient constant in direction?
Yes. , so the gradient always points along or against it. It reverses sign where the cosine does, which is at the crests and troughs.