The Du Bois-Reymond relation in the calculus of variations