Hello, mido22!

Pay no attention to the man behind the curtain . . .

There is a wall in your backyard. It is so long that you can’t see its endpoints.

You want to build a fence of length L such that the area enclosed between

the wall and the fence is maximized. The fence can be of arbitrary shape,

but only its two endpoints may touch the wall.

A semicircular region has maximum area.

Code:

r r
----*---------*---------*----
* *
* *
* *
* *
* * *
L

We have: .$\displaystyle \pi r \,=\,L \quad\Rightarrow\quad r \:=\:\frac{L}{\pi}$

The area is: .$\displaystyle A \:=\:\frac{1}{2}\pi r^2 \:=\:\frac{1}{2}\pi\left(\frac{L}{\pi}\right)^2 \:=\: \dfrac{L^2}{2\pi}$