Let $(X,M,\mu)$ be a measure space and let $ f:X \to \mathbb{R}$ be a measurable function. Assume that $f\in L^{1}(\mu)$ and $f-1 \in L^{p}(\mu)$ for some number $p\in [1,\infty)$. Prove that the positive measure $\mu$ is finite, that is $\mu(X) < \infty$.
Consider sets $\{x \in X: f(x) \geq 1/2\}$ and $\{x \in X: f(x)<1/2\}$.
Can someone pls help me with this problem, I am completely lost here
Let $A=\{x \in X: f(x) \geq | 1/2 |\}$ and $B=\{x \in X: f(x) < |1/2|\} $. We have $A\cup B=X$.
$$\int_X|f-1|^pd \mu=\int_A|f-1|^pd \mu+\int_B|f-1|^pd \mu.$$
Suppose $\mu(X)=\infty$.
Since $\int_X|f|d \mu=\int_A|f|d \mu+\int_B|f|d \mu < \infty$, then we have :
$$\int_A|f|d \mu<\infty \implies\int_A \frac 1 2 d \mu<\infty \implies \mu(A) <\infty \implies \mu(B)=\infty$$
Conisder $\int_B|f-1|^pd \mu$.
Since, on $B$, $|f(x)|< 1/2$, then $|f(x)-1| \ge 1/2$.
Then $$\int_X|f-1|^pd \mu \ge \int_B|f-1|^pd \mu \ge \int_B|1/2|^pd \mu = |1/2|^p \mu(B)=\infty.$$
Which is a contradiction.