You have not provided the shape of the area that has to be enclosed.
The ratio of the magnitude of the area enclosed to the magnitude of the length of the fence would decreases as the number of sides increases, and the sides are equal in length. In other words an equilateral triangle with an area of 250 square foot would require a longer fence than a square, and so on.
The shape of the area enclosed which requires the least fencing is a circle; a circle can be taken to be a shape that is made up of infinite number of equal sides.
A circle with an area of 250 square foot has a radius of sqrt(250/pi)
To minimize costs the enclosed area should be a circle with a radius sqrt(250/pi) foot.
Width in yards = w
Lenght in yards = l
The total area is 250 square feet.
Fence costs $1.50 per yard or $0.50 per foot.
Total area = w*l = 250 square feet. (1)
Perimeter = 2w + 2l = 2(w+l)
Cost = Perimeter in feet times cost per foot.
C = 0.50(2(w + l) = 1(w+l) = w+l (2)
From (1) l = 250/w and we substitute into (2) to get
C = w + 250/w We want to minimize this, so take the derivative.
C' = 1 - 250/w^2 C will be at a minimum or maximum when C' = 0.
1 - 250/w^2 = 0 Solve for w.
1 = 250/w^2
w^2 = 250
w = 50 feet (we reject the negative square root because width is always > 0.
if w = 50 then l = 50 since w*l = 250. Cost = (50+50) = $100