We compare three different methods to obtain solutions of Sturm-Liouville problems: a successive approximation method and two other iterative methods. We look for solutions with periodic or anti periodic boundary conditions. With some numerical test over the Mathieu equation, we compare the efficiency of these three methods. As an application, we make a numerical analysis on a model for carbon nanotubes.