You learn to find the critical points of a function of two variables, to classify them as local maximum, local minimum and saddle point with the second derivative test (the discriminant D), and to reduce application problems to a single variable.
In single-variable calculus you found the points where f′(x)=0 and looked at the sign of f′′. In two variables the idea is the same but with two differences: to find critical points you solve two equations at once, and the second derivative test is done not with a single number but with the discriminantD, which combines the second derivatives. A new type of point also appears: the saddle point, which behaves like a minimum in one direction and a maximum in another. In the exam this topic almost always comes as a “find and classify all critical points” question; the real points come from solving the system of equations completely.
Golden rules:
Critical point: fx=0andfy=0. When solving the system, factor; do not lose roots by dividing.
Compute D=fxxfyy−fxy2 separately at each critical point.
If D<0 it is a saddle; if D>0 look at the sign of fxx. If D=0 the test is silent.
In the answer write the point, its type and the function value.
Definitions
If f satisfies f(x,y)≤f(a,b) at all points around (a,b), then (a,b) is a local maximum; if it satisfies f(x,y)≥f(a,b), it is a local minimum.
Theorem (first derivative). If f has a local extremum at (a,b) and the partial derivatives exist, then fx(a,b)=0 and fy(a,b)=0. That is, ∇f=0 and the tangent plane is horizontal.
Points where ∇f=0 (or where one of the partial derivatives is undefined) are called critical points. Every extremum is a critical point, but not every critical point is an extremum.
Saddle point. A critical point that is not an extremum. The classic example is z=y2−x2 (hyperbolic paraboloid): at the origin a maximum along the x axis and a minimum along the y axis. Like the middle of a horse saddle.
The second derivative test
Let (a,b) be a critical point and the second derivatives be continuous.
Intuition.D>0 means the surface bends to the same side in all directions at the critical point; either a bowl (min) or an upside-down bowl (max). The curvature in any direction, for example fxx, tells which. D<0 means that it bends up in some directions and down in others: a saddle. The fxy term accounts for curvature in mixed directions; even if fxx and fyy are both positive, if fxy is large the point can be a saddle.
PITFALL · saying min/max just because fxx and fyy have the same sign.f=x2+4xy+y2: fxx=2>0, fyy=2>0, but fxy=4 and D=4−16=−12<0. The origin is a saddle. Along the line y=−x, f=−2x2, going down. Do not decide without computing D.
Solved examples
Example 1 (a single critical point).f(x,y)=x2+2y2−4x+4y+1.
Example 2 (two critical points).f(x,y)=xy−3x3−2y2.
fx=y−x2=0 and fy=x−y=0. From the second, y=x; plug into the first: x−x2=x(1−x)=0. The points are (0,0) and (1,1).
Second derivatives: fxx=−2x, fyy=−1, fxy=1, D=2x−1.
Point
D
fxx
Type
f
(0,0)
−1
0
saddle
0
(1,1)
1
−2
local max
1−31−21=61
TIP · do not lose roots. If you divide the equation x−x2=0 by x and write x=1, you lose (0,0). Always factor: x(1−x)=0. The equations x4=x, x9=x in Q4 and Q6 are the same trap.
Strategies for solving systems
Type of system
Strategy
Both linear
Substitution or elimination
One is easily put in the form y=g(x)
Plug into the other, a single-variable equation
Symmetric (the same when x↔y)
Try the cases y=x and y=−x, but also look for other solutions
In product form (x(…)=0)
Set each factor to zero separately, combine the cases
Example 3 (D=0).f=x4−y4, at the origin all second derivatives are 0, D=0. The test is silent. Look at paths: on the x axis f=x4≥0, on the y axis f=−y4≤0. In every neighborhood of the origin there are both positive and negative values: a saddle. In the same situation x4+y4 is a minimum and −(x4+y4) a maximum. So when D=0 anything can happen.
Application problems
Optimization problems usually have three variables and one constraint. Use the constraint to eliminate a variable, reduce to a two-variable function, then apply the test on this page.
1) What are you optimizing? (area, volume, distance, cost) → formula2) Constraint: xyz = V, x + y + z = k, the point is on a plane ... → pull out z3) Build the two-variable function, find the critical point4) Confirm with D that it is a min/max (or physically it is the only candidate)5) Compute the third variable and the requested value
The distance trick. When looking for the closest point to a point, minimize the square of the distance, not …. Since the root is an increasing function, the minimum is at the same point and the derivatives come out much cleaner.
Next week we will see how to solve the same problems without eliminating variables, with Lagrange multipliers, and how to find absolute extrema on closed regions.
Common mistakes
Wrong
Correct
Dividing by x while solving the system
Factor, keep the solution x=0
Computing D once and applying it to every point
Separately at each critical point
If D>0 it is always a minimum
Look at the sign of fxx
If D=0 it is a saddle
No result; examine directly
Not taking fxy twice in the D formula
fxxfyy−fxy2
Writing only the point
The type and the f value are also asked
Forgetting the third dimension in an application
Compute z back from the constraint
Differentiating the distance with the root
Minimize its square
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Question 1easy
Find and classify the critical point of f(x,y)=x2+y2−4x+6y.
Show answer
Local min at (2,−3), f=−13
fx=2x−4=0, fy=2y+6=0: (2,−3).fxx=2, fyy=2, fxy=0, D=4>0, fxx>0: local minimum.f(2,−3)=4+9−8−18=−13. (If you complete the square you get (x−2)2+(y+3)2−13, the same result.)
Question 2easy
Classify the critical point of f(x,y)=x2−y2.
Show answer
Saddle point at (0,0)
fx=2x, fy=−2y, the only critical point is (0,0).D=(2)(−2)−0=−4<0: a saddle point. It behaves like a minimum in the x direction and a maximum in the y direction.
Question 3medium
Find and classify all critical points of f(x,y)=x3−3x+y2.
Find and classify all critical points of f(x,y)=x3+y3−3xy.
Show answer
(0,0) saddle; (1,1) local min, f=−1
fx=3x2−3y=0⇒y=x2. fy=3y2−3x=0⇒x=y2=x4.x(x3−1)=0: x=0 or x=1. The points are (0,0), (1,1).fxx=6x, fyy=6y, fxy=−3, D=36xy−9.(0,0): D=−9<0, saddle. (1,1): D=27>0, fxx=6>0, local min, f=1+1−3=−1.
Question 5medium
Find and classify the critical point of f(x,y)=xy−x2−y2+3y.
Show answer
Local max at (1,2), f=3
fx=y−2x=0, fy=x−2y+3=0. From the first, y=2x; plug into the second: x−4x+3=0, x=1, y=2.fxx=−2, fyy=−2, fxy=1, D=4−1=3>0, fxx<0: local maximum.f(1,2)=2−1−4+6=3.
Question 6hard
Find and classify all critical points of f(x,y)=x4+y4−4xy.
Show answer
(0,0) saddle; (1,1) and (−1,−1) local min, f=−2
fx=4x3−4y=0⇒y=x3. fy=4y3−4x=0⇒x=y3=x9.x9−x=x(x8−1)=0: x=0,±1. The points are (0,0), (1,1), (−1,−1).fxx=12x2, fyy=12y2, fxy=−4, D=144x2y2−16.(0,0): D=−16, saddle. (±1,±1): D=128>0, fxx=12>0, local min, f=1+1−4=−2.
Question 7medium
For f(x,y)=x4+y4, what does the second derivative test say at (0,0), and what is the actual nature of the point?
Show answer
Test inconclusive (D=0); actually a local (absolute) min
fxx=12x2, fyy=12y2, fxy=0; at the origin all are 0, D=0: the test gives no result. Look directly: f≥0 everywhere and f(0,0)=0. So the origin is a minimum.
Question 8medium
Find and classify the critical point of f(x,y)=2x2+y2+2xy−2x.
Show answer
Local min at (1,−1), f=−1
fx=4x+2y−2=0, fy=2y+2x=0⇒y=−x. Plug into the first: 4x−2x−2=0, x=1, y=−1.fxx=4, fyy=2, fxy=2, D=8−4=4>0, fxx>0: local min.f(1,−1)=2+1−2−2=−1.
Question 9hard
Find the point on the plane x+2y+z=6 closest to the origin, using the second derivative test.
Show answer
(1,2,1), distance 6
z=6−x−2y. Minimize the square of the distance: g(x,y)=x2+y2+(6−x−2y)2.gx=2x−2(6−x−2y)=0⇒4x+4y=12. gy=2y−4(6−x−2y)=0⇒4x+10y=24. Subtract: 6y=12, y=2, x=1, z=1. gxx=4, gyy=10, gxy=4, D=24>0: min. The distance is 1+4+1=6.
Question 10hard
An open-top rectangular box must have volume 32 cm3. Find the dimensions that minimize the surface area.
Show answer
4×4×2 cm, area 48 cm2
xyz=32, z=xy32. Area (no top): S=xy+2xz+2yz=xy+y64+x64.Sx=y−x264=0, Sy=x−y264=0. By symmetry x=y, x3=64, x=4.z=2. Sxx=x3128=2, Syy=2, Sxy=1, D=3>0: min. S=16+16+16=48.
Question 11medium
Find and classify all critical points of f(x,y)=y3−3y+x2−2x.
At a critical point, fxx=2, fyy=8 and fxy=4. What can you conclude?
Show answer
Nothing: D=0, the test is inconclusive
D=fxxfyy−fxy2=16−16=0. The second derivative test gives no result.fxx>0 alone does NOT mean a minimum; the condition D>0 is also needed.
Verification: At each critical point the gradient was verified to be zero with numerical derivatives, D and f_xx were computed with numerical second derivatives; the classification was also independently verified by scanning function values in 72 directions around the point (up/down), and the D=0 cases were also resolved with this scan (verify/MAT1052/11.mjs).
Review card
Critical point: f_x = 0 AND f_y = 0 (or the derivative does not exist)
Solve the system: pull y out of one, plug into the other; FACTOR, do not lose roots
D = f_xx·f_yy - (f_xy)² (compute separately at each critical point)
D > 0, f_xx > 0 → local MIN
D > 0, f_xx < 0 → local MAX
D < 0 → SADDLE point
D = 0 → the test is INCONCLUSIVE (look another way: the sign of f, paths)
f_yy can be used instead of f_xx (when D>0 their signs are the same)
Application: eliminate a variable with the constraint, build a two-variable function
Distance: minimize the square (no root, same point)
In the answer write both the point and the value of f