# Weak equation of Euler Lagrange

I'm a little bit confused with the weak equation of Euler-Lagrange since it looks to have severals form of weak equations.

Let $\Omega=(a,b)\subset \mathbb R$ and $f\in \mathcal C^0(\bar\Omega\times \mathbb R\times \mathbb R )$, $f=f(x,u,\xi)$. The differents weak for I have are:

1) $$\int_a^b (f_u \varphi+f_\xi \varphi')=0,\quad \forall v\in \mathcal C_0^\infty (a,b).$$

2) $$\int_a^b(f_u \varphi+f_\xi \varphi'),\quad \forall \varphi\in W_0^{1,p}(a,b).$$

So why in one case we take $\varphi\in \mathcal C_0^\infty (a,b)$ and in an other case $\varphi\in W_0^{1,p}(a,b)$. It's a little bit confusing for me.

The space $C_0^\infty(a,b)$ is dense in $W_0^{1,p}(a,b)$. Hence, (2) follows from (1) if the terms under the integral are regular enough.
(1) follows directly from (2) since $C_0^\infty(a,b) \subset W_0^{1,p}(a,b)$.