How to solve a square root problem