solve rsq