square approximation method