Optimization of Light transmission

A window is in the form of a rectangle surmounted by a semicircle.

The rectangle is made of clear glass, whereas the semicircle is of tinted glass that transmits only half as much light per unit area as the clear glass does. The total perimeter is fixed.

Find the proportions of the window that will admit the most light. Neglect that thickness of the frame.

I realize that the total light will be equal to how much light the surface transmits times the amount of area.

If you call the base of the rectangle $x$, height $y$, and the light transmitted by clear glass $L$ you can say that total light is equal to $$x\cdot y\cdot L + \frac{1}{2}\cdot\pi\cdot x^2\cdot\frac{1}{2}L$$

This seems like too many variable for an optimization problem. How should I proceed?

-
Fun fact: such a window is called a Norman window. A few comments: First, if the width of the rectangle is $x$, then the radius of the circle is $x/2$. Next, you are looking for the proportions that maximize the light transmitted. That means you are looking for a ratio $x/y$. In other words, without loss of generality assume that $x$ has length 1, and that $y=kx=k\cdot 1$ where you are now optimizing over $k$. – Alex R. Dec 9 '12 at 23:27
Even if you don't make the nice observation of Alex, you are told that the perimeter is given. Call it $P$, a constant. Then $x+2y+\frac{\pi}{2}x=P$, so you only have one "free" variable. – André Nicolas Dec 10 '12 at 1:42