[Math] rectangular paddock, dimensions, maximise area it encloses

dimension-theory-analysisfunctional-equationsgraphing-functionsoptimizationrectangles

Having trouble trying to work out a question which involves finding a function to graph evidence of the correct answer, any advice would be greatly appreciated. I am struggling with part 'b' a lot, please help in any way.
Ques. 1
a)A farmer has 100 metres of fencing materials and wishes to make a rectangular paddock. Find the dimensions of the paddock which will give him the maximum area. Use some form of electronic technology to justify why your answer is the maximum.
b) The farmer wants to make another rectangular paddock along a straight stretch of river. If he uses the river as one side of the paddock and again uses 100m of fencing materials, what are the dimensions of the paddock which will maximise the area it encloses?

Best Answer

Let the available length be $L=100$. The area of a rectangle is a product of the sides. Let the one side be $x$m. After using two such (opposite) sides for the fence, we have $L-2x$ meters piece left, from which we need to build two other equal sides, that is the other side is $\tfrac{L}2-x$. The area then would be $f(x)=x(\tfrac{L}2-x)=\tfrac{L}2 x-x^2$. To find such $x$ which maximizes the area, we need to solve $f'(x)=\tfrac{L}2-2x=0$, which gives $x=\tfrac{L}4$. That is, the square with the side $x=25$.

In the second case steps are similar, except the second size is defined as just $L-2x$. The function of the area in second case will differ from the first one only by the multiplication constant, so the maximum solution still would be for $x=\tfrac{L}4=25$ except that in this case it would be a smaller side, the other side would be $L-2x=50$m.