Problem:
Find the rectangle with the maximum area which can be inscribed in a semicircle.

Visualization:

You are given a semicircle of radius 1 ( see the picture on the left ). It is possible to inscribe a rectangle by placing its two vertices on the semicircle and two vertices on the x-axis. Start moving the mouse pointer over the left figure and watch the rectangle being resized.

Let's compute the area of our rectangle. If (x,y) are the coordinates of P, then we can express the area as

A=2xy

The picture on the right presents a graph of A as a function of x. As you move the mouse pointer away from the origin, you can see the area grow until x reaches approximately 0.7071. At this point A has a maximum (A=1). Then the area decreases rapidly to zero.

We can express A as a function of x by eliminating y. Since P lies on a semicircle of radius 1, x2+y2=1. Solving for y and substituting for y in A, we have

Now it is straighforward to find the exact value of x which corresponds to the largest area:

We now set

The Java applet which shows the graphs above was written by Marek Szapiel.
He also wrote most of the rest of the page.
The Javascript was written by Larry Husch.