Why it is important to write a function as sum of even and odd functions?

When I was a high school student I thought that the even/odd decomposition you write about seemed kind of peculiar and not so fundamental. After learning more mathematics I realized the method behind it (extracting "symmetric pieces" by averaging and what you might call anti-averaging) is actually a very simple example of two important processes in mathematics: eigenspace decompositions and averaging over a group to extract symmetric pieces of a function (or vector, etc.). What I write below is not meant to give you new situations where your even/odd decomposition helps solve a calculus problem, but to show you many further examples of the same idea so you see it is quite broadly occurring in mathematics.

In nearly every situation where there is an operation that iterates twice to be the identity operation you get an analogue of the even/odd decomposition. Here are three examples.

  1. The matrix transpose (where $M^{\top\top} = M$) leads to the expression of a square matrix as a sum of matrices that are symmetric ($M^\top = M$) and skew-symmetric ($M^\top = -M$) $$ A = \frac{A + A^\top}{2} + \frac{A - A^\top}{2} $$

  2. Complex conjugation (where $\overline{\overline{z}} = z$) gives an "even/odd" type viewpoint on writing a complex number in standard form is $a+bi$, since this is the sum of a real number (fitting $\overline{w} = w$) and a purely imaginary number (fitting $\overline{w} = -w$): $$ z = \frac{z + \overline{z}}{2} + \frac{z - \overline{z}}{2} = a + bi $$ where $z = a + bi$ and $\overline{z} = a - bi$.

  3. The swap operator on functions ($f(x,y) \mapsto f(y,x)$) or tensors ($v \otimes w \mapsto w \otimes v$) leads to the expression of a function or tensor as a sum of symmetric and antisymmetric functions or tensors: $$ f(x,y) = \frac{f(x,y) + f(y,x)}{2} + \frac{f(x,y) - f(y,x)}{2} $$ and $$ v \otimes w = \frac{v \otimes w + w \otimes v}{2} + \frac{v \otimes w - w \otimes v}{2}. $$ This has a role in quantum mechanics, where it underlies the distinction between bosons (having symmetric wavefunctions) and fermions (having antisymmetric wavefunctions).

I said that in nearly every situation you get something like an even/odd decomposition because sometimes one of those parts is zero and thus uninteresting. For instance, a 180-degree rotation $R$ of the plane has $R(v) = -v$ for all $v$ in $\mathbf R^2$, so here the whole space "looks odd" under the effect of $R$. No vector in $\mathbf R^2$ is fixed by a 180-degree rotation except for the origin.

The use of "order $2$" here keeps the algebra very simple, but we can also consider higher-order symmetries rather than symmetries of order 2. Consider for each $n \geq 1$ trying to decompose a function $f:\mathbf C \to \mathbf C$ as a sum of functions $f_k(z)$ that are “twisted” by $k$th powers under interior scaling by an $n$th root of unity: $f_k(\zeta z) = \zeta^k f_k(z)$ for all $n$th roots of unity $\zeta$ (or equivalently just $\zeta = e^{2\pi i/n}$) and all complex numbers $z$, where $0 \leq k \leq n-1$. The case $n=2$ is even/odd functions on $\mathbf C$ ($f_0(-z) = f_0(z)$ means $f_0$ is an even function and $f_1(-z) = -f_1(z)$ means $f_1$ is an odd function). Taking $n = 4$, we can try to decompose each function $f:\mathbf C \to \mathbf C$ as a sum of four functions $$ f(z) = f_0(z) + f_1(z) + f_2(z) + f_2(z) $$ where $f_0(iz) = f_0(z)$, $f_1(iz) = if_1(z)$, $f_2(iz) = -f_2(z)$, and $f_3(iz) = -if_3(z)$ for all $z \in \mathbf C$.Here are formulas for each of the functions: $$ f_0(z) = \frac{f(z) + f(iz) + f(-z) + f(-iz)}{4}, $$ $$ f_1(z) = \frac{f(z) - if(iz) - f(-z) + if(-iz)}{4}, $$ $$ f_2(z) = \frac{f(z) - f(iz) + f(-z) - f(-iz)}{4}, $$ $$ f_3(z) = \frac{f(z) + if(iz) - f(-z) - if(-iz)}{4}. $$ These averaging formulas are generalizations of the formulas you wrote for determining the even/odd parts of a function $\mathbf R \to \mathbf R$. And this is useful in Fourier analysis, since the Fourier transform on functions has order $4$.

The ideas presented here extend even further to the decomposition of a representation of a finite group as a sum of irreducible representations. For the cyclic group of order $2$ there are two irreducible representations, and that is reflected in the appearance of even functions and odd functions in your formula. So the even/odd decomposition for functions in your question is a special case of a really important idea in math. It is not just some "trick" to solve artificial calculus problems.


One really neat application for this decomposition (which I saw on the YouTube channel "Flammable Maths") is evaluating integrals of the form $$\int_{-a}^a\Bigg(\frac{E(x)}{1+t^{O(x)}}\Bigg)dx$$ where $t,a>0$ are constants, $E(x)$ is a (continuous) even function, and $O(x)$ is a (continuous) odd function. If you set $f(x)=\frac{E(x)}{1+t^{O(x)}}$ and write $$f(x)=\frac{f(x)+f(-x)}{2}+\frac{f(x)-f(-x)}{2}$$ you can say that $$\int_{-a}^a\Bigg(\frac{E(x)}{1+t^{O(x)}}\Bigg)dx=\int_{-a}^a\Bigg(\frac{f(x)+f(-x)}{2}\Bigg)dx+\int_{-a}^a\Bigg(\frac{f(x)-f(-x)}{2}\Bigg)dx$$ The last integral on the RHS vanishes since we're integrating an odd function on a symmetric domain. With a little algebra $\frac{f(x)+f(-x)}{2}=\frac{1}{2}E(x)$ giving us the awesome result $$\int_{-a}^a\frac{E(x)}{1+t^{O(x)}}dx=\int_{0}^aE(x)dx$$ which is really cool! This means we can say something like $$\int_{-1}^1\Bigg(\frac{x^4-x^2+1}{1+3^{\sin^2(x)\tan(x)+x^5+x}}\Bigg)dx=\int_0^1\big(x^4-x^2+1\big)dx=\frac{13}{15}$$ This can also be used to calculate some pretty nasty double integrals! $$\int_0^1 \int_{-x^2}^{x^2}\Bigg(\frac{xy^2+x^3}{1+3^{x\tan^{11}(y)+e^x\sin^7(y)}}\Bigg)dydx=\int_0^1 \int_0^{x^2}(xy^2+y^3)dydx=\frac{5}{24}$$ Love it.

Edit: This integration technique actually generalizes to integrals of the form $$\int_{-a}^a\Bigg(\frac{E_1(x)}{1+\big(E_2(x)\big)^{O(x)}}\Bigg)dx$$ where $E_1(x),E_2(x)$ are arbitrary (continuous) even functions while $O(x)$ is an arbitrary (continuous) odd function. Using the exact same procedure delineated above we can say $$\int_{-a}^a\Bigg(\frac{E_1(x)}{1+\big(E_2(x)\big)^{O(x)}}\Bigg)dx=\int_{0}^aE_1(x)dx$$ which means $$\int_{-1}^1\Bigg(\frac{x^4+x^2+1}{1+\big(x^2e^{-x^4}+\cos(x)\sin(x^2)\big)^{x^2\tan(x^3)+x}}\Bigg)dx=\int_0^1(x^4+x^2+1)dx=\frac{23}{15}$$


The answer by KCd mentions in passing what I'll talk about, but I'll elaborate on it: the short answer is Fourier analysis.

Splitting a function into odd and even components is an extremely useful problem-solving technique when working with the Fourier transform, and the associated Fourier series. A function that is purely even or purely odd is easier to find the Fourier transform/series of.

That may seem like a niche topic, but Fourier analysis is one of the most powerful and widely used mathematical techniques. You cannot go far into any STEM field without encountering it, and so making Fourier analysis easier is more significant than you might think.

There is a wealth of knowledge on the internet about what Fourier analysis is and how it works, so I won't reiterate it here. I've found this YouTube video as a good introduction to the topic.