A farmer has 25 yards of fencing to make a pig pen. He is going to use the side of the barn as one of the sides of the fence, so he only needs to fence 3 sides. What should be the dimensions of the fence in order to maximize the area?

1 answer

Area = Length * Breadth

Now we know that the perimeter in this case is of three sides i.e.:
2(Breadth) + Length = 25

So if the breadth is x, the length is 25-2x

So, area
= x(25-2x)
= 25x - 2x^2

Taking f(x) = 25x - 2x^2
f'(x) = 25 - 4x
f''(x) = -4

Equating f'(x) to zero, we see that (25/4) gives the required value of x to maximize the area.

Therefore,

Breadth = 25/4 yards
Length = 25 - 2x = 25/2 yards