Many important applied problems involve finding the best way to accomplish some task. Often this involves finding the maximum or minimum value of some function: the minimum time to make a certain journey, the minimum cost for doing a task, the maximum power that can be generated by a device, and so on. Many of these problems can be solved by finding the appropriate function and then using techniques of calculus to find the maximum or the minimum value required.

Generally such a problem will have the following mathematical form: Find the largest (or smallest) value of $f(x)$ when $a\le x\le b$. Sometimes $a$ or $b$ are infinite, but frequently the real world imposes some constraint on the values that $x$ may have.

Such a problem differs in two ways from the local maximum and minimum
problems we encountered when graphing functions: We are interested
only in the function between $a$ and $b$, and we want to know the
largest or smallest value that $f(x)$ takes on, not merely values that
are the largest or smallest in a small interval. That is, we seek not
a local maximum or minimum but a
**global**
maximum or minimum, sometimes also called an
**absolute** maximum or minimum.

Any global maximum or minimum must of course be a local maximum or
minimum. If we find all possible local extrema, then the global
maximum, *if it exists*, must be the largest of the local maxima
and the global minimum, *if it exists*, must be the smallest of
the local minima. We already know where local extrema can occur: only
at those points at which $f'(x)$ is zero or undefined. Actually, there
are two additional points at which a maximum or minimum can occur if
the endpoints $a$ and $b$ are not infinite, namely, at $a$ and $b$. We
have not previously considered such points because we have not been
interested in limiting a function to a small interval. An example
should make this clear.

Example 6.1.1 Find the maximum and minimum values of $\ds f(x)=x^2$ on the interval $[-2,1]$, shown in figure 6.1.1. We compute $\ds f'(x)=2x$, which is zero at $x=0$ and is always defined.

Since $f'(1)=2$ we would not normally flag $x=1$ as a point
of interest, but it is clear from the graph that *when $f(x)$ is
restricted to $[-2,1]$ there is a local maximum at $x=1$.* Likewise we
would not normally pay attention to $x=-2$, but since we have
truncated $f$ at $-2$ we have introduced a new local maximum there as
well. In a technical sense nothing new is going on here: When we
truncate $f$ we actually create a new function, let's call it $g$,
that is defined only on the interval $[-2,1]$. If we try to compute
the derivative of this new function we actually find that it does not
have a derivative at $-2$ or $1$. Why? Because to compute the
derivative at 1 we must compute the limit
$$\lim_{\Delta x\to 0} {g(1+\Delta x)-g(1)\over \Delta x}.$$
This limit does not exist because when $\Delta x>0$,
$g(1+\Delta x)$ is not defined. It is simpler, however, simply to
remember that we must always check the endpoints.

So the function $g$, that is, $f$ restricted to $[-2,1]$, has one critical value and two finite endpoints, any of which might be the global maximum or minimum. We could first determine which of these are local maximum or minimum points (or neither); then the largest local maximum must be the global maximum and the smallest local minimum must be the global minimum. It is usually easier, however, to compute the value of $f$ at every point at which the global maximum or minimum might occur; the largest of these is the global maximum, the smallest is the global minimum.

So we compute $f(-2)=4$, $f(0)=0$, $f(1)=1$. The global maximum is 4 at $x=-2$ and the global minimum is 0 at $x=0$. $\square$

It is possible that there is no global maximum or minimum. It is difficult, and not particularly useful, to express a complete procedure for determining whether this is the case. Generally, the best approach is to gain enough understanding of the shape of the graph to decide. Fortunately, only a rough idea of the shape is usually needed.

There are some particularly nice cases that are easy. A
continuous function on a closed interval $[a,b]$ *always* has both a global maximum and a global minimum, so examining
the critical values and the endpoints is enough:

Theorem 6.1.2 (Extreme value theorem) If $f$ is continuous on a closed interval $[a,b]$, then it has both a minimum and a maximum point. That is, there are real numbers $c$ and $d$ in $[a,b]$ so that for every $x$ in $[a,b]$, $f(x)\le f(c)$ and $f(x)\ge f(d)$. $\qed$

Another easy case: If a function is continuous and has a single critical value, then if there is a local maximum at the critical value it is a global maximum, and if it is a local minimum it is a global minimum. There may also be a global minimum in the first case, or a global maximum in the second case, but that will generally require more effort to determine.

Example 6.1.3 Let $\ds f(x)=-x^2+4x-3$. Find the maximum value of $f(x)$ on the interval $[0,4]$. First note that $f'(x)= -2 x +4=0$ when $x=2$, and $f(2)= 1$. Next observe that $f'(x)$ is defined for all $x$, so there are no other critical values. Finally, $f(0) = -3$ and $f(4)= -3$. The largest value of $f(x)$ on the interval $[0,4]$ is $f(2)=1$. $\square$

Example 6.1.4 Let $\ds f(x)=-x^2+4x-3$. Find the maximum value of $f(x)$ on the interval $[-1,1]$.

First note that $f'(x)= -2 x +4=0$ when $x=2$. But $x=2$ is not in the interval, so we don't use it. Thus the only two points to be checked are the endpoints; $f(-1) = -8$ and $f(1)= 0$. So the largest value of $f(x)$ on $[-1,1]$ is $f(1)=0$. $\square$

Example 6.1.5 Find the maximum and minimum values of the function $f(x)= 7+|x-2|$ for $x$ between $1$ and $4$ inclusive. The derivative $f'(x)$ is never zero, but $f'(x)$ is undefined at $x=2$, so we compute $f(2)= 7$. Checking the end points we get $f(1)=8$ and $f(4)=9$. The smallest of these numbers is $f(2)=7$, which is, therefore, the minimum value of $f(x)$ on the interval $1 \le x \le 4$, and the maximum is $f(4)=9$. $\square$

Example 6.1.6 Find all local maxima and minima for $\ds f(x)=x^3-x$, and determine whether there is a global maximum or minimum on the open interval $(-2,2)$. In example 5.1.2 we found a local maximum at $\ds (-\sqrt3/3,2\sqrt{3}/9)$ and a local minimum at $\ds (\sqrt3/3,-2\sqrt{3}/9)$. Since the endpoints are not in the interval $(-2,2)$ they cannot be considered. Is the lone local maximum a global maximum? Here we must look more closely at the graph. We know that on the closed interval $\ds [-\sqrt3/3,\sqrt3/3]$ there is a global maximum at $\ds x=-\sqrt3/3$ and a global minimum at $\ds x=\sqrt3/3$. So the question becomes: what happens between $-2$ and $\ds -\sqrt3/3$, and between $\ds \sqrt3/3$ and $2$? Since there is a local minimum at $\ds x=\sqrt3/3$, the graph must continue up to the right, since there are no more critical values. This means no value of $f$ will be less than $\ds -2\sqrt{3}/9$ between $\ds \sqrt3/3$ and $2$, but it says nothing about whether we might find a value larger than the local maximum $\ds 2\sqrt{3}/9$. How can we tell? Since the function increases to the right of $\ds \sqrt3/3$, we need to know what the function values do "close to'' $2$. Here the easiest test is to pick a number and do a computation to get some idea of what's going on. Since $\ds f(1.9)=4.959>2\sqrt{3}/9$, there is no global maximum at $\ds -\sqrt3/3$, and hence no global maximum at all. (How can we tell that $\ds 4.959>2\sqrt{3}/9$? We can use a calculator to approximate the right hand side; if it is not even close to $4.959$ we can take this as decisive. Since $\ds 2\sqrt{3}/9\approx 0.3849$, there's really no question. Funny things can happen in the rounding done by computers and calculators, however, so we might be a little more careful, especially if the values come out quite close. In this case we can convert the relation $\ds 4.959>2\sqrt{3}/9$ into $\ds (9/2) 4.959>\sqrt{3}$ and ask whether this is true. Since the left side is clearly larger than $4\cdot 4$ which is clearly larger than $\ds \sqrt3$, this settles the question.)

A similar analysis shows that there is also no global minimum. The graph of $f(x)$ on $(-2,2)$ is shown in figure 6.1.2. $\square$

Example 6.1.7 Of all rectangles of area 100, which has the smallest perimeter?

First we must translate this into a purely mathematical problem in which we want to find the minimum value of a function. If $x$ denotes one of the sides of the rectangle, then the adjacent side must be $100/x$ (in order that the area be 100). So the function we want to minimize is $$ f(x)=2x+2{100\over x} $$ since the perimeter is twice the length plus twice the width of the rectangle. Not all values of $x$ make sense in this problem: lengths of sides of rectangles must be positive, so $x>0$. If $x>0$ then so is $100/x$, so we need no second condition on $x$.

We next find $f'(x)$ and set it equal to zero: $\ds 0=f'(x)=2-200/x^2$. Solving $f'(x)=0$ for $x$ gives us $x=\pm 10$. We are interested only in $x>0$, so only the value $x=10$ is of interest. Since $f'(x)$ is defined everywhere on the interval $(0,\infty)$, there are no more critical values, and there are no endpoints. Is there a local maximum, minimum, or neither at $x=10$? The second derivative is $\ds f''(x)=400/x^3$, and $f''(10)>0$, so there is a local minimum. Since there is only one critical value, this is also the global minimum, so the rectangle with smallest perimeter is the $10\times10$ square. $\square$

Example 6.1.8 You want to sell a certain number $n$ of items in order to maximize your profit. Market research tells you that if you set the price at \$1.50, you will be able to sell 5000 items, and for every 10 cents you lower the price below \$1.50 you will be able to sell another 1000 items. Suppose that your fixed costs ("start-up costs'') total \$2000, and the per item cost of production ("marginal cost'') is \$0.50. Find the price to set per item and the number of items sold in order to maximize profit, and also determine the maximum profit you can get.

The first step is to convert the problem into a function maximization problem. Since we want to maximize profit by setting the price per item, we should look for a function $P(x)$ representing the profit when the price per item is $x$. Profit is revenue minus costs, and revenue is number of items sold times the price per item, so we get $P=nx-2000-0.50n$. The number of items sold is itself a function of $x$, $n=5000+1000(1.5-x)/0.10$, because $ (1.5-x)/0.10$ is the number of multiples of 10 cents that the price is below \$1.50. Now we substitute for $n$ in the profit function: $$ \eqalign{ P(x)&=(5000+1000(1.5-x)/0.10)x-2000- 0.5(5000+1000(1.5-x)/0.10)\cr &=-10000x^2+25000x-12000\cr} $$ We want to know the maximum value of this function when $x$ is between 0 and $1.5$. The derivative is $P'(x)=-20000x+25000$, which is zero when $x=1.25$. Since $P''(x)=-20000< 0$, there must be a local maximum at $x=1.25$, and since this is the only critical value it must be a global maximum as well. (Alternately, we could compute $P(0)=-12000$, $P(1.25)=3625$, and $P(1.5)=3000$ and note that $P(1.25)$ is the maximum of these.) Thus the maximum profit is \$3625, attained when we set the price at \$1.25 and sell 7500 items. $\square$

Example 6.1.9 Find the largest rectangle (that is, the rectangle with largest area) that fits inside the graph of the parabola $\ds y=x^2$ below the line $y=a$ ($a$ is an unspecified constant value), with the top side of the rectangle on the horizontal line $y=a$; see figure 6.1.3.)

We want to find the maximum value of some function $A(x)$ representing area. Perhaps the hardest part of this problem is deciding what $x$ should represent. The lower right corner of the rectangle is at $\ds (x,x^2)$, and once this is chosen the rectangle is completely determined. So we can let the $x$ in $A(x)$ be the $x$ of the parabola $\ds f(x)=x^2$. Then the area is $\ds A(x)=(2x)(a-x^2)=-2x^3+2ax$. We want the maximum value of $A(x)$ when $x$ is in $\ds [0,\sqrt{a}]$. (You might object to allowing $x=0$ or $\ds x=\sqrt{a}$, since then the "rectangle'' has either no width or no height, so is not "really'' a rectangle. But the problem is somewhat easier if we simply allow such rectangles, which have zero area.)

Setting $\ds 0=A'(x)=-6x^2+2a$ we get $\ds x=\sqrt{a/3}$ as the only critical value. Testing this and the two endpoints, we have $\ds A(0)=A(\sqrt{a})=0$ and $\ds A(\sqrt{a/3})=(4/9)\sqrt{3}a^{3/2}$. The maximum area thus occurs when the rectangle has dimensions $\ds 2\sqrt{a/3}\times (2/3)a$. $\square$

Example 6.1.10 If you fit the largest possible cone inside a sphere, what fraction of the volume of the sphere is occupied by the cone? (Here by "cone'' we mean a right circular cone, i.e., a cone for which the base is perpendicular to the axis of symmetry, and for which the cross-section cut perpendicular to the axis of symmetry at any point is a circle.)

Let $R$ be the radius of the sphere, and let $r$ and $h$ be the base radius and height of the cone inside the sphere. What we want to maximize is the volume of the cone: $\ds \pi r^2h/3$. Here $R$ is a fixed value, but $r$ and $h$ can vary. Namely, we could choose $r$ to be as large as possible—equal to $R$—by taking the height equal to $R$; or we could make the cone's height $h$ larger at the expense of making $r$ a little less than $R$. See the cross-section depicted in figure 6.1.4. We have situated the picture in a convenient way relative to the $x$ and $y$ axes, namely, with the center of the sphere at the origin and the vertex of the cone at the far left on the $x$-axis.

Notice that the function we want to maximize, $\ds \pi r^2h/3$,
depends on *two* variables. This is frequently the case, but
often the two variables are related in some way so that "really''
there is only one variable. So our next step is to
find the relationship and use it to solve for one of the variables in
terms of the other, so as to have a function of only one variable to
maximize. In this problem, the condition is apparent in the figure:
the upper corner of the triangle, whose coordinates are $(h-R,r)$,
must be on the circle of radius $R$. That is,
$$
(h-R)^2+r^2=R^2.
$$
We can solve for $h$ in terms of $r$ or for $r$ in terms of $h$.
Either involves taking a square root, but we notice that the volume
function contains $\ds r^2$, not $r$ by itself, so it is easiest to solve
for $\ds r^2$ directly: $\ds r^2=R^2-(h-R)^2$.
Then we substitute the result into $\ds \pi r^2h/3$:
$$
\eqalign{ V(h)&=\pi(R^2-(h-R)^2)h/3\cr
&=-{\pi\over3}h^3+{2\over3}\pi h^2R\cr
}$$
We want to maximize $V(h)$ when $h$ is between 0 and $2R$. Now we
solve $\ds 0=f'(h)=-\pi h^2+(4/3)\pi h R$, getting $h=0$ or $h=4R/3$.
We compute $V(0)=V(2R)=0$ and $\ds V(4R/3)=(32/81)\pi R^3$. The maximum is
the latter; since the volume of the sphere is $\ds (4/3)\pi R^3$, the
fraction of the sphere occupied by the cone is
$${(32/81)\pi R^3\over (4/3)\pi R^3}={8\over 27}\approx 30\%.$$
$\square$

Example 6.1.11 You are making cylindrical containers to contain a given volume. Suppose that the top and bottom are made of a material that is $N$ times as expensive (cost per unit area) as the material used for the lateral side of the cylinder. Find (in terms of $N$) the ratio of height to base radius of the cylinder that minimizes the cost of making the containers.

Let us first choose letters to represent various things: $h$ for the height, $r$ for the base radius, $V$ for the volume of the cylinder, and $c$ for the cost per unit area of the lateral side of the cylinder; $V$ and $c$ are constants, $h$ and $r$ are variables. Now we can write the cost of materials: $$ c(2\pi rh)+Nc(2\pi r^2). $$ Again we have two variables; the relationship is provided by the fixed volume of the cylinder: $\ds V=\pi r^2h$. We use this relationship to eliminate $h$ (we could eliminate $r$, but it's a little easier if we eliminate $h$, which appears in only one place in the above formula for cost). The result is $$ f(r)=2c\pi r{V\over\pi r^2}+2Nc\pi r^2={2cV\over r}+2Nc\pi r^2. $$ We want to know the minimum value of this function when $r$ is in $(0,\infty)$. We now set $\ds 0=f'(r)=-2cV/r^2+4Nc\pi r$, giving $\ds r={\root 3 \of {V/(2N\pi)}}$. Since $\ds f''(r)=4cV/r^3+4Nc\pi$ is positive when $r$ is positive, there is a local minimum at the critical value, and hence a global minimum since there is only one critical value.

Finally, since $\ds h=V/(\pi r^2)$, $$ {h\over r}={V\over\pi r^3}={V\over \pi(V/(2N\pi))}=2N, $$ so the minimum cost occurs when the height $h$ is $2N$ times the radius. If, for example, there is no difference in the cost of materials, the height is twice the radius (or the height is equal to the diameter). $\square$

Example 6.1.12 Suppose you want to reach a point $A$ that is located across the sand from a nearby road (see figure 6.1.5). Suppose that the road is straight, and $b$ is the distance from $A$ to the closest point $C$ on the road. Let $v$ be your speed on the road, and let $w$, which is less than $v$, be your speed on the sand. Right now you are at the point $D$, which is a distance $a$ from $C$. At what point $B$ should you turn off the road and head across the sand in order to minimize your travel time to $A$?

Let $x$ be the distance short of $C$ where you turn off, i.e., the distance from $B$ to $C$. We want to minimize the total travel time. Recall that when traveling at constant velocity, time is distance divided by velocity.

You travel the distance $\ds \overline{DB}$ at speed $v$, and then the distance $\ds \overline{BA}$ at speed $w$. Since $\ds \overline{DB}=a-x$ and, by the Pythagorean theorem, $\ds \overline{BA}=\sqrt{x^2+b^2}$, the total time for the trip is $$ f(x)={a-x\over v}+{\sqrt{x^2+b^2}\over w}. $$ We want to find the minimum value of $f$ when $x$ is between 0 and $a$. As usual we set $f'(x)=0$ and solve for $x$: $$ \displaylines{ 0=f'(x)=-{1\over v}+{x\over w\sqrt{x^2+b^2}}\cr w\sqrt{x^2+b^2}=vx\cr w^2(x^2+b^2) = v^2x^2\cr w^2b^2=(v^2-w^2)x^2\cr x={wb\over\sqrt{v^2-w^2}} }$$ Notice that $a$ does not appear in the last expression, but $a$ is not irrelevant, since we are interested only in critical values that are in $[0,a]$, and $\ds wb/\sqrt{v^2-w^2}$ is either in this interval or not. If it is, we can use the second derivative to test it: $$ f''(x) = {b^2\over (x^2+b^2)^{3/2}w}. $$ Since this is always positive there is a local minimum at the critical point, and so it is a global minimum as well.

If the critical value is not in $[0,a]$ it is larger than $a$. In this case the minimum must occur at one of the endpoints. We can compute $$ \eqalign{ f(0)&={a\over v}+{b\over w}\cr f(a)&={\sqrt{a^2+b^2}\over w}\cr }$$ but it is difficult to determine which of these is smaller by direct comparison. If, as is likely in practice, we know the values of $v$, $w$, $a$, and $b$, then it is easy to determine this. With a little cleverness, however, we can determine the minimum in general. We have seen that $f''(x)$ is always positive, so the derivative $f'(x)$ is always increasing. We know that at $\ds wb/\sqrt{v^2-w^2}$ the derivative is zero, so for values of $x$ less than that critical value, the derivative is negative. This means that $f(0)>f(a)$, so the minimum occurs when $x=a$.

So the upshot is this: If you start farther away from $C$ than $\ds wb/\sqrt{v^2-w^2}$ then you always want to cut across the sand when you are a distance $\ds wb/\sqrt{v^2-w^2}$ from point $C$. If you start closer than this to $C$, you should cut directly across the sand. $\square$

**Summary—Steps to solve an optimization problem.**

1. Decide what the variables are and what the constants are, draw a diagram if appropriate, understand clearly what it is that is to be maximized or minimized.

2. Write a formula for the function for which you wish to find the maximum or minimum.

3. Express that formula in terms of only one variable, that is, in the form $f(x)$.

4. Set $f'(x)=0$ and solve. Check all critical values and endpoints to determine the extreme value.

## Exercises 6.1

**Ex 6.1.1**
Let $\ds f(x) = \cases{1 + 4 x -x^2 & for $x\leq3$\cr
(x+5)/2 &for $x>3$\cr}$

Find the maximum value and minimum values of $f(x)$ for $x$ in $[0,4]$. Graph $f(x)$ to check your answers. (answer)

**Ex 6.1.2**
Find the dimensions of the rectangle of largest area having fixed perimeter
$100$.
(answer)

**Ex 6.1.3**
Find the dimensions of the rectangle of largest area having fixed perimeter
$P$.
(answer)

**Ex 6.1.4**
A box with square base and no top is to hold a volume $100$. Find
the dimensions of the box that requires the least material for the
five sides. Also find the ratio of height to side of the base.
(answer)

**Ex 6.1.5**
A box with square base is to hold a volume
$200$. The bottom and top are formed by folding in flaps from all four
sides, so that the bottom and top consist of two layers of cardboard.
Find the dimensions of the box that requires the least material.
Also find the ratio of height to side of the base.
(answer)

**Ex 6.1.6**
A box with square base and no top is to hold a volume $V$. Find (in terms
of $V$) the dimensions of the box that requires the least material for the
five sides. Also find the ratio of height to side of the base. (This
ratio will not involve $V$.)
(answer)

**Ex 6.1.7**
You have $100$ feet of fence to make a rectangular play area alongside the
wall of your house. The wall of the house bounds one side. What is the
largest size possible (in square feet) for the play area?
(answer)

**Ex 6.1.8**
You have $l$ feet of fence to make a rectangular play area alongside the
wall of your house. The wall of the house bounds one side. What is the
largest size possible (in square feet) for the play area?
(answer)

**Ex 6.1.9**
Marketing tells you that if you set the price of an item at \$10
then you will be unable to sell it, but that you can sell 500 items for
each dollar below \$10 that you set the price. Suppose your fixed costs total
\$3000, and your marginal cost is \$2 per item. What is the most profit
you can make?
(answer)

**Ex 6.1.10**
Find the area of the largest rectangle that fits inside a semicircle of
radius $10$ (one side of the rectangle is along the diameter of the
semicircle).
(answer)

**Ex 6.1.11**
Find the area of the largest rectangle that fits inside a semicircle of
radius $r$ (one side of the rectangle is along the diameter of the
semicircle).
(answer)

**Ex 6.1.12**
For a cylinder with surface area $50$, including
the top and the bottom, find the ratio of height to
base radius that maximizes the volume.
(answer)

**Ex 6.1.13**
For a cylinder with given surface area $S$, including
the top and the bottom, find the ratio of height to
base radius that maximizes the volume.
(answer)

**Ex 6.1.14**
You want to make cylindrical containers to hold 1 liter (1000 cubic
centimeters) using the
least amount of construction material. The side is made from a
rectangular piece of material, and this can be done with no material
wasted. However, the top and bottom are cut from squares of side $2r$, so
that $\ds 2(2r)^2=8r^2$ of material is needed (rather than $\ds 2\pi r^2$, which is
the total area of the top and bottom). Find the dimensions of the
container using the least amount of material, and also find the
ratio of height to
radius for this container.
(answer)

**Ex 6.1.15**
You want to make cylindrical containers of a given volume $V$ using the
least amount of construction material. The side is made from a
rectangular piece of material, and this can be done with no material
wasted. However, the top and bottom are cut from squares of side $2r$, so
that $\ds 2(2r)^2=8r^2$ of material is needed (rather than $\ds 2\pi r^2$, which is
the total area of the top and bottom). Find the optimal ratio of height to
radius.
(answer)

**Ex 6.1.16**
Given a right circular cone, you put an upside-down cone inside it so that
its vertex is at the center of the base of the larger cone and its base is
parallel to the base of the larger cone. If you choose the upside-down
cone to have the largest possible volume, what fraction of the volume of
the larger cone does it occupy? (Let $H$ and $R$ be the height and base
radius of the larger cone, and let $h$ and $r$ be the height and base
radius of the smaller cone. Hint: Use similar triangles to get an equation
relating $h$ and $r$.)
(answer)

**Ex 6.1.17**
In example 6.1.12, what happens if
$w\ge v$ (i.e., your speed on sand is at least your speed on the
road)?
(answer)

**Ex 6.1.18**
A container holding a fixed volume is being made in the shape of a cylinder
with a hemispherical top. (The hemispherical top has the same radius
as the cylinder.) Find the ratio of height to radius of the cylinder which
minimizes the cost of the container if (a) the cost per unit area of the
top is twice as great as the cost per unit area of the side, and the
container is made with no bottom; (b) the same as in (a), except that the
container is made with a circular bottom, for which the cost per unit area is
1.5 times the cost per unit area of the side.
(answer)

**Ex 6.1.19**
A piece of cardboard is 1 meter by $1/2$ meter. A square is
to be cut from each corner and the sides folded up to make an open-top
box. What are the dimensions of the box with maximum possible volume?
(answer)

**Ex 6.1.20**
(a) A square piece of cardboard of side $a$ is used to make
an open-top box by cutting out a small square from each corner and
bending up the sides. How large a square should be cut from each
corner in order that the box have maximum volume? (b) What if the
piece of cardboard used to make the box is a rectangle of sides $a$
and $b$?
(answer)

**Ex 6.1.21**
A window consists of a rectangular piece of clear glass with
a semicircular piece of colored glass on top; the
colored glass transmits only $1/2$ as much light per unit area as the
the clear glass. If the distance from
top to bottom (across both the rectangle and the semicircle) is
2 meters and the window may be no more than 1.5 meters wide, find the
dimensions of the rectangular portion of the window that lets through
the most light.
(answer)

**Ex 6.1.22**
A window consists of a rectangular piece of clear glass with
a semicircular piece of colored glass on top. Suppose that the
colored glass transmits only $k$ times as much light per unit area as
the clear glass ($k$ is between $0$ and $1$). If the distance from
top to bottom (across both the rectangle and the semicircle) is a
fixed distance $H$,
find (in terms of $k$) the ratio of vertical side to horizontal side
of the rectangle for which the window lets through the most light.
(answer)

**Ex 6.1.23**
You are designing a poster to contain a fixed amount $A$ of
printing (measured in square centimeters) and have margins of $a$
centimeters at the top and bottom and $b$ centimeters at the sides.
Find the ratio of vertical dimension to horizontal dimension of the
printed area on the poster if you want to minimize the amount of
posterboard needed.
(answer)

**Ex 6.1.24**
The strength of a rectangular beam is proportional to the product of its
width $w$ times the square of its depth $d$.
Find the dimensions of the strongest
beam that can be cut from a cylindrical log of radius $r$.
(answer)

**Ex 6.1.25**
What fraction of the volume of a sphere is taken up by the largest cylinder
that can be fit inside the sphere?
(answer)

**Ex 6.1.26**
The U.S. post office will accept a box for shipment only if the sum of the
length and girth (distance around) is at most 108 in. Find the dimensions
of the largest acceptable box with square front and back.
(answer)

**Ex 6.1.27**
Find the dimensions of the lightest cylindrical can containing 0.25 liter
(=250 cm${}^3$) if the top and bottom are made of a material that is twice
as heavy (per unit area) as the material used for the side.
(answer)

**Ex 6.1.28**
A conical paper cup is to hold $1/4$ of a liter. Find the
height and radius of the cone which minimizes
the amount of paper needed to make the cup. Use the formula $\ds \pi
r\sqrt{r^2+h^2}$ for the area of the side of a cone.
(answer)

**Ex 6.1.29**
A conical paper cup is to hold a fixed volume of water.
Find the ratio of height to base radius of the cone which minimizes
the amount of paper needed to make the cup. Use the formula $\ds \pi
r\sqrt{r^2+h^2}$ for the area of the side of a cone, called the
**lateral area** of the cone.
(answer)

**Ex 6.1.30**
If you fit the cone with the largest possible surface area (lateral area
plus area of base) into a sphere, what percent of the volume of the
sphere is occupied by the cone?
(answer)

**Ex 6.1.31**
Two electrical charges, one a positive charge A of magnitude $a$ and the
other a negative charge B of magnitude $b$, are located a distance $c$
apart. A positively charged particle $P$ is situated on the line between A
and B. Find where $P$ should be put so that the pull away from $A$ towards
$B$ is minimal. Here assume that the force from each charge is
proportional to the strength of the source and inversely proportional to
the square of the distance from the source.
(answer)

**Ex 6.1.32**
Find the fraction of the area of a triangle that is occupied by the largest
rectangle that can be drawn in the triangle (with one of its sides along a
side of the triangle). Show that this fraction does not depend on the
dimensions of the given triangle.
(answer)

**Ex 6.1.33**
How are your answers to Problem 9
affected if the cost per item for the $x$
items, instead of being simply \$2, decreases below \$2 in proportion to
$x$ (because of economy of scale and volume discounts) by 1 cent for each
25 items produced?
(answer)

**Ex 6.1.34**
You are standing near the side of a large wading pool of uniform depth when
you see a child in trouble. You can run at a speed $\ds v_1$ on land and at a
slower speed $\ds v_2$ in the water. Your perpendicular distance from the side
of the pool is $a$, the child's perpendicular distance is $b$, and the
distance along the side of the pool between the closest point to you and
the closest point to the child is $c$ (see the figure below).
Without stopping to do any calculus, you instinctively choose the
quickest route (shown in the figure) and save the child. Our
purpose is to derive a relation between the angle $\ds \theta_1$ your path
makes with the perpendicular to the side of the pool when you're on land,
and the angle $\ds \theta_2$ your path makes with the perpendicular when you're
in the water. To do this, let $x$ be the distance between the closest
point to you at the side of the pool and the point where you enter the
water. Write the total time you run (on land and in the water) in
terms of $x$ (and also the constants $\ds a,b,c,v_1,v_2$). Then set the
derivative equal to zero. The result, called "Snell's law'' or the "law
of refraction,'' also governs the bending of light when it goes into water.
(answer)