Math 225: Calculus III    Solution 6

Initialization

<<Calculus`Math225`

i = {1, 0, 0}; j = {0, 1, 0}; k = {0, 0, 1};

Problem 1

Find the absolute maximum and minimum values of
	f[x_,y_] = x^4 -  x^2 y + x^3 + y^2
on the rectangular region bounded by the lines x == -3/2, x == 1,
y == -1/2, and y == 1.

Solution

f[x_,y_] = x^4 -  x^2 y + x^3 + y^2

First find critical points inside the rectangle.

cp = CriticalPoints[f[x,y]] //N

All three are inside the rectangle.

ii = f[x,y] /. cp

Now examine f[x,y] on the boundaries. Bottom side:

bot[x_] = f[x,-1/2]

CriticalPoints[bot[x]] //N

We drop the compex numbers and get one critical point on the bottom side:

bb = bot[0]

Top side:

top[x_] = f[x,1]

CriticalPoints[top[x]] //N

tt = top[x] /. %

Left side:

left[y_] = f[-3/2,y]

CriticalPoints[left[y]] //N

This is outside the range -1/2 <= y <= 1 and should not be considered.
Right side:

right[y_] = f[1,y]

CriticalPoints[right[y]] //N

rr = right[y] /. %

We must also examine the corners

cc = f[x,y] /. {{x->-3/2,y->-1/2},{x->-3/2,y->1},
                {x->  1 ,y->-1/2},{x->  1 ,y->1}}

Now compare all these values (at critical points inside and on the boundaries, as well as the corner points) to find the absolute maximum and minimum:

Max[bb,tt,rr,cc]

N[%]

The maximum is 3.0625 and it occurs at a corner {-3/2,-1/2}.

Min[bb,tt,rr,cc]

The minimum is -0.0967346 and it occurs at {1,-1.17539}, on the top side of the rectangle.

Plot3D[f[x,y],{x,-3/2,1}, {y,-1/2,1},
    ViewPoint->{2.734, 1.660, 1.104}]

Problem 2

Find the point(s) on the curve x y - 2x - y == 1 nearest to the point {1,2} by using Lagrange multipliers to find the minimum of the squared-distance function
f[x_,y_] = (x-1)^2 + (y-2)^2 subject to the above constraint.

Solution

lp = Lagrange[(x-1)^2 + (y-2)^2,
     x y - 2x - y == 1] // Simplify

Let's eliminate the complex numbers:

lp = {{x -> 1 - Sqrt[3], y -> 2 - Sqrt[3]}, 
  {x -> 1 + Sqrt[3], y -> 2 + Sqrt[3]}};

Evaluate the squared-distance function at these points:

d = (x-1)^2+(y-2)^2 /. lp

The closest points are thus {1-Sqrt[3],2-Sqrt[3]}, and {1+Sqrt[3],2+Sqrt[3]} at a distance of 6.

Problem 3

Find the extreme values of
	f[x_,y_] = x^3 + 3 x y - y^2
on the circular disk x^2 + y^2 <= 1.  ( At some point you will need to use the function Lagrange[]; you should apply  N[] to this to get a numerical answer, e.g.,
Lagrange[...] // N.)

Solution

f[x_,y_] = x^3 + 3 x y - y^2

Critical points inside the disk:

cp = CriticalPoints[f[x,y]]

ii = f[x,y] /. cp

N[ii]

Critical points on the boundary x^2 + y^2 == 1 can be found with Lagrange multipliers:

Lagrange[f[x,y], x^2 + y^2 == 1] // N

Eliminate the complex solutions:

lp =
{{y->0.698383,x->-0.715724},{y->-0.713151,x->-0.70101},
 {y->-0.866987,x->0.498331},{y->0.437939,x->0.899005}};

bb = f[x,y] /. lp

Max[ii,bb]

Min[ii,bb]

The maximum is 1.71592 and occurs at {0.899005,0.437939}. The minimum is -2.35392 and occurs at {-0.715724,0.698383}.

polar = {x,y,f[x,y]} /. {x->r Cos[t], y->r Sin[t]} //Simplify

ParametricPlot3D[polar, {r,0,1}, {t,0,2Pi}]

Problem 4

Suppose that the temperature T in degrees at the point {x,y,z} on the sphere
x^2 + y^2 + z^2 == 1 is T[x_,y_,z_] = 10(1-z^2) + x^2 y^2.
Locate where the highest and lowest temperatures on the sphere occur and what the temperatures are at those points. (Use Lagrange multipliers and be sure to ignore any complex numbers that arise.)

Solution

T[x_,y_,z_] = 10(1-z^2) + x^2 y^2

lp = Lagrange[T[x,y,z], x^2 + y^2 + z^2 == 1]

Eliminate repeats (with Union[]) and complex numbers (cut & paste):

lp = Union[lp]

lp =
 {{z -> -1, x -> 0, y -> 0}, {z -> 0, x -> -1, y -> 0}, 
   {z -> 0, x -> 0, y -> -1}, {z -> 0, x -> 0, y -> 1}, 
   {z -> 0, x -> 1, y -> 0}, 
   {z -> 0, x -> -(1/Sqrt[2]), y -> -(1/Sqrt[2])}, 
   {z -> 0, x -> -(1/Sqrt[2]), y -> 1/Sqrt[2]}, 
   {z -> 0, x -> 1/Sqrt[2], y -> -(1/Sqrt[2])}, 
   {z -> 0, x -> 1/Sqrt[2], y -> 1/Sqrt[2]}, 
   {z -> 1, x -> 0, y -> 0}};

T[x,y,z] /. lp

N[%]

The maximum temperature is 41/4 == 10.25 which occurs at the four points
{± 1/Sqrt[2], ±1/Sqrt[2], 0}. The minimum is 0 which occurs at the two poles {0,0,±1}.

Problem 5

Your firm has been asked to design a storage tank for liquid petroleum gas. The customer's specifications call for a cylindrical tank that holds 8000 m^3 of gas. The customer also wants to use the smallest amount of material possible in building the tank. What radius and height do you recommend for the tank?

Solution

The cost of material is proportional to the surface area so we must minimize (side and two ends):

Clear[s, r, t];

s[r_,h_] = 2Pi r h + 2 Pi r^2

Subject to the constraint on the volume: Pi r^2 h == 8000

lp = Lagrange[s[r,h], Pi r^2 h == 8000, {r,h}]

N[lp]

s[r,h] /. lp

N[%]

The minimum surface area is 1200 (2Pi)^(1/3) == 2214.32 and occurs when
h == 20(4/Pi)^(1/3) == 21.677,
r == 10(4/Pi)^(1/3) == 10.8385