# 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

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

Let

The area is

The total cost of the

We have

Is is clear that we will not get the largest possible area if we spend less than

**Single Variable Calculus Solution**

We want

Now substitute in the area:

Maximize as usual:

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

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