Let $\Omega$ be an open set in $\mathbb{R}^n$ and $f\in L^p(\Omega)$, $1\leq p<\infty$. Define $||f||_{p,\Omega}=\inf\{||f-a||_p: a\in\mathbb{R}\}$.
Prove that there exists $a\in\mathbb{R}$ such that $||f||_{p,\Omega}=||f-a||_p$.
Suppose$\{\Omega_i\}$ is a sequence of bounded domains such that $\Omega_i\subset \Omega_{i+1}$ for all $i$ and $f\in L^p(\Omega_i)$ for all $i$ such that $\sup_i||f||_{p,\Omega_i}<\infty$.
Prove that the sequence $\{||f||_{p,\Omega_i}\}_{i=1}^\infty$ is a convergent sequence and $||f||_{p,\cup\Omega_i}=\lim_{i\to\infty}||f||_{p,\Omega_i}$.
How to prove these results? I get totally lost...
My idea:
choose $(a_n)_{n=1}^\infty$ such that $||f||_{p,\Omega}=\lim_{n\to\infty}||f-a_n||_p$.
step (1). First prove $(a_n)_{n=1}^\infty$ is bounded, say $|a_n|<M$ for all $n$. Suppose to the contrary, $(a_n)_{n=1}^\infty$ is not bounded. Let $K$ be a compact subset of $\Omega$ such that $\mu(K)>0$. Then $|f|<c$ on $K$ for some $c>0$. Choose a subsequence $(a_{n_k})_{k=1}^\infty$ such that $|a_{n_k}|>kc$. Then
\begin{eqnarray*} ||f-a_{n_k}||_p&=&(\int_\Omega |f-a_{n_k}|^pd\mu)^{1/p}\\ &\geq&(\int_K|f-a_{n_k}|^pd\mu)^{1/p}\\ &\geq&(\int_K((k-1)c)^pd\mu)^{1/p}\\ &=&(k-1)c\mu(k)^{1/p}.\\ \end{eqnarray*} This contradicts $f\in L^p(\Omega)$ which implies $||f||_{p,\Omega}\leq ||f||_p<\infty$.
step (2). We can choose a subsequence $(a_{n_i})_{i=1}^\infty$ such that $\lim_{i\to\infty} a_{n_i}=a$. Then \begin{eqnarray*} ||f||_{p,\Omega}&=&\lim_{i\to\infty}||f-a_{n_i}||_p\\ &=&(\lim_{i\to\infty}\int_\Omega |f-a_{n_i}|^pd\mu)^{1/p}. \end{eqnarray*}
Case (i). $\mu(\Omega)<\infty$. Then by \begin{eqnarray*} |f-a_{n_i}|^p&\leq& (|f|+|a_{n_i}|)^p\\ &\leq& 2^{p-1}(|f|^p+|a_{n_i}|^p)\\ &\leq&2^{p-1}(|f|^p+M^p) \end{eqnarray*} and Lebesgue dominated convergence theorem, we obtain \begin{eqnarray*} (\lim_{i\to\infty}\int_\Omega |f-a_{n_i}|^pd\mu)^{1/p}&=&(\int_\Omega\lim_{i\to\infty} |f-a_{n_i}|^pd\mu)^{1/p}\\ &=&(\int_\Omega |f-a|^pd\mu)^{1/p}\\ &=& ||f-a||_p \end{eqnarray*} thus $||f||_{p,\Omega}=||f-a||_p$.
How to deal with
Case (ii). $\mu(\Omega)=\infty$?
and the second part of the question?
Case (ii), when $\Omega$ has infinite measure, is actually easier: $a=0$ attains the minimum because for $a\ne 0$ the integral $\int |f-a|^p$ is infinite.
Indeed, for every $x$ we have $$\max(|f(x)|, |f(x)-a|) \ge a/2$$ which implies that the sum $ |f| + |f-a| $ is not an $L^p$ function. Since $f\in L^p$ by assumption, $f-a$ is not.
Your treatment of case (i) is reasonable, but you have not justified passing to the limit in the integral: $$ ||f||_{p,\Omega} = \lim_{i\to\infty}||f-a_{n_i}||_p$$ This can be done by dominated convergence: dominate by $(|f|+M)^p$ where $M$ is large enough so that $|a_n|\le M$ for all $n$. You'll want to check that this function is integrable, which is easy to do by splitting the domain into $|f|\le M$ and $|f|\ge M$. The former is easy, and on the latter we have $|f|+M \le 2|f|$.
I intentionally say nothing about the second problem you posted. If you want to ask two questions, ask two questions.