Let
x---------> the length side of the rectangular area
y---------> the width side of the rectangular area
we know that
the area of the rectangle is equal to

-----> equation 
The perimeter of the rectangle is equal to

but remember that the fourth side of the rectangle will be formed by a portion of the barn wall
so
-----> equation 
<em>To minimize the cost we must minimize the perimeter</em>
Substitute the equation
in the equation 
![P=x+2*[\frac{200}{x} ]](https://tex.z-dn.net/?f=%20P%3Dx%2B2%2A%5B%5Cfrac%7B200%7D%7Bx%7D%20%20%5D%20)
Using a graph tool
see the attached figure
The minimum of the graph is the point 
that means for 
the perimeter is a minimum and equal to 
<u>Find the value of y</u>



The cost of fencing is equal to

therefore
<u>the answer is</u>
the length side of the the fourth wall will be 