Multivariable calculus
Second partials of sin(x + y^2)
For f(x,y) = sin(x + y^2) the second partials are f_xx = -sin(x + y^2), f_xy = f_yx = -2y sin(x + y^2), and f_yy = 2 cos(x + y^2) - 4y^2 sin(x + y^2). Only f_yy needs the product rule, because the first partial 2y cos(x + y^2) has y in two places.
Second and mixed partials
One inner function, two different inner derivatives
The inside is . Its derivative is in the direction and in the direction, and that single difference drives everything on this page.
Because the inner derivative is , the direction behaves like a plain single variable sine wave: . Differentiating in pulls out the inner derivative .
The second derivative is the only one that needs the product rule, since has in the leading factor and inside the cosine.
The mistake: forgetting the term that comes from the 2y
Writing is the standard error. It applies the chain rule to the cosine and never differentiates the standing in front. Check it along the axis, where : the true value is , while the incomplete version gives for every , which would wrongly say the surface has no curvature in the direction anywhere along that line.
The reverse error also happens, keeping only and dropping the chain rule term. Both terms are real, and they compete: near the first dominates, while for large the factor takes over.
Nothing similar happens in the direction, because the inner derivative there is the constant . That asymmetry is the point of this example: the same outer function can need a product rule in one variable and not in the other.
Relations between the three second partials
Because everything is built from the same inner function, the three answers are tied together.
- , so the cross sections are ordinary sine waves.
- , the mixed partial is the pure curvature scaled by the inner derivative .
- , one term from differentiating the and one from the chain rule.
Clairaut symmetry holds: differentiating in leaves the constant alone and turns the cosine into , giving , the same mixed partial found the other way.
The level curves are the parabolas , so the whole surface is one sine wave bent along parabolic ridges. That is why the mixed partial carries a factor of : the ridges tilt more steeply the further you go from the axis.
Frequently asked questions
Why does only f_yy need the product rule?
Because the inner derivative in is , which is itself a function of , so is a genuine product. The inner derivative in is the constant , so has nothing to apply the product rule to.
What is the mixed partial of sin(x + y^2)?
It is , in either order. Note that it vanishes on the whole axis, where , so along that line the Hessian is diagonal: the surface has no twist there, only pure curvature along and along .