A farmer wants to fence an area of $\displaystyle 600m^2$ in a rectangular field and divide it in half with a fence parallel to one of the sides of the rectangle. How can this be done to minimize the cost of this fence?

$\displaystyle A = L \times w$

$\displaystyle 600 = L \times w$

$\displaystyle \frac {600}{L} = w$

$\displaystyle P = 2L + w$

$\displaystyle P = 2L + \frac {600}{L}$

$\displaystyle P' = 2L - \frac {600}{L^2}$

$\displaystyle \frac {600}{L^2} = 2$

+/- $\displaystyle \sqrt{300} = L$

I stopped here because the answers in the textbook for length (which is 30m) is different and I don't know where I went wrong. Please help me?