Expansions over the 'squared' solutions and the inhomogeneous nonlinear Schrodinger equation