Existence of solutions for two-point boundary value problems