Answer:
9.38 ft (4th side, 2nd side) by 23.45 ft
Explanation:
You want the dimensions of the enclosure of minimum cost for an area of 220 ft² when fence for three sides cost $4/ft and the fourth side costs $16/ft.
Cost
Sides 1 and 3 will have the same dimension (x), so will cost a total of ...
4x +4x = 8x
Sides 2 and 4 will have the same dimension (y), so will cost a total of ...
4y +16y = 20y
Dimensions
The area of the enclosure is ...
xy = 220 ⇒ y = 220/x
Minimum cost
The minimum cost enclosure will have its cost evenly distributed between orthogonal pairs of sides. That is, the total cost of the front+back will be equal to the total cost of the left+right.
For minimum cost, we have ...
8x = 20y
8x = 20(220/x) . . . . . substitute for y
8x² = 4400 . . . . . . . multiply by x
x² = 550 . . . . . . . . divide by 8
x ≈ 23.45 . . . . . . square root
y = 220/√550 ≈ 2/5(23.45) ≈ 9.38
The front and back dimensions are about 23.45 ft. The left and right dimensions are about 9.38 ft, with the most expensive fence being on the right side (side 4).
__
Additional comment
The graph shows the total cost to be about $375.23.
The problem can also be solved by writing an equation for the total cost, then differentiating it to find where the derivative is zero with respect to one or the other of the dimensions. The result will be the same.
c = 8x +20(220/x)
c' = 8 -4400/x² = 0
x = √550 . . . as above
Once you see the cost ratio is 20 : 8, then you know the side length ratio is 1 : 2.5. That means the short dimension is √(220/2.5) = √88 ≈ 9.38, and the long dimension is 2.5 times that.
This sort of cost optimization problem always has the solution that the cost of one set of parallel sides is equal to the cost of the other (orthogonal) set of parallel sides. This is true even if the enclosure has a missing side, or has additional parallel sides in the form of internal partitions.