1.10: Optimization
( \newcommand{\kernel}{\mathrm{null}\,}\)
Optimization problems, that is, problems in which we seek to find the greatest or smallest value of some quantity, are common in the applications of mathematics. Because of the extreme-value property, there is a straightforward algorithm for solving optimization problems involving continuous functions on closed and bounded intervals. Hence we will treat this case first before considering functions on other intervals.
Recall that if f(c) is the maximum, or minimum, value of f on some interval I and f is differentiable at c, then f′(c)=0. Consequently, points at which the derivative vanishes will play an important role in our work on optimization.
Optimization on a Closed Interval
Suppose f is a continuous function on a closed and bounded interval [a,b]. By the extreme-value property, f attains a maximum, as well as a minimum value, on [a,b]. In particular, there is a real number c in [a,b] such that f(c)≥f(x) for all x in [a,b]. If c in (a,b) and f is differentiable at c, then we must have f′(c)=0. The only other possibilities are that f is not differentiable at c,c=a, or c=b. similar comments hold for points at which a minimum value occurs.
Definition: singular points
We call a real number c a singular point of a function f if f is defined on an open interval containing c, but is not differentiable at c.
Theorem 1.10.1
If f is a continuous function on a closed and bounded interval [a,b], then the maximum and minimum values of f occur at either
- stationary points in the open interval \((a, b),
- singular point in the open interval (a,b), or ( 3) the endpoints of [a,b].
Hence we have the following procedure for optimizing a continuous function f on an interval [a,b]:
- Find all stationary and singular points of f in the open interval (a,b).
- Evaluate f at all stationary and singular points of (a,b), and at the endpoints a and b.
- The maximum value of f is the largest value found in step ( 2) and the minimum value of f is the smallest value found in step (2).
Example 1.10.1
Consider the function g(t)=t−2cos(t) defined on the interval [0,2π]. Then
g′(t)=1+2sin(t),
and so g′(t)=0 when
sin(t)=−12.
For t in the open interval (0,2π), this means that either
t=7π6
or
t=11π6.
That is, the stationary points of g in (0,2π) are 7π6 and 11π6. Note that g is differentiable at all points in (0,2π), and so there are no singular points of g in (0,2π). Hence to identify the extreme values of g we need evaluate only
g(0)=−2,
g(7π6)=7π6+√3≈5.39724,g(11π6)=11π6−√3≈4.02753,
and
g(2π)=2π−2≈4.28319.
Thus g has a maximum value of 5.39724 at t=7π6 and a minimum value of −2 at t=0. See Figure 1.10 .1 for the graph of g on [0,2π].
Exercise 1.10.1
Find the maximum and minimum values of
f(x)=x2+16x
on the interval [1,4].
- Answer
-
Maximum value of 20 at x=4; minimum value of 12 at x=2
Exercise 1.10.2
Find the maximum and minimum values of g(t)=t−sin(2t) on the interval [0,π].
- Answer
-
Maximum value of 3.4840 at t=5π6; minimum value of −0.3424 at t=π6
Example 1.10.2
Suppose we inscribe a rectangle R inside the ellipse E with equation
4x2+y2=16,
as shown in Figure 1.10.2. If we let (x,y) be the coordinates of the upper right-hand corner of R, then the area of R is
A=(2x)(2y)=4xy.
since (x,y) is a point on the upper half of the ellipse, we have
y=√16−4x2=2√4−x2,
and so
A=8x√4−x2.
Now suppose we wish to find the dimensions of R which maximize its area. That is, we want to find the maximum value of A on the interval [0,2]. Now
dAdx=8x⋅−2x2√4−x2+8√4−x2=−8x2+8(4−x2)√4−x2=32−16x2√4−x2.
Hence dAdx=0, for x in (0,2), when 32−16x2=0, that is, when x=√2. Thus the maximum value of A must occur at x=0,x=√2, or x=2. Evaluating, we have
A|x=0=0,
A|x=√2=8√2√2=16,
and
A|x=2=0.
Hence the rectangle R inscribed in E with the largest area has area 16 when x=√2 and y=2√2. That is, R is 2√2 by 4√2.
Exercise 1.10.3
Find the dimensions of the rectangle R with largest area which may be inscribed in the ellipse with equation
x2a2+y2b2=1,
where a and b are positive real numbers.
- Answer
-
R is √2a by √2b
Exercise 1.10.4
A piece of wire, 100 centimeters in length, is cut into two pieces, one of which is used to form a square and the other a circle. Find the lengths of the pieces so that sum of the areas of the square and the circle are (a) maximum and (b) minimum.
- Answer
-
(a) all the wire is used for the circle;
(b) 43.99 cm use for the square, 56.01cm used for the circle
Exercise 1.10.5
Show that of all rectangles of a given perimeter P, the square is the one with the largest area
Optimization on Other Intervals
We now consider the case of a continuous function f on an interval I which is either not closed or not bounded. The extreme-value property does not apply in this case, and, as we have seen, we have no guarantee that f has an extreme value on the interval. Hence, in general, this situation requires more careful analysis than that of the previous section.
However, there is one case which arises frequently and which is capable of a simple analysis. Suppose that c is a point in I which is either a stationary or singular point of f, and that f is differentiable at all other points of I. If f′(x)<0 for all x in I with x<c and f′(x)>0 for all x in I with c<x, then f is decreasing before c and increasing after c, and so must have a minimum value at c. Similarly, if f′(x)>0 for all x in I with x<c and f′(x)<0 for all x in I with c<x, then f is increasing before c and decreasing after c, and so must have a maximum value at c. The next examples will illustrate.
Example 1.10.3
Consider the problem of finding the extreme values of
y=4x2+1x
on the interval (0,∞). Since
dydx=8x−1x2,
we see that dydx<0 when, and only when,
8x<1x2.
This is equivalent to
x3<18,
so dydx<0 on (0,∞) when, and only when, 0<x<12. Similarly, we see that dydx>0 when, and only when, x>12. Thus y is a decreasing function of x on the interval (0,12) and an increasing function of x on the interval (12,∞), and so must have an minimum value at x=12. Note, however, that y does not have a maximum value: given any x=c, if c<12 we may find a larger value for y by using any 0<x<c, and if c>12 we may find a larger value for y by using any x>c. Thus we conclude that y has a minimum value of 3 at x=12, but does not have a maximum value. See Figure 1.10.3.
Example 1.10.4
Consider the problem of finding the shortest distance from the point A=(0,1) to the parabola P with equation y=x2. If (x,y) is a point on P( see Figure 1.10.4), then the distance from A to (x,y) is
D=√(x−0)2+(y−1)2=√x2+(x2−1)2.
Our problem then is to find the minimum value of D on the interval (−∞,∞). However, to make the problem somewhat easier to work with, we note that, since D is always a positive value, finding the minimum value of D is equivalent
to finding the minimum value of D2. So lettingz=D2=x2+(x2−1)2=x2+x4−2x2+1=x4−x2+1,
our problem becomes that of finding the minimum value of z on (−∞,∞). Now
dzdx=4x3−2x,
so dzdx=0 when, and only when,
0=4x3−2x=2x(2x2−1),
that is, when, and only when, x=−1√2,x=0, or x=1√2. Now 2x<0 when −∞<x<0 and 2x>0 when 0<x<∞, whereas 2x2−1<0 when −1√2<x<1√2 and 2x2−1>0 either when x<−1√2 or when x>1√2. Taking the product of 2x and 2x2−1, we see that dzdx<0 when x<−1√2 and when 0<x<1√2, and dzdx>0 when −1√2<x<0 and when x>1√2. It follows that z is a decreasing function of x on (−∞,−1√2) and on (0,1√2), and is an increasing function of x on (−1√2,0) and on (1√2,∞).
It now follows that z has a local minimum of 34 at x=−1√2, a local maximum of 1 at x=0, and another local minimum of 34 at x=1√2. Note that 34 is the minimum value of z both on the the interval (−∞,0) and on the interval (0,∞); since z has a local maximum of 1 at x=0, it follows that 34 is in fact the minimum value of z on (−∞,∞). Hence we may conclude that the minimum distance from A to P is √32, and the points on P closest to A are (−1√2,12) and (1√2,12). Note, however, that z does not have a maximum value, even though it has a local maximum value at x=0. See Figure 1.10 .5 for the graph of z.
Exercise 1.10.6
Find the point on the parabola y=x2 which is closest to the point (3,0).
- Answer
-
(1,1)
Exercise 1.10.7
Show that of all rectangles of a given area A, the square is the one with the shortest perimeter.
Exercise 1.10.8
Show that of all right circular cylinders with a fixed volume V, the one with height and diameter equal has the minimum surface area.
Exercise 1.10.9
Find the points on the ellipse 4x2+y2=16 which are (a) closest to and (b) farthest from the point (0,1).
- Answer
-
(a) (4√23,43) and (−4√23,43) (b) (0,−4)