What is the area of the rectangle of largest area that can be inscribed in a circle of radius $r$? This is an example from Khan Academy and I cannot understand the answer's explanation.
I will give their explanation and show where I am confused
Let a circle of radius $r$ be centered at the origin so its equation can be modeled by
$$x^2+y^2=r^2$$
$$y^2=r^2-x^2$$
$$y=\pm\sqrt{r^2-x^2}$$
A rectangle inscribed in the circle with sides parallel to the axes will have vertices 
$$A=(x,\sqrt{r^2-x^2}),\ B=(-x,\sqrt{r^2-x^2}),\ C=(x,-\sqrt{r^2-x^2}),\ D=(-x,-\sqrt{r^2-x^2})$$
The area of the rectangle is given by
$$F(x)=2x\cdot2y$$ where $$y^2=\sqrt{r^x-x^2}$$
$$F(x)=4x\sqrt{r^2-x^2}$$ for $$x\in\left[0,r\right]$$ only!
The following part confuses me:
Rather than wrestle with the chain and product rules, we can make the job easier by letting
$$S\left(x\right)=\left(F\left(x\right)\right)^2=16x^2(r^2-x^2)$$
$$S(x)=16r^2x^2-16x^4$$
Then
$$S^\prime\left(x\right)=32r^2x-64x^3$$
I understand how to do the rest but cannot understand why they square $F\left(x\right)$
 A: Because, since $F$ is non-negative, the point at which $F$ attains its maximum is the same point at which $F^2$ attains its maximum. But it is easier to work with $F^2$ (since it has no square roots) than with $F$.
A: As $F(x)$ is certainly non-negative, the goal 
"minimize $F(x)$"
is equivalent to the goal 
"minimize $F(x)^2$", so this is certainly a valid move. OF course, it would be a just as valid move to switch to "maximize $\arctan F(x)$" instead, but of course $F(x)^2$ has a great advantage over $F(x)$ (not to mention over $\arctan F(x)$), namely a derivative that is easier to deal with.
A: It is just because $F$ and $S$ have the same maximum point and $S$ is easier to work with. 
P.S.: they have the same maximum point because 
$$ x < y \Rightarrow x^{2} < y^{2}  $$
whenever $x,y \geq 0$.
So the maximum of $F$ is also the maximum of $S$.
A: Because $$S=xy\leq\frac{x^2+y^2}{2}=\frac{(2r)^2}{2}.$$
The equality occurs for $$xy=\frac{x^2+y^2}{2}$$ or
$$(x-y)^2=0$$ or $$x=y,$$ which says that our rectangle is a square. 
