Text this: A semi-analytical method for solving the nonlinear schrodinger equation with power-law nonlinearity