On series solutions of y″−f(x)y=0 and applications