# [SOLVED]minimize the cost of the fence

#### karush

##### Well-known member
this is an optimization problem

A farmer wants to fence an area of $1.5$ million square feet
$(1.5\text{ x }10^6 \text{ ft}^2)$
in an a rectangular field and then divide it in half with a fence parallel to one of the sides of the rectangle. How can he do this so as to minimize the cost of the fence?

well, I understand the problem to mean that the fence goes around the perimeter then another fence goes down the middle dividing the area in half. So using the length $l$ as $2$ sides and another fence $l$ length going down the middle then.

total length of fence $\displaystyle f(l) = 3l+\frac{2\cdot 1.5\text{ x }10^6}{l}$

persuming this is correct then $\frac{d}{dl}f(l)=0$ would be $l$ for the min lenght of fence for that area

#### MarkFL

Staff member
I would let $0<x$ represent the 3 lengths of fence and $0<y$ represent the two lengths perpendicular to the first 3. And so the total length $L$ of fence is:

$$\displaystyle L(x,y)=3x+2y$$

This is our objective function, i.e., that which we wish to optimize.

Now, we are constrained by the fixed area $0<A$ to be enclosed, and since the area is rectangular, we may write:

$$\displaystyle A=xy$$

Solving the constraint for $y$, we obtain:

$$\displaystyle y=\frac{A}{x}$$

Hence, we may write the length function in terms of one variable:

$$\displaystyle L(x)=3x+\frac{2A}{x}$$

This is equivalent to what you have. Now, when optimizing, you do want to differentiate with respect to the independent variable and equate the result to zero, and I would also use one of the derivative tests to demonstrate that the critical value found is indeed at a minimum.

Note: I use $A$ simply so that the large number can be plugged in at the end, after the calculations are done, instead of writing it numerous times. In your third semester of calculus, you will be taught a method for problems like this that is computationally much simpler, called Lagrange multipliers.

#### karush

##### Well-known member
I changed this to avoid 2 variables

$L(x) = 3x-3\cdot 10^6\cdot x^{-1}$

so $\displaystyle\frac{d}{dx}L(x)$ is $\displaystyle 3-\frac{3\cdot 10^6}{x^2}$

then $3x^2-3\cdot 10^6=0$ so $x=1000\text { ft}$

and $\displaystyle\frac{1.5\cdot 10^6}{1000}=1500\text{ ft}$

Last edited: