# Lecture 16: Optimization Problems

## Calculus I — Differential Calculus

---

## Learning Objectives

By the end of this lecture, students will be able to:

1. Translate word problems into mathematical optimization problems
2. Identify the objective function and constraint(s)
3. Reduce optimization problems to single-variable calculus problems
4. Find absolute maxima and minima in applied contexts
5. Verify that a critical point is indeed a maximum or minimum

---

## Lecture Content

### I. General Strategy for Optimization

Optimization problems follow a systematic nine-step strategy. **Step 1**: Understand the problem by reading carefully, drawing a diagram, and identifying what is to be maximized or minimized. **Step 2**: Introduce variables by assigning symbols to all relevant quantities. **Step 3**: Write the objective function, expressing the quantity to optimize as a function of the variables. **Step 4**: Identify constraints -- equations that relate the variables, such as a fixed perimeter or fixed volume. **Step 5**: Reduce to one variable by using the constraint to eliminate extra variables from the objective function. **Step 6**: Find the domain, determining the physically meaningful interval for the remaining variable. **Step 7**: Find the critical numbers by setting the derivative equal to zero and solving. **Step 8**: Determine the absolute extremum using the Closed Interval Method, the First Derivative Test, or the Second Derivative Test. **Step 9**: Answer the question by substituting back and stating the result with appropriate units.

### II. Example — Maximizing Area with Fixed Perimeter

A farmer has 400 m of fencing and wants to enclose the largest possible rectangular area. Let x and y be the side lengths. The constraint is 2x + 2y = 400, giving y = 200 - x. The objective is to maximize A = x * y = x(200 - x) = 200x - x^2, with domain 0 <= x <= 200 (both dimensions must be non-negative). Setting A'(x) = 200 - 2x = 0 gives x = 100. Since A''(x) = -2 < 0, this is indeed a maximum. The optimal dimensions are x = y = 100 m (a square), yielding a maximum area of 10,000 m^2.

### III. Example — Minimizing Material for a Box

An open-top rectangular box with a square base must have a volume of 32,000 cm^3. We want to find the dimensions that minimize the surface area (amount of material used). Let x be the side length of the base and h the height. The volume constraint gives x^2 * h = 32,000, so h = 32,000/x^2. The surface area is S = x^2 + 4xh = x^2 + 128,000/x, with domain x > 0.

Setting S'(x) = 2x - 128,000/x^2 = 0 gives 2x = 128,000/x^2, so x^3 = 64,000 and x = 40 cm. The height is then h = 32,000/1600 = 20 cm. Since S''(x) = 2 + 256,000/x^3 > 0 for all x > 0, this critical point is confirmed as a minimum. The minimum surface area is 1600 + 3200 = 4800 cm^2.

<image>A three-dimensional diagram of the open-top box with square base. The base is labeled x by x, and the height is labeled h. Next to it, the surface area formula S = x^2 + 4xh is shown with the base area (one square) and four side panels (four rectangles) "unfolded" into a flat net. The constraint V = x^2 h = 32,000 is displayed, with an arrow showing the substitution h = 32,000/x^2. Title: "Open-top box optimization."</image>

### IV. Example — Closest Point on a Curve

To find the point on the parabola y = x^2 closest to the point (0, 1), note that the distance is D = sqrt(x^2 + (x^2 - 1)^2). Since minimizing D is equivalent to minimizing D^2, define f(x) = x^2 + (x^2 - 1)^2 = x^4 - x^2 + 1. Setting f'(x) = 4x^3 - 2x = 2x(2x^2 - 1) = 0 gives x = 0 or x = +/- 1/sqrt(2). Evaluating, f(0) = 1 and f(+/- 1/sqrt(2)) = 1/4 - 1/2 + 1 = 3/4. The minimum distance occurs at x = +/- 1/sqrt(2) with y = 1/2, so the closest points are (+/- 1/sqrt(2), 1/2).

### V. Example — Maximizing Revenue or Profit

A company sells x units at price p = 200 - 0.5x dollars per unit. Revenue is R(x) = x * p = 200x - 0.5x^2. Setting R'(x) = 200 - x = 0 gives x = 200, and the maximum revenue is R(200) = 20,000 dollars. If a cost function C(x) is also given, profit P(x) = R(x) - C(x) would be maximized instead.

### VI. Optimization with Trigonometry

Some optimization problems require trigonometric parametrization. For example, consider a window in the shape of a rectangle topped by a semicircle, with a total perimeter of 12 m. Let w be the width (also the diameter of the semicircle) and h the height of the rectangular part. The perimeter constraint is w + 2h + (pi*w/2) = 12, which determines h in terms of w. The total area A = w*h + (pi/8)*w^2 can then be expressed as a function of w alone, differentiated, and set equal to zero to find the optimal dimensions.

<image>A diagram of the Norman window (rectangle topped by semicircle). The width w and rectangular height h are labeled. The semicircle sits on top with diameter w. The perimeter equation P = w + 2h + pi*w/2 = 12 is shown. The total area A = w*h + (pi/8)w^2 is shown as the sum of the rectangular area (shaded light blue) and the semicircular area (shaded light green). Title: "Norman Window Optimization."</image>

### VII. Tips and Common Mistakes

Several pitfalls must be avoided. Always **verify the answer** by confirming that the critical point is a maximum or minimum, using the Second Derivative Test, First Derivative Test, or endpoint checking. **Check endpoints**, since the absolute extremum might occur at the boundary of the domain. **Do not forget the constraint** -- the most common error is failing to use the constraint to reduce to one variable. **Draw a picture**, as a good diagram prevents most setup errors. Always include **units** in the final answer, and **re-read the question** to make sure you answer what was actually asked -- whether it is the dimensions, the maximum value, or both.
