For $f\in L_p$ for every $p\in (1,\infty)$ and $\| f \|_p^p=\|f\|_q^q$, determine $f$. If we have a measure space $(X,\mathcal{A},\mu)$ and are given a measurable $f$ which satisfies $f\in L_p$ for all $p\in (1,\infty)$ and $$\int |f|^p\,\mathrm{d}\mu=\int |f|^q\,\mathrm{d}\mu, \ \forall p,q\in(1,\infty) $$
Show that $f=\chi_A-\chi_B$ for two  $A,B\in\mathcal{A}$. The $\chi$ denotes the indicator function.
This should be easy, because the conditions are so strict, but somehow I can not seem to make progress. 
What I have tried is going from 
$$\int |f|^p-|f|^q\,\mathrm{d}\mu=0$$ and using the fact that $p,q$ are conjugate to get expressions like $$\int |f|^q(1-|f|^{\frac{1}{q-1}})\,\mathrm{d}\mu=0$$
but these attempts seem to get me nowhere. A little help would be appreciated, as I think I am completely on the wrong track.
 A: The assertion is equivalent to showing that $f$ takes only the values $0$, $1$ and $-1$ (up to a $\mu$-null set).
Suppose that $\mu(|f|>1)>0$, then there exists $\epsilon>0$ such that $\mu(|f| \geq 1+\epsilon)>0$. Then $$\int |f|^n \, d\mu \geq \int_{\{|f| \geq 1+\epsilon\}} |f|^n \, d\mu \geq (1+\epsilon)^n \mu(|f| \geq 1+\epsilon) \xrightarrow[]{n \to \infty} \infty,$$ which contradicts the fact that, by assumption, $\sup_{n \geq 2} \int |f|^n \, d\mu=\int |f|^2 \, d\mu< \infty$. Hence, $\mu(|f|>1)=0$, i.e. $|f| \leq 1$ $\mu$-almost everywhere.
Now suppose that $\mu(0 < |f| < 1)>0$. Then $|f|^3$ is strictly smaller than $|f|^2$ on a set of positive measure and therefore
\begin{align*} \int |f|^2 \, d\mu &= \underbrace{\int_{|f|=1} |f|^2 \, d\mu}_{=\int_{|f|=1} |f|^3 \, d\mu} + \underbrace{\int_{0<|f|<1} |f|^2 \, d\mu}_{> \int_{0<|f|<1} |f|^3 \, d\mu} \\ &> \int |f|^3 \, d\mu,\end{align*}
which contradicts our assumption that $\int f^2 \, d\mu = \int |f|^3 \, d\mu$. In conclusion, $f$ takes the values $0$, $1$ and $-1$ $\mu$-almost everywhere. If we set $A=\{f=1\}$ and $B=\{f=-1\}$, then $f=1_A-1_B$ $\mu$-a.e.
A: The first answer provided a very instructive solution, but for variety here is a solution using a "trick" rather than theory.  Under the hypotheses you have
$$\int (|f|^2 - |f|)^2 \, d\mu = \int |f|^4 \, du - 2 \int |f|^3 \, du + \int |f|^2 \, d\mu = 0.$$
Thus $|f|^2 = |f|$ almost everywhere, implying that $|f|$ takes the only the values $0$ and $1$ almost everywhere.
