Recognize a constrained optimization problem: finding the maximum and minimum values of a function \(f\) when its inputs are restricted by a constraint of the form \(g = 0\text{,}\) such as a curve in the plane or a surface in space.
Explain geometrically why, at a constrained extremum, the gradient vectors \(\nabla f\) and \(\nabla g\) must be collinear, and why the level curve of \(f\) through the extremum is tangent to the constraint curve there.
Constrained optimizations are everywhere. A robot tracing a surface must keep its hand on that surface, so its coordinates must satisfy the equation of the surface at all times; planning the robotβs motion is then a problem of optimizing time, distance, or energy expense subject to that constraint. Fitting a line to data points in an image can also be posed as a constrained optimization problem. In ChapterΒ 9 we found the extreme values of a function \(f(x,y)\) over regions of the plane. In this chapter we learn how to find the extrema of a function whose domain is restricted to a subset of the plane such as a curve, namely the problem
\begin{equation}
\text{maximize or minimize } f(x,y) \quad
\text{subject to the constraint } g(x,y) = 0.\tag{10.1}
\end{equation}
More generally, one can impose several constraints on a function of many variables; here we work with a single constraint on a function of two or three variables.