Let's say I have $480 to fence in a rectangular garden. 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. How can I find the dimensions of the largest possible garden.?

1 Answer
Jan 31, 2015

Let's call the length of the N and S sides #x# (feet) and the other two we will call #y# (also in feet)

Then the cost of the fence will be:

#2*x*$10# for N+S and #2*y*$15# for E+W

Then the equation for the total cost of the fence will be:

#20x+30y=480#

We separate out the #y#:
#30y=480-20x->y=16-2/3 x#

Area:
#A=x*y#, replacing the #y# in the equation we get:
#A=x*(16-2/3 x)=16x-2/3 x^2#

To find the maximum, we have to differentiate this function, and then set the derivative to #0#

#A'=16-2*2/3x=16-4/3 x=0#

Which solves for #x=12#
Substituting in the earlier equation #y=16-2/3 x=8#

Answer:
N and S sides are 12 feet
E and W sides are 8 feet
Area is 96 square feet