In this paper, we pay attention to the analytical method named, ansatz method for finding the exact solutions of the variable-coefficient modified KdV equation and variable coefficient diffusion-reaction equation. As a result the singular 1-soliton solution is obtained. These solutions are important for the explanation of some practical physical problems. The obtained results show that these methods provides a powerful mathematical tool for solving nonlinear equations with variable coefficients. This method can be extended to solve other variable coefficient nonlinear partial differential equations.