The nonlinear Schrodinger equation with variable coefficients is analyzed by means of projection matrix method. An exact analytical solution is obtained, which clearly shows how the variable fiber dispersion, nonlinear, and loss coefficients affect the propagation of ultrashort optical pulses. The obtained solution is used to analyze the propagation properties of ultrashort pulses in dispersion-decreasing fibers. It is found that the ultrashort pulse can realize stable soliton transmission if the fiber dispersions have some certain profiles related to the fiber loss and nonlinear properties. A small variation in the dispersion has a similar perturbative effect to an amplification or loss. The exponentially dispersion-decreasing fiber is studied exemplificatively to demonstrate the obtained results.