Multivariable calculus

Partials of sin(x) / (2 + cos(y))

For f(x, y) = sin(x) divided by 2 plus cos(y), the partial derivative with respect to x is cos(x) over 2 plus cos(y), and the partial derivative with respect to y is sin(x)sin(y) divided by the square of 2 plus cos(y). The denominator never reaches zero, so both partials are defined everywhere.

f(x,y)=sinx2+cosyf(x,y) = \frac{\sin x}{2 + \cos y}
fx=cosx2+cosy\frac{\partial f}{\partial x} = \frac{\cos x}{2 + \cos y}
fy=sinxsiny(2+cosy)2\frac{\partial f}{\partial y} = \frac{\sin x \sin y}{(2 + \cos y)^2}

Only one of the two partials needs the quotient rule

With yy held fixed the denominator is a constant, so the function is a constant multiple of sinx\sin x and no quotient rule is needed.

fx=12+cosyddxsinx=cosx2+cosy\frac{\partial f}{\partial x} = \frac{1}{2+\cos y}\cdot\frac{d}{dx}\sin x = \frac{\cos x}{2+\cos y}

With xx held fixed the numerator is the constant. Write f=sinx(2+cosy)1f = \sin x\,(2+\cos y)^{-1} and use the power rule, which is faster than the full quotient rule here.

fy=sinx(1)(2+cosy)2(siny)=sinxsiny(2+cosy)2\frac{\partial f}{\partial y} = \sin x\cdot(-1)(2+\cos y)^{-2}\cdot(-\sin y) = \frac{\sin x\sin y}{(2+\cos y)^2}

Two minus signs multiply to a plus, one from the power rule and one from the derivative of cosine. At the origin the partials are 13\frac{1}{3} and 00.

The mistake: one minus sign too many or too few

Almost every wrong answer for fy\frac{\partial f}{\partial y} here is off by a sign. Track the two sources separately. Rewriting as a negative power contributes a factor 1-1. Differentiating the inside 2+cosy2 + \cos y contributes siny-\sin y. Their product is positive.

  • Verify numerically at x=π2x = \frac{\pi}{2}, y=π2y = \frac{\pi}{2}: the denominator is 22, so f=12f = \frac{1}{2}. Nudging yy up to 1.61.6 makes cosy\cos y smaller, the denominator smaller, and ff larger, so fy\frac{\partial f}{\partial y} must be positive there. The formula gives 114=0.25>0\frac{1\cdot 1}{4} = 0.25 > 0.
  • A second slip is applying the quotient rule to fx\frac{\partial f}{\partial x} and writing a numerator term for the derivative of the denominator. That term is zero, since 2+cosy2 + \cos y has no xx in it.

Why the denominator is safe

Since cosy\cos y lies between 1-1 and 11, the denominator 2+cosy2 + \cos y lies between 11 and 33. It never touches zero, so the function and both partials are smooth on the entire plane. That is the reason for the 22: with cosy\cos y alone in the denominator the function would blow up along infinitely many lines.

Critical points come from setting both partials to zero. The first needs cosx=0\cos x = 0, so xx is an odd multiple of π2\frac{\pi}{2}, and there sinx=±1\sin x = \pm 1. The second then needs siny=0\sin y = 0, so yy is a multiple of π\pi. Those points are the peaks and valleys of the surface, with heights ±1\pm 1 and ±13\pm\frac{1}{3}.

Frequently asked questions

Can I use the quotient rule for the y partial instead?

Yes, and you get the same thing. With numerator sinx\sin x and denominator 2+cosy2+\cos y, the rule gives 0(2+cosy)sinx(siny)(2+cosy)2\frac{0\cdot(2+\cos y) - \sin x(-\sin y)}{(2+\cos y)^2}, which simplifies to sinxsiny(2+cosy)2\frac{\sin x\sin y}{(2+\cos y)^2}.

Where is the surface steepest in the x direction?

fx=cosx2+cosy\frac{\partial f}{\partial x} = \frac{\cos x}{2+\cos y} is largest in size when cosx=1\lvert\cos x\rvert = 1 and the denominator is smallest, which needs cosy=1\cos y = -1. At x=0x = 0, y=πy = \pi the slope is 11.