Multivariable calculus

Critical Points of cos x + cos y + cos(x+y)

For f(x,y) = cos x + cos y + cos(x+y) the origin is a local maximum with D = 3 and value 3. The point (2pi/3, 2pi/3) is a local minimum with D = 0.75 and value -1.5. The point (pi, pi) is a saddle with D = -1. The surface has period 2pi in each variable, so every one of these repeats on a grid.

f(x,y)=cosx+cosy+cos(x+y)f(x,y) = \cos x + \cos y + \cos(x+y)
  • (0,0)\left(0, 0\right) local maximumdiscriminant D = 3
  • (2.0943951023931953,2.0943951023931953)\left(2.0943951023931953, 2.0943951023931953\right) local minimumdiscriminant D = 0.75
  • (3.141592653589793,3.141592653589793)\left(3.141592653589793, 3.141592653589793\right) saddle pointdiscriminant D = -1

These are not necessarily all of them; the page says which it covers.

Subtract the two equations before you solve either

Both partials inherit a term from cos(x+y)\cos(x+y), and since the inside derivative is 1 in each variable, that term is identical in the two equations.

fx=sinxsin(x+y),fy=sinysin(x+y)\frac{\partial f}{\partial x} = -\sin x - \sin(x+y), \qquad \frac{\partial f}{\partial y} = -\sin y - \sin(x+y)

Subtracting kills the shared term and leaves a relation between xx and yy alone. That is the move worth remembering whenever a coupled system shares a piece: subtract first, substitute second.

sinx=siny    y=x  or  y=πx(mod2π)\sin x = \sin y \implies y = x \ \text{ or } \ y = \pi - x \pmod{2\pi}

On the branch y=xy = x, the first equation becomes sinx+sin2x=0\sin x + \sin 2x = 0. Replace sin2x\sin 2x with 2sinxcosx2 \sin x \cos x and the whole thing factors.

sinx(1+2cosx)=0    sinx=0  or  cosx=12\sin x \, (1 + 2\cos x) = 0 \implies \sin x = 0 \ \text{ or } \ \cos x = -\tfrac{1}{2}

That gives x=0x = 0, x=πx = \pi and x=±2π3x = \pm\frac{2\pi}{3} along the diagonal. On the other branch, y=πxy = \pi - x makes sin(x+y)=sinπ=0\sin(x+y) = \sin\pi = 0, so the equation reduces to sinx=0\sin x = 0 and produces two more saddles at (0,π)(0, \pi) and (π,0)(\pi, 0).

Three different verdicts from the same formulas

Every second partial is a cosine, so the arithmetic at each point is a matter of reading three values off the unit circle.

fxx=cosxcos(x+y),fyy=cosycos(x+y),fxy=cos(x+y)f_{xx} = -\cos x - \cos(x+y), \qquad f_{yy} = -\cos y - \cos(x+y), \qquad f_{xy} = -\cos(x+y)

At the origin every cosine equals 1, so fxx=fyy=2f_{xx} = f_{yy} = -2 and fxy=1f_{xy} = -1. Then D=41=3>0D = 4 - 1 = 3 > 0 with fxx<0f_{xx} < 0, a local maximum. The value f(0,0)=3f(0,0) = 3 is the global maximum as well, since no cosine can exceed 1 and all three reach it together at the origin. Every translate by 2π2\pi in either variable does the same thing, so the global maximum is attained at infinitely many points, all at height 3.

At (2π3,2π3)\left(\frac{2\pi}{3}, \frac{2\pi}{3}\right) we have cos2π3=12\cos\frac{2\pi}{3} = -\frac{1}{2} and cos4π3=12\cos\frac{4\pi}{3} = -\frac{1}{2}, so fxx=fyy=1f_{xx} = f_{yy} = 1 and fxy=12f_{xy} = \frac{1}{2}.

D=(1)(1)(12)2=34>0,fxx=1>0D = (1)(1) - \left(\tfrac{1}{2}\right)^{2} = \tfrac{3}{4} > 0, \qquad f_{xx} = 1 > 0

That is a local minimum with f=32f = -\frac{3}{2}. At (π,π)(\pi, \pi), cosπ=1\cos\pi = -1 and cos2π=1\cos 2\pi = 1, so fxx=fyy=0f_{xx} = f_{yy} = 0 while fxy=1f_{xy} = -1, and D=1D = -1: a saddle.

The mistake students make

Seeing fxx=0f_{xx} = 0 and fyy=0f_{yy} = 0 at (π,π)(\pi, \pi), students often report the test as inconclusive. Inconclusive means D=0D = 0, not fxx=0f_{xx} = 0. When both diagonal entries vanish, D=fxy2D = -f_{xy}^{2}, which is negative unless the mixed partial is also zero. Here fxy=1f_{xy} = -1, so D=1D = -1 and the answer is a saddle with no ambiguity at all.

The other slip is stopping after the diagonal branch. Subtracting the partials gives sinx=siny\sin x = \sin y, and sine is not one to one: y=πxy = \pi - x solves it just as well as y=xy = x. Dropping that branch loses the saddles at (0,π)(0, \pi) and (π,0)(\pi, 0) completely. Those two are easy to confirm by substitution: at (0,π)(0, \pi), fx=sin0sinπ=0f_x = -\sin 0 - \sin\pi = 0 and fy=sinπsinπ=0f_y = -\sin\pi - \sin\pi = 0, so it is a genuine critical point that the diagonal branch never produces.

  • Subtract the two equations to get sinx=siny\sin x = \sin y.
  • Keep both branches, y=xy = x and y=πxy = \pi - x.
  • Substitute each branch back into one of the original equations.
  • Add 2π2\pi to either variable to generate every remaining copy.

Frequently asked questions

Is this a complete list of the critical points?

No, and it cannot be. ff has period 2π2\pi in xx and in yy, so shifting any critical point by 2π2\pi in either variable produces another one. The three points on this page are representatives of the three behaviours. One full period also contains the local minimum at (2π3,2π3)\left(-\frac{2\pi}{3}, -\frac{2\pi}{3}\right) and the saddles at (0,π)(0, \pi) and (π,0)(\pi, 0).

Why subtract the equations rather than solving one of them directly?

Because sinxsin(x+y)=0-\sin x - \sin(x+y) = 0 still has both unknowns tangled inside a sine, and there is no clean way to isolate either. Subtracting removes sin(x+y)\sin(x+y), the only term the two equations have in common, and what is left relates xx to yy directly. You then substitute that relation into one original equation and face a single variable problem.