Multivariable calculus

Partial Derivatives of sin^2(x) + cos^2(y)

For f(x, y) = sin squared of x plus cos squared of y, the partial derivative with respect to x is 2 sin(x)cos(x), which equals sin(2x), and the partial derivative with respect to y is negative 2 cos(y)sin(y), which equals negative sin(2y). Each term contains only one variable, so each partial sees just one term.

f(x,y)=sin2x+cos2yf(x,y) = \sin^2 x + \cos^2 y
fx=2sinxcosx=sin2x\frac{\partial f}{\partial x} = 2\sin x\cos x = \sin 2x
fy=2cosysiny=sin2y\frac{\partial f}{\partial y} = -2\cos y\sin y = -\sin 2y

Separated variables make each partial a one term job

The function is a sum where the first term has only xx and the second only yy. Differentiating with respect to xx kills cos2y\cos^2 y outright, since a term with no xx in it is a constant.

fx=ddx(sinx)2=2sinxcosx=sin2x\frac{\partial f}{\partial x} = \frac{d}{dx}\left(\sin x\right)^2 = 2\sin x\cos x = \sin 2x

The power rule supplies the factor 2sinx2\sin x and the chain rule supplies cosx\cos x. The same structure on the other term gives 2cosy2\cos y times the derivative of cosine, which is where the minus sign comes from.

fy=2cosy(siny)=sin2y\frac{\partial f}{\partial y} = 2\cos y\cdot(-\sin y) = -\sin 2y

At (π4,π4)\left(\frac{\pi}{4}, \frac{\pi}{4}\right) the partials are sinπ2=1\sin\frac{\pi}{2} = 1 and sinπ2=1-\sin\frac{\pi}{2} = -1, so the surface rises in xx and falls in yy at the same rate.

The mistake: reaching for sin^2 + cos^2 = 1

The Pythagorean identity needs the same angle in both terms. Here the arguments are xx and yy, so sin2x+cos2y\sin^2 x + \cos^2 y is not 11 and the function is not constant. At x=0x = 0, y=0y = 0 it equals 11, but at x=π2x = \frac{\pi}{2}, y=0y = 0 it equals 22, and at x=0x = 0, y=π2y = \frac{\pi}{2} it equals 00.

  • Check the arguments match before applying any trigonometric identity.
  • The values of this function fill the range from 00 to 22, so it is far from constant.
  • If the identity did apply, ff would be constant and both partials would be zero everywhere, yet fx=1\frac{\partial f}{\partial x} = 1 at (π4,π4)\left(\frac{\pi}{4},\frac{\pi}{4}\right).

Critical points and the mixed partial

Both partials vanish when sin2x=0\sin 2x = 0 and sin2y=0\sin 2y = 0, that is when xx and yy are integer multiples of π2\frac{\pi}{2}. The critical points form a lattice across the plane.

Because no term contains both variables, the mixed partial is zero everywhere: 2fxy=0\frac{\partial^2 f}{\partial x\,\partial y} = 0. That makes the second derivative test easy, since the discriminant is just 2fx22fy2\frac{\partial^2 f}{\partial x^2}\cdot\frac{\partial^2 f}{\partial y^2} with 2fx2=2cos2x\frac{\partial^2 f}{\partial x^2} = 2\cos 2x and 2fy2=2cos2y\frac{\partial^2 f}{\partial y^2} = -2\cos 2y.

At (0,0)(0,0) that gives 2(2)=4<02 \cdot (-2) = -4 < 0, so the origin is a saddle. Minimum in one direction, maximum in the other, which is exactly what a sum of two independent oscillations produces.

Frequently asked questions

Is sin^2(x) the same as sin(x^2)?

No. sin2x\sin^2 x means (sinx)2(\sin x)^2, while sin(x2)\sin(x^2) squares the input first. Their derivatives differ too: 2sinxcosx2\sin x\cos x against 2xcos(x2)2x\cos(x^2).

Why write the answers as sin(2x) and negative sin(2y)?

The double angle identity sin2θ=2sinθcosθ\sin 2\theta = 2\sin\theta\cos\theta compresses each answer into one term, which makes the zeros easy to read off and the second derivatives quicker to take.