Multivariable calculus

Critical Points of cos(x) + y^2

Every critical point of f(x,y) = cos x + y squared has y = 0 and x an integer multiple of pi. At even multiples, such as the origin, D = -2 and the point is a saddle. At odd multiples, such as (pi, 0), D = 2 with f_xx = 1, a local minimum of value -1. This surface has no local maximum anywhere.

f(x,y)=cosx+y2f(x,y) = \cos x + y^{2}
  • (0,0)\left(0, 0\right) saddle pointdiscriminant D = -2
  • (3.141592653589793,0)\left(3.141592653589793, 0\right) local minimumdiscriminant D = 2

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

A separable surface makes the search short

Each variable appears in its own term, so each partial derivative sees only one of them.

fx=sinx,fy=2y\frac{\partial f}{\partial x} = -\sin x, \qquad \frac{\partial f}{\partial y} = 2y

The second equation gives y=0y = 0 and nothing else. The first gives sinx=0\sin x = 0, so x=kπx = k\pi for any integer kk. The critical points are the evenly spaced dots (kπ,0)(k\pi, 0) marching along the xx-axis, infinitely many of them, so no finite list can be complete.

The second partials are just as short, and the mixed one is identically zero because no term contains both variables.

fxx=cosx,fyy=2,fxy=0f_{xx} = -\cos x, \qquad f_{yy} = 2, \qquad f_{xy} = 0

With fxy=0f_{xy} = 0 the discriminant is simply the product of the diagonal entries: D=2cosxD = -2\cos x. Since cos(kπ)\cos(k\pi) alternates between 11 and 1-1, so does the verdict.

Why this surface has no local maximum

At even multiples of π\pi, including the origin, cosx=1\cos x = 1, so fxx=1f_{xx} = -1 and D=2<0D = -2 < 0: a saddle. At odd multiples, cosx=1\cos x = -1, so fxx=1f_{xx} = 1 and D=2>0D = 2 > 0 with a positive diagonal entry: a local minimum with f=1f = -1.

Notice what never happens. A local maximum needs D>0D > 0 together with fxx<0f_{xx} < 0. Here D=2fxxD = 2 f_{xx}, because fyy=2f_{yy} = 2 is a positive constant and fxy=0f_{xy} = 0. So DD and fxxf_{xx} always carry the same sign, and D>0D > 0 forces fxx>0f_{xx} > 0. The pair of conditions a maximum needs is impossible on this surface.

D=fxxfyyfxy2=2fxx    D>0    fxx>0D = f_{xx}f_{yy} - f_{xy}^{2} = 2f_{xx} \implies D > 0 \iff f_{xx} > 0

The geometry agrees. Fixing xx and letting yy run, ff grows without bound like y2y^{2}, so every point sits at the bottom of an upward parabola in the yy direction. Nothing can be a maximum when one direction always climbs. The local minima at (π+2kπ,0)(\pi + 2k\pi, 0) are also global minima, since cosx1\cos x \ge -1 and y20y^{2} \ge 0 give f1f \ge -1.

The mistake students make

The origin gets called a maximum more often than any other point on this surface, and the reasoning is always the same: cosx\cos x has a maximum at x=0x = 0, so surely ff does too. That confuses a one variable maximum with a two variable one. Along the xx-axis the origin really is a peak, but along the yy-axis it is the bottom of a valley, since f(0,y)=1+y2f(0, y) = 1 + y^{2} increases in both directions.

  • f(x,0)=cosxf(x, 0) = \cos x near x=0x = 0 is a local maximum in that direction.
  • f(0,y)=1+y2f(0, y) = 1 + y^{2} near y=0y = 0 is a local minimum in that direction.
  • Up in one direction and down in another is the definition of a saddle, which is why D=2<0D = -2 < 0.

The other slip is forgetting that sinx=0\sin x = 0 has infinitely many solutions and reporting only x=0x = 0. Every x=kπx = k\pi works, and the classification alternates: even kk gives a saddle, odd kk gives a minimum. Writing the general solution as x=kπx = k\pi rather than as a couple of specific values is what keeps the pattern visible.

Frequently asked questions

Does f have a global minimum?

Yes, and every local minimum is one. Since cosx1\cos x \ge -1 and y20y^{2} \ge 0, the value f=cosx+y2f = \cos x + y^{2} is never below 1-1, and it equals 1-1 exactly at the points (π+2kπ,0)(\pi + 2k\pi, 0). There are infinitely many global minimisers, all at the same height, which is normal for a surface that is periodic in one variable.

Why is f_xy zero, and does that always simplify the test?

It is zero because no single term of ff contains both xx and yy, so differentiating in xx leaves nothing for the yy derivative to act on. When fxy=0f_{xy} = 0 the discriminant reduces to fxxfyyf_{xx}f_{yy}, and the classification is just a question of whether the two one variable second derivatives agree in sign. That shortcut only applies to separable functions; as soon as a term mixes the variables, the mixed partial matters.