Counterexample for existence of a minimiser in a variational problem I'm trying to find an example of a minimisation problem of the form 
$$ \inf \{ J(u) := \int_{\Omega} f(x)|u(x)| + |\nabla u(x)|^2:\, u \in H^1, \, \int u = 1\}$$
with $\Omega$ an open and bounded domain of $\mathbb{R}^n$ and $f \in L^2$ for which a minimiser doesn't exist (so we're looking for suitable $f$ and $\Omega$). I have already shown that if we assume $f \geq 0$ then a solution exists, and if $\Omega$ is connected then the solution is unique. 
I did this by showing that if we take a minimising sequence $u_n$ then we can assume $u_n \geq 0$ (because $J(|u|) \leq J(u)$ and $\int |u| \geq \int u$). A uniform bound on  $||\nabla u_n||_2$ follows directly from the form of $J$, to get a bound on $||u_n||_2$ I use Sobolev injection to write $||u_n||_q \leq C(||u_n||_2 + ||\nabla u_n||_2)$ for some $q > 2$, then interpolation between $L^1, L^2$ and $L^q$ norms lets me uniformly bound $||u_n||_2$, therefore showing that $\{u_n\}$ is bounded in $H^1$. Extracting  a weakly convergent sequence with a limit $u$ we see that $J(u) \leq J(u_n)$ and by compacity of $H^1 \rightarrow L^1,$ $\int u = 1$ so $u$ is indeed a minimiser. 
Now - the only part of my (hopefully correct) proof that fails if we don't assume $f \geq 0$ is getting bounds on $||u_n||^2$. The weird thing is that my teacher claims that positivity of $f$ isn't necessary to show existence as long as $\Omega$ is connected and I don't quite see how it's relevant here - I only used connectness to show uniqueness of the minimiser. 
All in all, my question is: does my approach seem correct? If so, then why do we need $\Omega$ to be disconnected to exhibit an example of non-existence? How could such an example look like? Any input is much appreciated!
 A: 
I use Sobolev injection

Which requires some assumptions on the set $\Omega$. Certainly, being connected is one of them, but also the boundary should not be too irregular: cusps are a problem, as are other features that obstruct passage to the boundary.  The usual assumption in the Sobolev embedding theorem is that the domain is of Lipschitz class.
(My practice is to reserve the name domain for connected open sets; if it's not connected, then it's just an open set.)
You don't actually need an embedding into $L^q$ with $q>2$; what is really needed here is the $(2,2)$-Poincaré inequality
$$\int_\Omega |u-u_\Omega|^2 \le C\int_\Omega |\nabla u|^2 \tag{1}$$
Here the mean $u_\Omega$ is controlled by your assumption $\int_\Omega u=1$, so (1) implies an $L^2$ bound on $u$ of the form $\|u\|_{L^2}\le B+C\|\nabla u\|_{L^2}$. Then
$$\int_\Omega f|u| \ge -B'-C'\|\nabla u\|_{L^2}$$
Hence $J(u) \ge \|\nabla u\|_{L^2}^2 -B'-C'\|\nabla u\|_{L^2} \ge -M$ with $-M$ independent of $u$. The same estimates show that   $J(u)\to \infty$ as $\|u\|_{L^2}\to\infty$ (the functional is coercive). This gives the boundedness of a minimizing sequence, and the rest is as usual. 
Without  connectedness of $\Omega$ you can run into trouble even when $f\ge 0$. But let's state a counterexample for variable sign: let $\Omega$ be the disjoint union of two balls, with $f<0$ in one of them and $f=0$ in the other. Then $J$ is unbounded from below, since $u$ can be a very large positive constant in the first ball and a very large negative constant in the second. 
With $f\ge 0$ a counterexample is a bit harder to construct. Take a shrinking sequence of disjoint balls $B_k$ (so that the union is bounded) and let $f = \frac{|B_k|}{k }$ on $B_k$ where $|B_k|$ is the Lebesgue measure. Consider $u_k = \frac{1}{|B_k|}\chi_{B_k}$, which has $\int u_k=1$ and $J(u_k)=\frac{1}{k}$. As this sequence demonstrates, $\inf J = 0$. The infimum is not attained since $J(u)$ is strictly positive for every eligible $u$.
