Section 3 Key Concepts
Maxima and minima of function subject to a constraint.
- A constraint on a function f is a restriction to a specific domain.
- For a function of two variables, constraints are often given as a level curve of a constraint function g(x,y), i.e. g(x,y)=c for some fixed constant c. Constraints can also be given via inequalities of a constraint function, like g(x,y)≤c.
-
Finding the global minimum and maximum of a function f(x,y) subject to a constraint g(x,y)=c means finding the largest and smallest values that f(x,y) takes over all points that satisfy this constraint. More specifically:
- Finding the global maximum of f(x,y) subject to the constraint g(x,y)=c means finding the point P0 (if it exists) such thatf(P0)≥f(P) for all other points P satisfying g(P)=c.
- Finding the global minimum of f(x,y) subject to the constraint g(x,y)=c means finding the point P0 (if it exists) such thatf(P0)≤f(P) for all other points P satisfying g(P)=c.
How to find maxima and minima using Lagrange Multipliers.
Note that minimum and maximum values take place where the contours of f(x,y) and the constraint g(x,y)=c are parallel or at the endpoints of the constraint. This is because at interior points on the constraint where the contour of f is not parallel to the constraint, the value of f can be increased or decreased by moving along the constraint. Note also that the contours of f(x,y) are parallel to the constraint g(x,y)=c only if ∇f(x,y) and ∇g(x,y) are parallel.
-
The above observations suggests the following method (called the method of Lagrange Multipliers) for finding global minimal and maxima:
- Assume the constraint g(x,y)=c is bounded and g is continuous (see 4 below for what to do when it is not).
-
Find each point P0 that satisfies both
∇f(x,y)=λ∇g(x,y), andg(x,y)=c.The first of these ensures the two gradient vectors are parallel at that point, and the second that the point satisfies the constraint. The number λ is called a Lagrange Multiplier.
- Evaluate f(x,y) at each of these points and at the endpoints of the constraint: the largest will be the maximum and the smallest will be the minimum.
- If the constraint g(x,y)=c is not bounded (for example xy=1), then the end behavior of the values of f(x,y) along the constraint needs to be analyzed and compared with the values of f(x,y) at the points that were found before.
-
For a constraint given via an inequality g(x,y)≤c, we also need to consider the critical points inside the constraint, so the solution requires additional steps. Specifically:
- Assume the region g(x,y)≤c is bounded is continuous (see 4 below for what to do when it is not).
- Find each point P0 that satisfies both ∇f(x,y)=λ∇g(x,y) and g(x,y)=c.
- Find all points strictly inside the region g(x,y)≤c where ∇f is undefined or 0 (the critical points).
- Evaluate f(x,y) at each of the points in the previous two steps: the largest will be the maximum and the smallest will be the minimum.
- If the region g(x,y)≤c is not bounded, (for example xy≤1), then the end behavior of the values of f(x,y) in the region needs to be analyzed and compared with the values of f(x,y) at the points that were found before.
- For a function f(x,y,z) of three variables, constraints are usually given using two constraint functions g(x,y,z)=c and h(x,y,z)=k. In this case, we use the same basic method but instead solve ∇f(x,y,z)=λ∇g(x,y,z)+μh(x,y,z), g(x,y,z)=c and h(x,y,z)=k.