I'm taking a class in the fall and need to dust off my $10$-year-old calculus skills, particularly optimization. I'm attempting to remember how to tackle the classic fence problem, i.e. how to calculate the dimensions of a field so that the cost of fencing is minimized. Here's the problem:

A rectangular field is to be fenced. One side of the field is along a river and the fencing to be used on that side is twice as expensive as the fencing to be used for the other three sides. The area of the field is $900$ square meters. If $\ell =\text{ length of the field}$ and $w =\text{ width of the field}$, find the dimensions of the field that minimizes the cost of the fencing. Let $c$ be the cost of the fence per meter on $3$ sides and $2c$ the cost of the fencing on the river side.

Area is of course $\ell w = 900$, so that $w = \dfrac{900}\ell$.

I believe that I need to come up with a function that will allow me to substitute the value $\dfrac{900}\ell$ for $w$ so I have only the $\ell$ variable in the function. I then take the derivative and set it to $0$ in order to solve for the value of $\ell$, then plug the value of $\ell$ back into the area function to find the value of $w$. I would appreciate any advice on how to come up with the function and find the dimensions that will minimize the cost.


Assuming that the river runs along the length of the field, the total cost is


this is what you want to minimize. Note that the actual value of $c$ doesn’t matter, so long as it’s greater than $0$: it’s just a proportionality constant. We might as well take it to be $1$, and minimize


In other words, use the function $f(\ell)=3\ell+\dfrac{1800}\ell$, and apply the recipe that you gave in the question.

  • $\begingroup$ So, then my derivative will be $f'(\ell)=3+\dfrac{1800}\ell^2$, correct? Which means that l = the square root of 600? $\endgroup$ – user1852050 Jul 21 '13 at 3:17
  • $\begingroup$ Sorry about the edits. I can't get the denominator to look right. $\endgroup$ – user1852050 Jul 21 '13 at 3:19
  • 2
    $\begingroup$ @user1852050: Your derivative isn’t quite right: it should be $$3-\frac{1800}{\ell^2}\;,$$ since in the second term you’re differentiating $1800\ell^{-1}$. Setting to $0$ gives you $$\frac{1800}{\ell^2}=3\;,$$ or $\ell=\sqrt{600}=10\sqrt6$. Okay; I can see how you got the exponent in the wrong place, but you also have the sign of the second term wrong in the comment. You want 3-\frac{1800}{\ell^2} to get it to look right. $\endgroup$ – Brian M. Scott Jul 21 '13 at 3:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.