Edge states may have diverse causes, in general depending on boundary conditions. Here, we will show how they appear on two situations: (i)the effective mass in quantum dots of electric character and (ii) magnetic waveguides in graphene. This is a common work with D. Barranco, S. Kuru and S. Salamanca.