A characterization related to a two-point boundary value problem