Max与Min问题,

问题描述:

Max与Min问题,
Suppose you have to use exactly 200 m of fencing to make ether one square enclosure or two separate square enclosures of any sizes you wish.what plan gives you the least area?the greatest area?要详解,

Assume the side lengths of the two squares are a and b(when a or b equals 0, it is equivalent to making one enclosure). As the total length of the fencing is 200m, 4(a+b)=200, a+b=50->b=50-a.
The total area of the two squares will be a^2+b^2=a^2+(50-a)^2=2a^2-100a+2500=2(a-25)^2+1250
a has a value range of [0,50].
As a=25, b=25, it gives the min area 1250. The plan is to make two squares with side length of 25.
As a=50 or a=0, it gives the max area 2500. The plan is to make one square with side length of 50.