A variational approach to multiplicity results for boundary value problems on the real line