The following is an exercise of a text (in portuguese) on Critical Point Theory I am reading:
Use the Theorem of Lagrange Multipliers to obtain a weak solution to the problem $$ (P) \quad \begin{cases} - \Delta u + u = h(x) |u|^{q - 2}u \quad \text{ in } \Bbb{R}^N \\ u \in H^1(\Bbb{R}^N) \end{cases} $$ where $2 < q < 2^*$, $h \in L^{\frac{2^*}{2^* - q}}(\Bbb{R}^N) \cap L^\infty (\Bbb{R}^N)$, $h \geq 0$ and $h \neq 0$.
Here is what I tried:
We will assume $N \geq 3$. Consider the functionals $J, F: H^1 (\Bbb{R}^N) \longrightarrow \Bbb{R}$ defined by $$ J(u) = \frac12 ||u||^2, \quad F(u) = \frac1q \int_{\Bbb{R}^N} h(x) |u|^q \ dx. $$ We know that these functionals are both of class $C^1$, with $$ J'(u)v = \int_{\Bbb{R}^N} \nabla u \cdot \nabla v \ dx + \int_{\Bbb{R}^N} uv \ dx, \quad F'(u)v = \int_{\Bbb{R}^N} h(x)|u|^{q - 2}uv \ dx $$ for $v \in H^1(\Bbb{R}^N)$.
Let $$ M = F^{-1}(\{1\}) = \{ u \in H^1 (\Bbb{R}^N) \ : \ F(u) = 1\}. $$
To apply the Theorem of Lagrange Multipliers we need to show that $F'(u) \neq 0$ for all $u \in M$. Indeed, for all such $u$ we have that $$ F'(u)u = \int_{\Bbb{R}^N} h(x) |u|^q \ dx = q. $$
Note that $J \geq 0$, so in particular it is bounded from below on $M$. Let $$ c = \inf_M J. $$ Then there exists a sequence $(u_n) \subset M$ such that $$ J(u_n) = \frac12 ||u_n||^2 \to c \geq 0, $$ hence $(u_n)$ is bounded. Since $H^1(\Bbb{R}^N)$ is a reflexive Banach space there exists $u_0 \in H^1(\Bbb{R}^N)$ such that $u_n \rightharpoonup u_0$ in $H^1(\Bbb{R}^N)$, up to a subsequence.
Now, since we don't have compact Sobolev embeddings, I don't know how to proceed. Any hints will be the most appreciated.
Thanks in advance and kind regards.
Besides the semicontinuity of the norm mentioned in your answer, you need to show that $F(u_n) \to F(u_0)$ modulo subsequences.
Indeed, on any ball $B$, by Rellich–Kondrachov, one has $\|u_n - u_0\|_{L^q(B)} \to 0$. Therefore,
$$ \left|\int_B h \left(|u_n|^{q} - |u_0|^{q} \right)\right| \lesssim \|h\|_{L^\infty}\left(\|u_n\|_{L^q}^{q-1}+\|u_0\|_{L^q}^{q-1} \right) \|u_n - u_0\|_{L^p(B)} \to 0, $$ since $u_n$ is bounded in $H^1$.
Now, given $\varepsilon >0$, $B$ can be chosen big enough such that, $$ \|h\|_{L^\frac{2^*}{2^*-q}(B^c)} < \varepsilon. $$
This gives
$$ \left|\int_{B^c} h \left(|u_n|^{q} - |u_0|^{q} \right)\right| \lesssim \|h\|_{L^\frac{2^*}{2^*-q}(B^c)}\left(\|u_n\|_{L^{2^*}}^{q}+\|u_0\|_{L^{2^*}}^{q} \right) \lesssim \left(\|u_n\|_{H^1}^{q}+\|u_0\|_{H^1}^{q} \right) \varepsilon, $$
so that the proof of the convergence of $F(u_n)$ is done.
One finishes the way you mentioned, noting that $u_0 \in M$ and that the lower semicontinuity gives you $J(u_0) \leq c$ and therefore $J(u_0) = c$. Your scaling argument reduces the multiplier to 1.