# Optimizing a ranch

"A rancher wants to fence in an area of 1000000 square feet in a rectangular field and then divide it in half with a fence down the middle, parallel to one side. What is the shortest length of fence that the rancher can use?"

I really just need a basic walkthrough, because I thought I understood this but I can't seem to get any questions right.

If the side parallel to the middle fence has length $x$, the other side must have length $1000000/x$ to get the proper area.
If you draw a picture, you will see that you need three fences of length $x$ and two of length $1000000/x$ to do the entire fencing. Therefore, you want to minimize the total length of fencing $$L(x)=3x+2\frac {1000000}x$$ subject to $0<x<\infty$.
As in the accepted answer, let the area of the field be $A$, and the length of side parallel to the middle fence be $x$. Then the length of fencing needed, $L$, is:$$L=3x+\frac{2A}{x}$$Multiplying by $x$ and rearranging, we get the quadratic:$$3x^2-Lx+2A=0$$The discriminant of this quadratic, $D$:$$D=L^2-24A$$ has a real square root only if $$L>=\sqrt{24A}$$