A rectangle is inscribed in a semicircle of radius 2. Let P = (x,y) be the point in the quadrant I that is a vertex of the rectangle and is on the circle.

1) Express the area A of the rectangle as a function of x.
2) Express the perimeter p of the rectangle as a function of x.