I was reading Gelfand&Fomin Calculus of Variations book, in which I found this

Lemma 2 If α(x)\alpha(x) is continuous in [a,b][a, b], and if abα(x)h(x)dx=0\int_a^b \alpha(x) h'(x)\, dx = 0 for every function ...