Connection of localization with the problem of the bound state in a potential well