Maxima, Minima and Lagrange Multipliers

Maxima and Minima of Functions of a Single Variable

Finding the maximum and minimum values of a function is a fundamental problem in calculus. These points, often referred to as extrema, represent the highest or lowest values a function can attain over a given interval or its entire domain. For a function of a single variable, $f(x)$, we typically look for these values at critical points and endpoints of the domain.

Critical Points

Critical points are the points where the derivative of the function is either zero or undefined. These are the candidates for local maxima and minima.

For a function $f(x)$, a critical point $c$ occurs if:

  1. $f'(c) = 0$
  2. $f'(c)$ is undefined

First Derivative Test

The first derivative test helps us determine if a critical point corresponds to a local maximum, a local minimum, or neither. It examines the sign of the first derivative, $f'(x)$, on either side of the critical point.

Let $c$ be a critical point of $f(x)$:

  • If $f'(x)$ changes from positive to negative as $x$ increases through $c$, then $f(c)$ is a local maximum. This means the function is increasing before $c$ and decreasing after $c$.
  • If $f'(x)$ changes from negative to positive as $x$ increases through $c$, then $f(c)$ is a local minimum. This means the function is decreasing before $c$ and increasing after $c$.
  • If $f'(x)$ does not change sign as $x$ increases through $c$, then $f(c)$ is neither a local maximum nor a local minimum. The function continues to increase or decrease on both sides of $c$.

Second Derivative Test

The second derivative test provides an alternative way to classify critical points, provided the second derivative exists and is not zero at the critical point.

Let $c$ be a critical point where $f'(c) = 0$:

  • If $f''(c) < 0$, then $f(c)$ is a local maximum. A negative second derivative indicates that the function is concave down at $c$.
  • If $f''(c) > 0$, then $f(c)$ is a local minimum. A positive second derivative indicates that the function is concave up at $c$.
  • If $f''(c) = 0$, the test is inconclusive. In this case, we must use the first derivative test or another method.

Absolute (Global) Maxima and Minima

While the first and second derivative tests identify local extrema, we are often interested in the absolute maximum and minimum values of a function over a specific interval. For a continuous function $f(x)$ on a closed interval $[a, b]$, the absolute extrema must occur at either the critical points within the interval or at the endpoints $a$ and $b$. This is known as the Extreme Value Theorem.

To find absolute extrema on a closed interval:

  1. Find all critical points of $f(x)$ in the open interval $(a, b)$.
  2. Evaluate $f(x)$ at each critical point found in step 1.
  3. Evaluate $f(x)$ at the endpoints $a$ and $b$.
  4. The largest value from steps 2 and 3 is the absolute maximum, and the smallest value is the absolute minimum.
Memory Trick: Think of a roller coaster. A peak is a local maximum, and a valley is a local minimum. The highest point on the entire ride is the absolute maximum, and the lowest point is the absolute minimum. The first derivative tells you if you're going uphill ($f'(x) > 0$) or downhill ($f'(x) < 0$). The second derivative tells you if the slope is increasing (concave up, smile, minimum) or decreasing (concave down, frown, maximum).

Maxima and Minima of Functions of Two Variables

Extending the concept to functions of two variables, $f(x, y)$, we look for points where the function reaches its highest or lowest values. The process involves finding critical points and using tests similar to those for single-variable functions.

Critical Points for Two Variables

For a function $f(x, y)$, a critical point $(a, b)$ occurs where both partial derivatives are zero or where one or both are undefined.

Critical points satisfy:

  1. $\frac{\partial f}{\partial x}(a, b) = 0$ and $\frac{\partial f}{\partial y}(a, b) = 0$
  2. One or both partial derivatives are undefined at $(a, b)$.

The Second Derivative Test for Two Variables

To classify critical points $(a, b)$ where $\frac{\partial f}{\partial x}(a, b) = 0$ and $\frac{\partial f}{\partial y}(a, b) = 0$, we use the second derivative test. This involves calculating the discriminant, $D$, which is based on the second partial derivatives:

$D(x, y) = \left(\frac{\partial^2 f}{\partial x^2}\right) \left(\frac{\partial^2 f}{\partial y^2}\right) - \left(\frac{\partial^2 f}{\partial x \partial y}\right)^2$

At the critical point $(a, b)$:

  • If $D(a, b) > 0$ and $\frac{\partial^2 f}{\partial x^2}(a, b) > 0$, then $f(a, b)$ is a local minimum.
  • If $D(a, b) > 0$ and $\frac{\partial^2 f}{\partial x^2}(a, b) < 0$, then $f(a, b)$ is a local maximum.
  • If $D(a, b) < 0$, then $f(a, b)$ is a saddle point. A saddle point is a point where the function has neither a local maximum nor a local minimum. Imagine the shape of a horse's saddle.
  • If $D(a, b) = 0$, the test is inconclusive.

Absolute Extrema for Two Variables

Finding absolute extrema for functions of two variables often involves considering the behavior of the function over a closed and bounded region in the $xy$-plane. The absolute maximum and minimum values can occur either at critical points in the interior of the region or on the boundary of the region.

The process is:

  1. Find all critical points in the interior of the region and evaluate $f(x, y)$ at these points.
  2. Find the maximum and minimum values of $f(x, y)$ on the boundary of the region. This often requires parameterizing the boundary curves and reducing the problem to finding extrema of a single-variable function.
  3. Compare all the values found in steps 1 and 2. The largest is the absolute maximum, and the smallest is the absolute minimum.

Constrained Optimization and Lagrange Multipliers

Many real-world optimization problems involve finding the maximum or minimum of a function subject to certain constraints. For example, a company might want to maximize its profit subject to limitations on resources, or minimize the cost of production given certain output requirements.

The Problem Statement

We want to find the extreme values of a function $f(x, y)$ subject to the constraint $g(x, y) = k$, where $g(x, y)$ is a constraint function and $k$ is a constant. For functions of more variables, say $f(x, y, z)$ subject to $g(x, y, z) = k$, the principle remains the same.

The Method of Lagrange Multipliers

The method of Lagrange multipliers provides a systematic way to solve these constrained optimization problems. The core idea is that at an extremum point of $f$ subject to the constraint $g(x, y) = k$, the gradient of $f$ must be parallel to the gradient of $g$. Mathematically, this means:

$\nabla f(x, y) = \lambda \nabla g(x, y)$

where $\lambda$ (lambda) is a scalar called the Lagrange multiplier.

Steps for Using Lagrange Multipliers (Two Variables)

To find the extrema of $f(x, y)$ subject to $g(x, y) = k$:

  1. Formulate the system of equations by setting the gradient of $f$ equal to $\lambda$ times the gradient of $g$:
    • $\frac{\partial f}{\partial x} = \lambda \frac{\partial g}{\partial x}$
    • $\frac{\partial f}{\partial y} = \lambda \frac{\partial g}{\partial y}$
  2. Include the constraint equation:
    • $g(x, y) = k$
  3. Solve this system of equations for $x$, $y$, and $\lambda$. The solutions $(x, y)$ are the candidate points for extrema.
  4. Evaluate the function $f(x, y)$ at each candidate point found in step 3.
  5. Determine which point gives the maximum and which gives the minimum value. If the constraint region is closed and bounded, the absolute maximum and minimum will exist. If not, we might need further analysis.
Geometric Interpretation: At an extremum point $(x, y)$ on the constraint curve $g(x, y) = k$, the level curve of $f(x, y)$ passing through that point is tangent to the constraint curve. The gradients $\nabla f$ and $\nabla g$ are normal vectors to their respective curves. If two curves are tangent at a point, their normal vectors at that point must be parallel.

Example: Maxima and Minima with Lagrange Multipliers

Problem: Find the maximum and minimum values of $f(x, y) = x^2 + y^2$ subject to the constraint $g(x, y) = x + 2y = 4$.

Step 1 & 2: Formulate the system of equations.

$\nabla f = \langle 2x, 2y \rangle$

$\nabla g = \langle 1, 2 \rangle$

The system is:

  1. $2x = \lambda(1) \implies 2x = \lambda$
  2. $2y = \lambda(2) \implies 2y = 2\lambda \implies y = \lambda$
  3. $x + 2y = 4$

Step 3: Solve the system.

From (1), $\lambda = 2x$. Substitute this into (2): $y = 2x$.

Now substitute $y = 2x$ into the constraint equation (3):

$x + 2(2x) = 4$

$x + 4x = 4$

$5x = 4 \implies x = \frac{4}{5}$

Now find $y$ using $y = 2x$:

$y = 2\left(\frac{4}{5}\right) = \frac{8}{5}$

The candidate point is $\left(\frac{4}{5}, \frac{8}{5}\right)$.

Step 4: Evaluate $f(x, y)$ at the candidate point.

$f\left(\frac{4}{5}, \frac{8}{5}\right) = \left(\frac{4}{5}\right)^2 + \left(\frac{8}{5}\right)^2 = \frac{16}{25} + \frac{64}{25} = \frac{80}{25} = \frac{16}{5}$

Step 5: Determine max/min.

The constraint $x + 2y = 4$ represents a line. The function $f(x, y) = x^2 + y^2$ represents the square of the distance from the origin. We are looking for the point on the line $x + 2y = 4$ that is closest to and farthest from the origin. Since the line extends infinitely in both directions, there is no absolute maximum distance (and thus no absolute maximum for $f(x, y)$). However, there is a unique point on the line closest to the origin, which corresponds to the absolute minimum. In this case, $\frac{16}{5}$ is the minimum value of $f(x, y)$ subject to the constraint.

Key Takeaway: The method of Lagrange multipliers is powerful for optimizing functions under equality constraints. It transforms a multi-variable calculus problem into solving a system of algebraic equations derived from gradient conditions. Remember to check if an absolute maximum or minimum actually exists based on the nature of the constraint.

Lagrange Multipliers for Functions of Three Variables

The method extends naturally to functions of three variables, $f(x, y, z)$, subject to a constraint $g(x, y, z) = k$.

The system of equations becomes:

  1. $\frac{\partial f}{\partial x} = \lambda \frac{\partial g}{\partial x}$
  2. $\frac{\partial f}{\partial y} = \lambda \frac{\partial g}{\partial y}$
  3. $\frac{\partial f}{\partial z} = \lambda \frac{\partial g}{\partial z}$
  4. $g(x, y, z) = k$

Solving this system yields candidate points for extrema.

Lagrange Multipliers with Multiple Constraints

If we have a function $f(x, y, z)$ subject to two constraints, $g_1(x, y, z) = k_1$ and $g_2(x, y, z) = k_2$, the method involves two Lagrange multipliers, $\lambda$ and $\mu$ (mu):

$\nabla f = \lambda \nabla g_1 + \mu \nabla g_2$

This leads to a system of equations:

  1. $\frac{\partial f}{\partial x} = \lambda \frac{\partial g_1}{\partial x} + \mu \frac{\partial g_2}{\partial x}$
  2. $\frac{\partial f}{\partial y} = \lambda \frac{\partial g_1}{\partial y} + \mu \frac{\partial g_2}{\partial y}$
  3. $\frac{\partial f}{\partial z} = \lambda \frac{\partial g_1}{\partial z} + \mu \frac{\partial g_2}{\partial z}$
  4. $g_1(x, y, z) = k_1$
  5. $g_2(x, y, z) = k_2$

Solving this larger system gives candidate points for extrema.

Shortcut for Lagrange Multipliers: Remember the core idea: $\nabla f$ must be parallel to $\nabla g$. Think of it as the "direction of steepest ascent" for $f$ aligning with the "direction of change" for $g$. For multiple constraints, it's like balancing forces from each constraint.

Applications of Maxima and Minima

The concepts of maxima and minima are ubiquitous in science, engineering, economics, and everyday life.

Optimization in Engineering

Engineers use optimization to design structures that are strong yet lightweight, circuits that are efficient, and processes that minimize waste. For instance, finding the dimensions of a cylindrical can that minimize the surface area for a fixed volume is a classic optimization problem.

Example: Minimize the surface area $A = 2\pi r^2 + 2\pi rh$ of a cylinder subject to a fixed volume $V = \pi r^2 h$.

Optimization in Economics

Businesses aim to maximize profit and minimize cost. This involves finding optimal production levels, pricing strategies, and resource allocation. For example, determining the quantity of a product to manufacture to achieve the highest profit, considering production costs and market demand.

Optimization in Physics

Physical systems often tend towards states of minimum energy. For example, the path a light ray takes between two points in different media (Fermat's Principle) is the path that takes the least time, which is an optimization problem.

General Optimization Problems

Any problem that asks to find the "best" solution—whether it's the fastest route, the most efficient design, or the highest yield—is an optimization problem that can often be formulated using calculus.