On one side of the meadow, a wall about 50 meters long borders it. Mehemed would like to enclose a rectangular area of maximum size for his cattle using an electric fence. How can he do this if he has 44 meters of wire available, which can be secured to the ground

a) every meter,
b) every 2 meters? What is the area of the enclosed sections in each case?
Solution. From the 44-meter long wire, three sides of the rectangle to be fenced must be formed, and among these, two sides of equal length will be parallel. Therefore, if the sides of the rectangle are $a$ and $b$, then $2a + b = 44$, and the enclosed area is $ab$.

From the equation $2a + b = 44$, we get $b = 44 - 2a$. We are looking for the maximum of $ab$, substituting $b$ we get:

$$
\begin{aligned}
ab & = a(44 - 2a) = 44a - 2a^2 = -2(a^2 - 22a) = -2[(a - 11)^2 - 121] = \\
& = -2(a - 11)^2 + 242.
\end{aligned}
$$

If we were to plot the image of the function $f(a) = -2(a - 11)^2 + 242$ in a coordinate system, we would get a parabola opening downwards. The maximum of the function is 242, and it is achieved at $a = 11$.

a) If the wire can be staked every meter, then the shorter side $a = 11$ meters, and the other side is: $b = 44 - 2 \cdot 11 = 22$ meters. In this case, the maximum area is: $t = 242 \, \text{m}^2$.

b) If the wire can only be staked every 2 meters, then the side $a$ cannot be 11 meters. The function is strictly decreasing for $x > 11$. Therefore, the following two possibilities arise: $a = 12 \, \text{m}$ and $b = 20 \, \text{m}$ or $a = 10 \, \text{m}$ and $b = 24 \, \text{m}$. The area in both cases is $240 \, \text{m}^2$.