Maximize the area of an inscribed rectangle.

Problem statement:

Given a curve y = f(x) in the first quadrant and a vertical line x = a > 0
determine the inscribed rectangle of maximum area which has right side 
on the line x = a. 

The accompanying animation shows y = f(x) = x2 and x = a = 3.