Here's another one I'm having problems with. The equation given is

$\displaystyle S = \pi r\sqrt{r^2 + h^2}$

and you are supposed to solve for h.

I attacked it by

$\displaystyle S^2 = \pi^2r^2(r^2 + h^2)$

then

$\displaystyle \frac{S^2}{\pi^2r^2} = r^2 +h^2$

then

$\displaystyle \frac{S^2}{\pi^2r^2}-r^2=h^2$

and finally

$\displaystyle h = \pm\sqrt{\frac{S^2}{\pi^2r^2}-r^2}$

The book gives the answer as

$\displaystyle h = \frac {\sqrt{S^2 -\pi^2 r^4}} {\pi r}$

Am I on the right track but need to complete more steps to get to this?