A homeowner is creating a rectangular garden with an area of 140 square feet.

One side of the garden backs to the house so there is no need for a fence. The
side opposite requires a decorative fence costing $15 per foot. The two other
sides use a mesh costing $2 per foot. What are the dimensions of the garden that
will minimize cost? You can round to

side using cheap fence --- x

single side ---- y

Cost = 15y + 2(2x)
but xy = 140
y = 140/x

cost = 15(140/x) + 4x
d(cost)/dx = -2100/x^2 + 4 = 0 for a min cost

4 = 2100/x^2
4x^2 = 2100
x^2 = 525
x = √525 = appr 22.9 ft