How do you find the dimensions of the largest possible garden if you are given four hundred eighty dollars to fence a rectangular garden and the fencing for the north and south sides of the garden costs $10 per foot and the fencing for the east and west sides costs $15 per foot?

1 Answer
Mar 14, 2015

North and South sides should be 12 feet long and the other two sides should be 8 feet long.

The problem can be solved using the calculus of one variable or the calculus of two variables using Lagrange multipliers. The initial analysis is the same either way.
Because the question does not specify Lagrange Multipliers, I'll do the single variable solution. (It is accessible to more readers.)

Let #x# = the length in feet of the North and South sides (their cost is #$10# per foot).

Let #y# = the length in feet of the East and West sides (their cost is #$15# per foot)

The area is #A=xy#. We want to make #A# as large as possible.

The total cost of the #x# by #y# rectangle is:
#C=10x+15y+10x+15y=20x+30y# .

We have #$480# to spend.

Is is clear that we will not get the largest possible area if we spend less than #$480#. So we can see that, for largest area we'll have:
#20x+30y=480#

Single Variable Calculus Solution

We want #x# and #y# to make the product #A=xy# as large as possible. We also know that
#20x+30y=480#. Solve for #y# to get:

#y=16-2/3x#.

Now substitute in the area:
#A=x(16-2/3x)=16x-2/3x^2#

Maximize as usual:

#A'=16-4/3x=0# at #x=3/4*16=12# Clearly #A'# is never undefined. So, #12# is the only critical number for #A#.

#A''(12)<0# So #A(12)# is the global maximum.

We weren't asked or the area, but the dimensions:

#x=12#, #y=2/3x=8#

North and South sides should be 12 feet long and the other 2 sides should be 8 feet long.