> restart;

Math B14-1

Some Max Min Word Problems

Example 1. The volume of 1 kg of water at temperature [Maple Math] is given by

[Maple Math]

Find the temperature [Maple Math] of maximum density.

Solution . The density at temperature [Maple Math] is mass (1kg) divided by volume, so it is the reciprocal of the above expression. Denoting the density by [Maple Math] , we make the Maple definition

> f:= T ->
1/(999.87 -(0.06426)*T + (0.0085043)*T^2 -(0.0000679)*T^3);

[Maple Math]

We want to plot the function to get an idea of what the graph looks like. We know [Maple Math] must be non-negative, and we pick some reasonably large value of [Maple Math] for an upper limit, say [Maple Math] .

> plot(f(T),T=0..30);

Use Maple to find

> limit(f(T),T=infinity);

[Maple Math]

So we can be reasonably sure the maxium occurs within the interval we have chosen.

>

Now use calculus to find the absolute maximum of [Maple Math] on the interval [Maple Math] . In Maple we find the derivative with the D operator, that is, D(f) is the function obtained by differentiating the function f and [Maple Math] is the value of the derivative at [Maple Math] .

> D(f);

[Maple Math]

Using Maple to compute the derivative for us saves us a lot of time doing algebra. Now plot the derivative function to get some idea where it is zero.

> plot(D(f)(T), T= 0..30);

It appears there is a root somewhere near [Maple Math] . But we can just ask Maple to find this

root for us by using.

> solve(D(f)(T) = 0,T);

[Maple Math]

Note that this actually gave two solutions, but one of them is not within the interval under consideration. The only candidates for the maximum in the given interval are the first root given above or the endpoints of the interval. However, it is clear from the graph of [Maple Math] that the maximum occurs at the internal point where the derivative vanishes.

But just to be sure let's evaluate f(T) at the three values of T which are possible candidates..

> f(0); f(3.96651463); f(30);

[Maple Math]

[Maple Math]

[Maple Math]

We see that the second value is the largest, being slightly larger than the first value and not too much larger than the third value.

>

Now we solve another word problem in which the quantity to be optimized initially involves two variables but where there is a relation between the variables.

Example 2, A printed page must contain [Maple Math] of printed material. There are to be margins of 5 cm on either side and margins of 3 cm on the top and bottom. What should the dimensions [Maple Math] and [Maple Math] of the total page be in order to minimize the amount of paper used?

Hint [Maple Math] .

Solution . First we derive a formula for the function which describes the area of the rectangle: You should draw a picture of the page so you can follow the steps in the algebra below.

> A := x*y;

[Maple Math]

But there is a relation among the variables as indicated in the hint since the page must contain 60 [Maple Math] of printed material. We ask Maple to solve the equation in the hint for [Maple Math] in terms of [Maple Math] .

> expression := solve((x-10)*(y - 6) = 60,y);

[Maple Math]

Now substitute this value of y in the formula for [Maple Math] and use that to form a function only of [Maple Math] . We have to use the Maple command unapply , but don't worry about the form of the command. Note however that it produces a function of [Maple Math] .

> g := unapply(subs(y=expression,A),x);

[Maple Math]

Note that the appropriate interval to look at is [Maple Math] , since the page cannot be narrower than 10 cm. (Each margin is 5 cm.)

Now find the internal critical point(s) by setting the derivative equal to zero.

> D(g);
solve(D(g)(x)=0,x);

[Maple Math]

[Maple Math]

Clearly, [Maple Math] is the desired solution, if there is one, since [Maple Math] is outside the domain of the function. But can we be sure this problem has a solution at all? To see that it does, let's plot the function over an appropriate range. Since there was no upper limit on either dimension, the appropriate interval to draw the graph 0 to [Maple Math] .

> plot(g(x),x=10..infinity);

Note that the function does in fact have an absolute minimum. (But don't take too seriously Maple's claim that it has actually graphed the function out to infinity.) So we must have found the absolute minimum for [Maple Math] . To find the corresponding value of [Maple Math] , substitute [Maple Math] in the expression for [Maple Math] .

> subs(x=20,expression);

[Maple Math]

>

Homework

Try doing exactly the same problem, but wiith the assumption that both vertical and horizontal margins are 5 cm. Thus, in the relation between [Maple Math] and [Maple Math] , you should replace `y-6' by `y - 10'. You may either go back and change the appropriate entries in both the commands and the text, or if you are ambitious, you may try to copy it all below by copying and pasting, and change it there. You will discover that the correct value of [Maple Math] involves a square root. To evaluate the corresponding value of [Maple Math] you will have to put this value of [Maple Math] in the subs command. This will require you to use the Maple function command sqrt(a) for [Maple Math] . Put the values you obtained for [Maple Math] and [Maple Math] below. To get a decimal approximation to [Maple Math] , apply the Maple command evalf by putting it before the subs command and enclosing all of the latter in parentheses.