Question 176180
One side of the rectangle is taken up by the barn. 
That leaves 3 sides taken up by fencing. 
Let's call that side W for width and the other two sides will be L to use up the fencing.
1.{{{2L+W=100}}}
The area of the rectangle will be
2.{{{A=L*W}}}
Use eq. 1 and make the area a function of only one variable.
1.{{{2L+W=100}}}
{{{W=100-2L}}}
2.{{{A=L*W}}}
{{{A=L*(100-2L)}}}
{{{A=-2L*2+100L}}}
Now we can differentiate with respect to L and set the derivative equal to zero.
{{{dA/dL=-4L+100=0}}}
{{{L=25}}}
Let's plot the graph to make sure the area is maximum at this point,
{{{ graph( 300, 300, -10, 050, -100, 1300, -2x^2+100x) }}}
From eq. 1, 
{{{W=100-2L}}}
{{{W=100-2(25)}}}
{{{W=50}}}
The area is then,
{{{A=L*W=25*50=1250}}}
Width of 50 ft, length of 25 ft, yields a garden of 1250 sq. feet.