MULTIVARIABLE CALCULUS • OPTIMIZATION IN SEVERAL VARIABLES

Finding Critical Points — Find critical points of functions of two variables

Learn to locate the peaks, valleys, and saddle points of surfaces by setting partial derivatives equal to zero.

Historical Context & Motivation

In single-variable calculus, you learned to find the high and low points of a curve by setting the derivative equal to zero. But what happens when a quantity depends on two or more variables at once? Think of a mountainous landscape: the elevation at any point depends on both how far north and how far east you are. Finding the tallest peak or the deepest valley on that surface requires a more powerful version of the "set the derivative to zero" idea. This need drove mathematicians over centuries to develop the tools of multivariable optimization.

1684
Leibniz Publishes the Calculus
Gottfried Wilhelm Leibniz published foundational rules for derivatives and integrals, giving mathematicians a systematic way to find maxima and minima of single-variable functions.
1744
Euler's Work on Surfaces
Leonhard Euler extended calculus ideas to functions of several variables, studying surfaces and their curvatures. He introduced partial differentiation as a core technique.
1797
Lagrange Formalizes Partial Derivatives
Joseph-Louis Lagrange refined the notation and theory of partial derivatives, laying the groundwork for systematic critical-point analysis on surfaces.
1830s
The Second Derivative Test for Two Variables
Mathematicians developed the discriminant test (using second-order partial derivatives) to classify critical points as local maxima, local minima, or saddle points.

Today, finding critical points of functions of two variables is central to fields ranging from engineering design to economics, wherever you need to optimize a quantity that depends on multiple inputs simultaneously. The central question this lesson addresses is: how do we systematically locate every candidate for a maximum, minimum, or saddle point on a surface?

Core Principles & Definitions

Before diving into calculations, you need to understand four key ideas that form the foundation of critical-point analysis for functions of two variables. A function f(x, y) assigns a single output value to every pair of inputs (x, y). You can visualize this as a surface hovering over the xy-plane, where the height at each point is f(x, y). The goal is to find the special points on that surface where the surface is perfectly "flat" — meaning it is neither tilting uphill nor downhill in any direction.

1

Partial Derivative with Respect to x

Written fx or ∂f/∂x, this measures how fast f changes when you move in the x-direction while holding y constant. Think of slicing the surface with a vertical plane parallel to the x-axis and measuring the slope of that slice.
2

Partial Derivative with Respect to y

Written fy or ∂f/∂y, this measures how fast f changes when you move in the y-direction while holding x constant. It is the slope of the surface along a slice parallel to the y-axis.
3

Critical Point

A point (a, b) where both fx(a, b) = 0 and fy(a, b) = 0. At such a point the surface has zero slope in every direction — it is a candidate for a local max, local min, or saddle point.
4

Saddle Point

A critical point that is neither a local maximum nor a local minimum. The surface curves upward in one direction and downward in another, resembling a horse saddle or a mountain pass.
KEY TAKEAWAY
Imagine you're standing on a hilly field and you place a marble on the ground. At a critical point, the marble would stay perfectly still because the ground is level in every direction. That doesn't necessarily mean you're at the very top or the very bottom of a hill — you could be at a saddle-shaped pass where the marble is balanced but could roll either uphill or downhill depending on the direction. Finding critical points is about locating all such "marble-stays-still" spots on the surface.

Visual Explanation — The Geometry of Critical Points

The diagram below illustrates three types of critical points on surfaces of two variables. On the left, a local maximum looks like the top of a dome — the surface slopes downward in every direction from the peak. In the center, a saddle point curves upward along one axis and downward along the other. On the right, a local minimum is like the bottom of a bowl — the surface rises in every direction. At each of these points, the tangent plane is perfectly horizontal.

At each labeled critical point, the partial derivatives fx and fy are both zero, producing a horizontal tangent plane. The green dome shows a local maximum, the pink/violet saddle shows a saddle point, and the cyan bowl shows a local minimum.

Notice that the condition fx = 0 and fy = 0 is the same at all three types of critical points. This is precisely why finding critical points is only the first step — you must later classify them (using a second derivative test) to determine which type each critical point is. In this lesson, however, our focus is on the finding step itself.

Mathematical Framework

The mathematical procedure for finding critical points of a function f(x, y) is a direct extension of the single-variable technique. In one variable, you set f′(x) = 0. In two variables, you set both partial derivatives equal to zero simultaneously and solve the resulting system of equations.

CRITICAL POINT CONDITION
f_x(a, b) = 0 and f_y(a, b) = 0
fx means the partial derivative of f with respect to x (treat y as a constant). fy means the partial derivative of f with respect to y (treat x as a constant). The point (a, b) is the critical point where both conditions hold.

Let's look at how to compute partial derivatives. If f(x, y) = 3x² + 2xy − y², then to find fx you differentiate with respect to x while treating y as a constant. The term 3x² becomes 6x, the term 2xy becomes 2y (since y is treated as a constant coefficient), and the term −y² becomes 0 (it's a constant with respect to x). Combining these results gives fx = 6x + 2y.

PARTIAL DERIVATIVE WITH RESPECT TO x
f_x = ∂f/∂x (differentiate treating y as a constant)
The symbol ∂ ("partial") replaces d to signal that the function has more than one variable. You apply the same power rule, product rule, and chain rule you know — just pretend y is a number.
PARTIAL DERIVATIVE WITH RESPECT TO y
f_y = ∂f/∂y (differentiate treating x as a constant)
Same idea in the other direction: treat x as a constant and differentiate with respect to y. Together with fx = 0, the equation fy = 0 forms a system of two equations in two unknowns.
SOLVE THE SYSTEM
f_x(x, y) = 0 ⟹ equation 1 f_y(x, y) = 0 ⟹ equation 2 Solve for x and y simultaneously.
Use substitution or elimination — the same techniques from algebra. Each solution pair (x, y) is a critical point.
Don't Forget!
A critical point can also occur where one or both partial derivatives are undefined. For most polynomial and common functions you'll encounter in this course, the partial derivatives exist everywhere, so you only need to solve fx = 0 and fy = 0. But keep this edge case in mind for functions with absolute values or square roots.

Classifying Critical Points — A Preview

Once you have found the critical points, the natural next question is: which are maxima, which are minima, and which are saddle points? Although full classification is a separate topic, understanding the Second Derivative Test (Discriminant Test) in outline form will help you appreciate why finding the critical points is such a crucial first step.

This flowchart shows the complete process. Steps 1 and 2 (finding the critical points) are the focus of this lesson. Step 3 (computing the discriminant D) is used for classification and is covered in a follow-up lesson.
Classification of critical points using the discriminant D
Condition at Critical PointDiscriminant DClassification
D > 0 and fxx > 0D = fxx × fyy − (fxyLocal Minimum
D > 0 and fxx < 0PositiveLocal Maximum
D < 0NegativeSaddle Point
D = 0ZeroInconclusive — further analysis needed

For the remainder of this lesson, we focus on Steps 1 and 2 — computing the partial derivatives and solving the system to locate the critical points. Mastering this process is essential before moving on to classification.

Worked Example

Let's walk through a complete example of finding the critical points of a function of two variables.

Find the critical points of f(x, y) = x³ + y³ − 3xy
1
Step 1 — Compute the partial derivative with respect to xDifferentiate f(x, y) = x³ + y³ − 3xy with respect to x, treating y as a constant. The derivative of x³ is 3x². The term y³ is a constant with respect to x, so its derivative is 0. For the term −3xy, treat −3y as a constant coefficient, so the derivative is −3y.
fx = 3x² − 3y
2
Step 2 — Compute the partial derivative with respect to yDifferentiate f(x, y) = x³ + y³ − 3xy with respect to y, treating x as a constant. The term x³ is constant, so its derivative is 0. The derivative of y³ is 3y². For −3xy, treat −3x as a constant coefficient, giving −3x.
fy = 3y² − 3x
3
Step 3 — Set both partial derivatives equal to zeroWe need to solve the system: 3x² − 3y = 0 and 3y² − 3x = 0. Simplify each equation by dividing both sides by 3. This gives x² = y (Equation 1) and y² = x (Equation 2).
System: x² = y and y² = x
4
Step 4 — Solve by substitutionFrom Equation 1, y = x². Substitute this into Equation 2: (x²)² = x, which simplifies to x⁴ = x. Rearrange: x⁴ − x = 0. Factor out x: x(x³ − 1) = 0. This gives x = 0 or x³ = 1, meaning x = 0 or x = 1.
x = 0 or x = 1
5
Step 5 — Find the corresponding y-valuesUsing y = x²: when x = 0, y = 0² = 0; when x = 1, y = 1² = 1.
Critical points: (0, 0) and (1, 1)
Verification Tip
Always check your answers by plugging the critical points back into both partial derivative equations. At (0, 0): fx = 3(0)² − 3(0) = 0 ✓ and fy = 3(0)² − 3(0) = 0 ✓. At (1, 1): fx = 3(1)² − 3(1) = 0 ✓ and fy = 3(1)² − 3(1) = 0 ✓. Both check out!

Strengths, Limitations & Common Pitfalls

Understanding the strengths and limitations of the critical-point method helps you apply it effectively and avoid common mistakes.

Strengths and limitations of the critical-point method for f(x, y)
StrengthsLimitations / Pitfalls
Works for any differentiable function of two variables — polynomials, exponentials, trigonometric functions, and more.Only finds interior critical points. If the domain is restricted (e.g., a closed region), you must also check the boundary separately.
The process is algorithmic: compute two derivatives, set them to zero, solve the system. It is systematic and repeatable.The resulting system of equations can be nonlinear and hard to solve, especially for functions with transcendental terms like sin or e.
Directly extends the one-variable technique you already know: set the derivative equal to zero.Finding critical points tells you where potential extrema are, but not what type they are. You need the second derivative test for classification.
Provides all candidate points for local extrema in a single procedure, so you don't miss any.Students often forget to solve the system simultaneously. Setting f_x = 0 alone gives a curve, not a point — you need both equations together.
KEY TAKEAWAY
Think of finding critical points like using a metal detector on a beach: it identifies every spot where something might be buried, but you still have to dig to find out whether you've found a gold coin (maximum), a bottle cap (saddle point), or an old key (minimum). The metal detector step — finding the critical points — is essential, but it's only part of the treasure hunt.

Connection to Advanced Theory

The critical-point technique for two variables generalizes directly to functions of three, four, or even hundreds of variables. In advanced courses and real-world applications, the same fundamental principle applies: set all partial derivatives equal to zero. The table below compares the two-variable case you've learned with the general n-variable case you'll encounter later.

Comparison of two-variable and general n-variable critical point analysis
FeatureTwo-Variable Case f(x, y)General n-Variable Case f(x₁, x₂, …, xₙ)
Number of equations2 (fx = 0 and fy = 0)n equations (∂f/∂xi = 0 for each variable)
Classification toolDiscriminant D = fxxfyy − (fxyHessian matrix (an n × n matrix of all second partial derivatives)
Visualization3D surface in xyz-spaceCannot be visualized directly; rely on algebra and linear algebra
ApplicationsSurface area, profit with two inputs, physics with two degrees of freedomMachine learning (millions of variables), portfolio optimization, engineering design

In machine learning, for example, neural networks have functions with millions of parameters, and training the network is essentially a massive critical-point search. The gradient (the vector of all partial derivatives) is computed, set toward zero, and the system is solved iteratively. The same principle you are learning right now — set every partial derivative to zero — scales up to power the technology behind image recognition, language translation, and much more.

Practice Problems

Test your understanding with these five problems, arranged from conceptual understanding through critical thinking. Work through each one on paper before checking the answer.

PROBLEM 1CONCEPTUAL
In your own words, explain why both partial derivatives must equal zero at a critical point of f(x, y). Why isn't it enough for just one of them to be zero?
PROBLEM 2BASIC CALCULATION
Find the critical point(s) of f(x, y) = x² + y² − 4x + 6y + 13.
PROBLEM 3INTERMEDIATE
Find all critical points of f(x, y) = x³ − 3x + y² − 2y.
PROBLEM 4APPLIED
A company's profit P (in thousands of dollars) from producing x units of Product A and y units of Product B is modeled by P(x, y) = −2x² − y² + 12x + 8y − 20. Find the production levels (x, y) that yield critical-point profit, and compute the profit at that point.
PROBLEM 5CRITICAL THINKING
Find all critical points of f(x, y) = x² + xy + y² − 6x − 9y. Then explain why the system of equations here is more challenging than in Problem 2 and describe the algebraic strategy you used.

Lesson Summary

To find critical points of a function f(x, y), you compute both partial derivatives — fx (differentiate with respect to x, holding y constant) and fy (differentiate with respect to y, holding x constant) — then set both equal to zero and solve the resulting system of equations simultaneously. Each solution (a, b) is a critical point where the tangent plane is horizontal, making it a candidate for a local maximum, local minimum, or saddle point.

The key algebraic challenge varies with the function: if there are no cross-terms (like xy), the two equations decouple and you solve each independently. When cross-terms are present, you must use substitution or elimination to solve the coupled system. Once you've found all critical points, you can classify them using the second derivative test (discriminant D), which is the natural next step in multivariable optimization.

Varsity Tutors • Multivariable Calculus • Finding Critical Points — Find critical points of functions of two variables