The Homotopy analysis method(HAM) is adopted to find the approximate analytical solutions of the GrossPitaevskii equation,a nonlinear Schrodinger equation is used in simulation of Bose-Einstein condensates trapped in a harmonic potential.Comparisons between the analytical solutions and the numerical solutions have been made.The results indicate that they fit very well with each other when the atomic interaction is weak.