# variational calculus

$f,g$ are continuous function $[a,b]$.Suppose $$\int_a^b{f(t)h(t)+g(t)h'(t)}dt = 0$$ for every $h$ belonging to $C^1[a,b]$ with $h'(a)=h'(b)=0$. Why it is true that

(1)$\int_a^bf(t)dt=0$---->This is clear.

(2)$g$ belongs to $C^1[a,b]$ and $g'=f$

I have no idea how to solve the second problem.

-
The statement whose proof you wish to find is called du Bois-Reymond's lemma. It might be hard to attack the problem directly, for it requires a series of similar statements. See Gelfand--Fomin, Calculus of Variatins, Sect. 3.1, Lemma 1--Lemma 4 (Lemma 4 is what you need). – Olod Mar 15 '13 at 16:15

Define $v:[a,b]\rightarrow\mathbb{R}$ by $v(x)=\int_a^x f(t)dt$. By using Fubini's theorem prove that $$\int_a^b vh'=-\int_a^b fh,\ \forall\ h\in C_c^1((a,b))$$
This implies that $$\int_a^b (v-g)h'=0,\ \forall\ h\in C_c^1((a,b))$$
As @Olod mentioned in the comments, by using du Bois-Reymond's lemma, you can prove that $v-g$ is constant. Another book where you can find the proof is Brezis, in pages 204-206.