# Optimization Problems

In mathematics and also in applications, we often encounter problems that require to maximize or minimize the value of a certain quantity. The general procedure can be summarized as:

1. Express the quantity to be maximized or minimized in terms of a single variable. The quantity may be described in terms of two variables however with given constraint it could be reduced to a single variable.
2. Differentiate the function obtained in step 1 and set the derivative equal to 0.
3. Solve the equation from step 2 to obtain critical values and determine whether they maximize or minimize the given quantity. Usually the first or second derivative test is a convenient tool for the required inspection.

Example. A farmer has 2400 ft of fencing and wants to fence off a rectangular field that borders a straight river. He needs no fence along the river. What are the dimensions of the field that has the largest area?

Solution. Let $x$ and $y$ denote the length and the width of the rectangular field. Suppose that the side along the river has the length $x$. Then the area is $A=xy$ and the required fencing in terms $x$ and $y$ is $x+2y=2400$. This fencing is a constraint and solve it for $y$ to obtain $y=1200-\frac{x}{2}$. Plugging this into $A$ for $y$, the area can be written as a function of a single variable $x$: $$A(x)=1200x-\frac{x^2}{2}$$ $A'(x)=1200-x$ and setting this equal to 0, we find $x=1200$. Since $A^{\prime\prime}(x)=-1<0$, by the second derivative test $x=1200$ gives rise to the absolute maximum of $A(x)$. The required dimensions are $1200\ \mbox{ft}\times 600\ \mbox{ft}$ where the side that borders the river is 1200 ft and the resulting largest area is 720,000 $\mbox{ft}^2$.

Example. A box with a square base and open top must have a volume of 32,000 $\mbox{cm}^3$. Find the dimensions of the box that minimize the amount of material used.

Solution. Let $x$ and $h$ be the length and the height of the box, respectively. Then $x^2h=32000$ and we want to minimize the surface area $A=x^2+4xh$. Solve the volume constraint for $h$ to obtain $h=\frac{32000}{x^2}$. Plugging this into $A$ for $h$, we write $A$ as a function of a single variable $x$: $$A(x)=x^2+\frac{128000}{x}$$ $A'(x)=2x-\frac{128000}{x^2}$ and setting it equalto 0, we find $x=40$. Since $A^{\prime\prime}(x)=2+\frac{256000}{x^3}>0$ for all $x>0$, $A(40)$ is the absolute minimum. Therefore the required dimensions are $40\ \mbox{cm}\times 40\ \mbox{cm}\times 20\ \mbox{cm}$.

Example. If 1200 $\mbox{cm}^2$ of material is available to make a box with a square base and an open top, find the largest possible volume of the box.

Solution. Let $x$ and $h$ be the length and the height of the box, respectively. Then $x^2+4xh=1200$ and we want to maximize $V=x^2h$. Solve the area for $h$ to obtain $h=\frac{1200-x^2}{4x}$. Plugging this into $V$, we write the volume as a function of a single variable $x$: $$V(x)=300x-\frac{1}{4}x^3$$ $V'(x)=300-\frac{3}{4}x^2$ and setting it equal to 0, we find $x=20$. Since $V'(x)$ is a quadratic polynomial with a negative leading coefficient, $V(2)=4000\ \mbox{cm}^3$ is the largest possible volume of the box.

Example. Find the point on the parabola $y^2=2x$ that is the closest to the point $(1,4)$.