Optical fibers have a major role in the industry and daily life. To simulate the pulse propagation in optical fibers, numerous models are seen in the literature. In this work, the Kundu-Mikherjee-Naskar model and the Schrödinger equation with anti-cubic nonlinearity are considered. To solve these models, ansatz-based methods are considered and also, the problem about the determination of ansatz is replied so that it is not clear in the literature. The results of the proposed models will play a key role due to the applications in nonlinear optics, fluid dynamics, quantum mechanics and various other branches of science.