Discord

INAIO Guide Stage 1 5Calculus and Optimisation

5.4 Constrained optimisation

Optimize only among choices that satisfy the stated equality, inequality, and domain restrictions.

The best value of a formula may be impossible in the actual problem. A rectangle cannot have a negative side, a machine cannot exceed its capacity, and an exact total must remain exact. Constrained optimization means finding the best value among the choices that satisfy every rule.

This is intermediate work built on feasible solutions and maxima and minima. OpenStax's applied-optimization lesson starts from a real situation; its linear-programming lesson shows two-variable inequality constraints.

A basic idea: the allowed set comes first

Suppose C(x)=(x−5)2C(x)=(x-5)^2 measures error, but a control can only be set between 00 and 33. Without the restriction, x=5x=5 would give zero error. It is not allowed. On [0,3][0,3], moving towards 55 always lowers the error, so x=3x=3 is the feasible minimum, with C(3)=4C(3)=4.

Upward parabola with unrestricted minimum at x equals 5. The allowed interval from 0 to 3 is shaded, and its right boundary x equals 3 is marked as the best feasible point.Upward parabola with unrestricted minimum at x equals 5. The allowed interval from 0 to 3 is shaded, and its right boundary x equals 3 is marked as the best feasible point.
The lowest point of the full curve is excluded, so the boundary gives the best allowed value.

A quick tour of a constrained problem

  1. Name the objective. Write the quantity to maximize or minimize, including its units.
  2. List every constraint. Include equalities, inequalities, positive lengths, whole-number counts, and forbidden values.
  3. Reduce if possible. An equality such as x+y=10x+y=10 lets you replace yy with 10−x10-x. Then carry its allowed range into the one-variable problem.
  4. Find candidates and compare. For a smooth one-variable objective, check interior critical points and allowed boundaries. In two variables, edges and corners may also be candidates.
  5. Return to the question. State the feasible choice and its objective value, then substitute into the original conditions.

An equation constraint restricts choices to a curve or line. An inequality keeps one side of a boundary. You cannot simply solve the unconstrained derivative equation and stop: its answer may lie outside the feasible region. If no choice satisfies all conditions, there is no feasible optimum. If a boundary is excluded, a best value may be approached without being attained.

For a two-variable region, check each included edge as a one-variable problem: replace its boundary condition with an equality, substitute into the objective, and keep the allowed range along that edge. Compare any best points on the edges with their corners and with feasible interior candidates. When the objective is linear and the region is a closed, bounded polygon, at least one maximum and one minimum occur at corners; a nonlinear objective can do best between corners.

Application 1: area with a fixed perimeter

A rectangle has perimeter 2020 units. What side lengths give the greatest area?

  1. Use the equality. If the sides are xx and yy, then 2x+2y=202x+2y=20, so y=10−xy=10-x. Positive side lengths require 0<x<100<x<10.
  2. Build the objective. A(x)=xy=x(10−x)=−(x−5)2+25A(x)=xy=x(10-x)=-(x-5)^2+25.
  3. Maximize within the domain. The squared term is smallest at x=5x=5, which is allowed. Thus y=5y=5 and the maximum area is 2525 square units.

Completing the square makes the answer clear without a derivative; A′(x)=10−2xA'(x)=10-2x gives the same candidate.

Application 2: a limited control setting

A control setting xx must satisfy 0≤x≤30\le x\le3. Its error is C(x)=(x−5)2C(x)=(x-5)^2. Which setting minimizes error?

  1. Find the unrestricted target. C(x)≥0C(x)\ge0 and would reach 00 at x=5x=5.
  2. Apply the constraint. Since 55 is outside [0,3][0,3], compare allowed values. C′(x)=2(x−5)<0C'(x)=2(x-5)<0 throughout [0,3][0,3], so error falls as xx increases.
  3. Choose the boundary. x=3x=3 gives minimum error C(3)=4C(3)=4.

The derivative identifies the direction to move; the limit on xx decides where to stop.

Resources

SourceTitleWhy read it
OpenStaxApplied optimization problemsPractise turning restrictions into a one-variable objective.
OpenStaxLinear programmingSee objectives and several simultaneous inequalities.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments