find the dimensions of the rectangle of largest area that can be inscribed in a circle of radius r

circle:x^2+y^2=r^2

area of the rectangle = 2x2y

y = root(r^2-x^2)

area=(4x)[root(r^2-x^2)]

Area'=4r^2+4xr-8x^2/root(r^2-x^2)

4r^2+4xr-8x^2=(r+2x)(r-x)=0

x=r or x=-r/2

plugging x back into area formula

area = 4(-r/2)[root(r^2-r^2/4)]

area = -r(root3r^2)

the answer is that the sides are [root(2)]r, and that it is actually a square.

Not sure what I'm doing wrong..

also, what happened to the Latex tutorial...?