Let $1 \le p < +\infty$ and define the Lebesgue space as the quotient space $$ L^p(X):= \left\{f\text{: }X\rightarrow \mathbb{R} \mid \int_X \left|f\right|^p d\mu <+\infty\right\}/\sim, $$ where $f\sim g$ if and only if $f=g$ a.e. with respect to the measure $\mu$.
I was wondering the following. If $f^p$ is integrable, i.e., $[f]\in L^p (X)$, does it then follow that $f$ is equivalent to some continuous function $g: X\rightarrow \mathbb{R}$, $f\sim g$ or $f=g$ a.e.?
If the claim does not hold in general, do I have to assume something more on $p$ or the measure $\mu$, for example that $\mu$ is a Lebesgue measure? I think that one could perhaps find a counterexample if $\mu$ is something like a Hausdorff measure.
No. In general, there is no reason for a function $f \in L^p(X)$ to admit a continuous representative. For example, with $X = (0,1)$, define $$ f(x) := \begin{cases} 1 \quad \text{if } x < 1/2, \\ 0 \quad \text{if } x \geq 1/2. \end{cases} $$ Then $f \in L^p(0,1)$ for every $1 \leq p \leq +\infty$, but does not admit a continuous representative.
Typically, increasing $p$ is therefore not sufficient. You would have to add an integrability assumption on the derivatives of $f$, and rely on Sobolev embeddings.