Prove: If $f \in L^p(\mathbb{R}^n)$, then $f$ is locally integrable. I have to prove the following statement, but I am unsure of my solution:
If $f \in L^p(\mathbb{R}^n)$, then $f$ is locally integrable for $p \geq 1$.
The definition of $f$ locally integrable is that $f$ is integrable on each compact set $K \subseteq \mathbb{R}^n$. In other words
$$\int_K|f| d \mu < \infty$$
Since $f \in L^p(\mathbb{R}^n)$, 
$$||f||_p=\left| \int_{\mathbb{R}^n} |f|^p d\mu \right|^{1/p} < \infty \Rightarrow\int_{\mathbb{R}^n} |f|^p d\mu < \infty$$
$|f|^p$ is integrable iff $|f|^p\neq \infty$ almost everywhere. Therefore, $|f| \neq \infty$ almost everywhere, and
$$\int_{\mathbb{R}^n} |f| d\mu < \infty$$
Finally, for all $K \subset \mathbb{R}^n \to \mu(K) \leq \mu(\mathbb{R}^n)$ and
$$\int_K|f| d\mu \leq \int_{\mathbb{R}^n} |f| d\mu< \infty$$
I think my solution is wrong since I never used the compactness of $K$.
 A: It is not correct. 
First of all, it is recommended to write $|f|<\infty$ a.e. instead of $|f|\ne\infty$ since $0\leq|f|\leq\infty$.
And you can write $\displaystyle\int_{K}|f|d\mu\leq\int_{\mathbb{R}^{n}}|f|d\mu$ but this has nothing to do with $\mu(K)\leq\mu(\mathbb{R}^{n})$, the proper reasoning is just $|f|\chi_{K}\leq|f|$.
But it is not known whether $\displaystyle\int_{\mathbb{R}^{n}}|f|d\mu<\infty$. So it could end up with $\displaystyle\int_{K}|f|d\mu\leq\int_{\mathbb{R}^{n}}|f|d\mu=\infty$, so it is not conclusive to prove in this way.
You need Holder:
\begin{align*}
\int_{K}|f|=\int\chi_{K}|f|\leq\|f\|_{L^{p}}\|\chi_{K}\|_{L^{q}}
\end{align*}
for $1/p+1/q=1$.
A: $\int |f| d\mu <\infty$ is false. You canot say that a function is integrable simply because it is finite almost everywhere. 
Assume $p >1$ since the result is trivial for  $p=1$. You have to use the fact that compact sets have finite measure. By Holder's inequlaity $\int_K |f| \leq (\int |f|^{p})^{1/p} (\mu (K))^{1/q}$ where $q =\frac p {p-1}$. 
A: You can prove something stronger without Holder.
if X is a finite measure space and f is in $L^p(X)$ ($1\le p$).
Then f is in $L^q(X)$ for $1\le q\le p$ .
Let A be the set where $|f| \le 1$, let B be the set where $|f| \gt 1$.
$|f|^q$ is integrable on A, because $|f|^q$ is bounded and the measure space is finite.
$|f|^q$ is integrable on B, because in B, $|f|^q \le |f|^p$.
