Suppose you have a 10x15 foot dog house and you wish to build a fence in a yard in a L shape to the north and east of the dog house. If you have 75 feet of fencing material available, what dimensions should the sides of the yard be to maximize the amount of area for the yard?


  • $\begingroup$ Imgur $\endgroup$ – user199167 Dec 10 '14 at 14:52
  • $\begingroup$ What have you tried? Can you figure out how much fence is in the other two sides from $w,h$? This becomes an equation linking $w,h$. What is the area? $\endgroup$ – Ross Millikan Dec 10 '14 at 14:57
  • $\begingroup$ Well i tried this what i have in the picture. area being equal to the Length* Width - 150 = max....... W+(w-10)+h+h+(h-15) = 75 $\endgroup$ – user199167 Dec 10 '14 at 15:00
  • 2
    $\begingroup$ @user199167 Do not deface your question. $\endgroup$ – Aditya Hase Dec 10 '14 at 16:39
  • $\begingroup$ deface? sorry, im a first time poster. I just wanted people to know i got. $\endgroup$ – user199167 Dec 10 '14 at 17:02

Hint: The two equations you wrote down in your figure are

$$2w+2h-25=75$$ and $$wh-150=\text{max}$$

where I've taken the first step in simplifying the first equation. Now solve it for one variable in terms of the other, substitute the result into the second equation so that you have a function of one variable that you're seeking to maximize, and then use calculus.

An alternative hint: Imagine you've got $100$ feet of fence, but you've got to surround the dog house as well as the yard.


If a the perimeter of a rectangle is fixed, the area is the most when length and breadth are equal (a square). So, length=breadth=75/4=18.75 As the doghouse fits in the yard, this is the answer.

  • $\begingroup$ This is not correct because the walls of the doghouse make part of the perimeter. $\endgroup$ – Ross Millikan Dec 10 '14 at 15:47

enter image description here

Perimeter of yard: $w+h+w-10+h-25=75$

$w+h=50$; $h=50-w$

Area of yard: $wh-150$ $\rightarrow$max




Area=$-(w-25)^2+475$ $\rightarrow$max when the bracket becomes $0$ i.e. $w=25$

$w+h=50$ $\rightarrow$ $25+h=50$; $h=25$

Therefore, for $Area_{max}$, $w=h=25$

  • $\begingroup$ where did you get the 25^2? were you trying to make a perfect square? $\endgroup$ – user199167 Dec 10 '14 at 16:14
  • $\begingroup$ I used $25^2$ to complete the square for w it made that bracket whole square of $(w-25)$ $\endgroup$ – Dheeraj Kumar Dec 10 '14 at 16:15
  • $\begingroup$ as I added $25^2$ in the bracket i actually subtracted it from the whole equation because of negative sign on bracket so in order to balance the equation i added another $25^2$ on the outside $\endgroup$ – Dheeraj Kumar Dec 10 '14 at 16:17
  • $\begingroup$ the equation is maximum when the stuff in the bracket is minimum i.e. 0 so i simply put w-25=0 $\endgroup$ – Dheeraj Kumar Dec 10 '14 at 16:19

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.