Find the dimensions(r and h) of the right circular cylinder of greatest Surface Area that can be inscribed in a sphere of radius R.

my work so far

$\displaystyle SA=2\pi r^2+2\pi rh $

$\displaystyle r^2 + (\frac{h}{2})^2 = R^2$

$\displaystyle h=2\sqrt{R^2-r^2}$

$\displaystyle SA=2\pi r^2+4\pi r\sqrt{R^2-r^2} $

$\displaystyle \frac{dSA}{dr}=4\pi r+4\pi (\sqrt{R^2-r^2}+\frac{-2r^2}{2\sqrt{R^2-r^2}})$

I tried setting that equal to zero, but I wasn't coming up with the right answer

The answer in the book(not mine): $\displaystyle r=\sqrt{\frac{5+\sqrt{5}}{10}}R$

$\displaystyle h=2\sqrt{\frac{5-\sqrt{5}}{10}}R$

Can anyone see my error, or did I make one?