Non-perturbative solutions of a nonlinear Schrödinger equation in a quadratic potential