Euler-Lagrange: Motivation for Definition of Weak Solutions Let $E:M\to\mathbb{R}\cup\{+\infty\}$ be an energy functional of the form \begin{equation}
E[u]=\int_\Omega L(x,u,\nabla u)dx,
\end{equation} where $M$ is a subset of $W^{1,p}(\Omega)$ $(1< p<\infty)$, and $L=L(x,z,v)$ is a nice function.
Using variational method, the minimizer of this functional is associated with the Euler-Lagrange equation \begin{equation}
\sum \partial_jL_{v_j}(x,u,\nabla u)=L_z(x,u,\nabla u).
\end{equation} All this makes sense, but I got confused by the definition of a weak solution, which is defined to be $u\in M$ such that \begin{equation}
\int_\Omega \sum L_{v_j}(x,u,\nabla u)\phi_{x_j}+L_z(x,u,\nabla u)\phi=0
\end{equation} for all $\phi\in W^{1,p}(\Omega)$.
I am in particular confused by the choice of $W^{1,p}$. Usually, when we talk about a weak solution in a general Banach space $X$, we use the dual space $X'$. That is $x\in X$ is a solution if and only if $(x,\ell)=0$ for all $\ell\in X'$. But here, we choose the 'test' functions from the same space $W^{1,p}$, not the dual space $W^{1,p'}$.
Is there a specific reason for this choice? 
Thanks!
 A: The choice of $p$ depends on $L$, and its nonlinear (in general) nature. If $L=|\nabla u|^2$, then the most convenient choice is $p=2$. If $L=|\nabla u|^s$, then $p=s/(s-1)$.
A: The E-L equations which arrived at by using the variational method is a second order PDE. By a weak solution we generally mean that the solution should have at least one order lesser regularity than the order of the PDE. Hence we seek a solution to this PDE in a space of one order lesser than the order of the PDE which is 2 in the current case. 
A: As mentioned by Yiorgos S. Smyrlis, the choice of $p$ does depend on the Lagrangian $L$. But I guess a more detailed explanation might be helpful here.
First of all, there is a very natural growth rate control on $L:\Omega\times\mathbb{R}\times\mathbb{R}^d$. Since we want the energy to be at least finite for all $u\in W^{1,p}(\Omega)$, we want to impose on $L$ \begin{equation}
|L(x,z,v)|\le C(1+|z|^p+|v|^p).
\end{equation} In this way, $|L(x,u,\nabla u)|\le C(1+|u|^p+|\nabla u|^p)$ will be in $\mathcal{L}^1(\Omega)$.
However, once we impose this control on $L$, the followings become natural \begin{equation}
|L_{z}(x,z,v)|\le C(1+|z|^{p-1}+|v|^{p-1}),
\end{equation} and \begin{equation}
|L_{v}(x,z,v)|\le C(1+|z|^{p-1}+|v|^{p-1})
\end{equation}  To see this just note that the growth rate of a function is one order higher than its derivative.
But once we have this bound on the derivatives of $L$ and note that our 'test function' is to be paired up with the derivatives of $L$, then we actually need our test function to be in $W^{1,q}$, where $q$ is the conjugate of $p/(p-1)$ (because we will end up with terms like $|u|^{p-1}\phi$, then we need to use Holder to bound this term and raise $|u|$ to the $p$th power). Then a direct computation shows \begin{equation}
q=p.
\end{equation} 
