# A function in $L^p$ space is sum of an odd and an even function

It is used as a fact in a text but I couldn't get it immediately.

How to show that any function in $L^p([-1,1])$, $1\leq p \leq \infty$, is the sum of an odd function and an even function?

Thank you!

-

Let $f\in L^p[-1,1]$. Define $g(x)=\frac{1}{2}(f(x)+f(-x))$ and $h(x)=\frac{1}{2}(f(x)-f(-x))$. These are also in $L^p[-1,1]$, $g$ is even, $h$ is odd, and $f(x)=g(x)+h(x)$.