Optimization - Bending a Wire

HELP
Oops! The GeoGebra applet did not load correctly. Please reload your browser page and keep your fingers crossed!     Oops! The GeoGebra applet did not load correctly. Please reload your browser page and keep your fingers crossed!

A piece of wire of length `L` is bent at the red point and formed into a rectangle. As you move the red point, you can see the resulting rectangles. Let `x` be the distance from the left end of the wire to the red point where the wire is first bent. What value of `x` maximizes the area of the rectangle?