Let $1<p<\infty$.
Let $u\in W^{1,p}(\Omega)$, where $\Omega \subset \mathbb{ R^n},$ bounded and open and connected.
First suppose we have a homogeneous PDE: $$ -\sum_{i=1}^n(|\nabla u|^{p-2}u_{x_i})_{x_i}+|u(x)|^{p-2}u(x)=0.$$
Then the Lagragian $L$ can be chosen as $$L(q,z,x)=\frac{|q|^p}{p}+\frac{|z|^p}{p}$$ ,where $q\in \mathbb{R^n},z\in \mathbb{R}, x\in \mathbb{R^n}.$
And the standard theory of calculus of variation applies then.
But if our PDE is inhomogeneous, say:
$$ -\sum_{i=1}^n(|\nabla u|^{p-2}u_{x_i})_{x_i}+|u(x)|^{p-2}u(x)=f(x),$$
with any fixed $f$ s.t. $\int_{\Omega} f\varphi dx$ defines a bounded linear functional for all $\varphi\in C_c^\infty(\Omega).$
Now it seems like we cannot write out a Lagrangian $L$ for this inhomogeneous PDE and the theory of calculus of variation doesn't apply.
My question is, can we write out a Lagrangian $L$ for this inhomogeneous PDE? If not, can one tell me why? Thanks a lot.