We can find on the web several forms of the fundamental lemma of calculus of variation, the simplest one I could find (French wikipedia ) is: for $f\in C^1([a, b])$
$$ \int_a^b f(x) g(x) dx = 0, \quad \forall g\in C^1([a, b]), \quad g(a)=g(b)=0 \quad \Leftrightarrow \quad f(x)=0, \quad \forall x\in [a, b].$$
After studying the proof I have two questions
- why assuming derivability for $g$ (sometimes we even see $C^\infty([a, b])$)?
- why do we need $g(a)=g(b)=0$ (sometimes we even see $C_c([a, b])$?
It seems to me that we need neither of them. Is it because it is a lemma (and not a theorem) and have premisses coming from another context (for example to anticipate an integration by part)?