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

For the function $$f(x)f(x)$$ we can write it as sum of even and odd functions:

$$f(x)=f(x)+f(−x)2⏟Even+f(x)−f(−x)2⏟Oddf(x)=\underbrace{\frac{f(x)+f(-x)}{2}}_{\text{Even}}+\underbrace{\frac{f(x)-f(-x)}{2}}_{\text{Odd}}$$

My question is why it is important for us to write a function as sum of these two even and odd functions? Is there any application of that?

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⊤⊤=MM^{\top\top} = M$$) leads to the expression of a square matrix as a sum of matrices that are symmetric ($$M⊤=MM^\top = M$$) and skew-symmetric ($$M⊤=−MM^\top = -M$$)
$$A=A+A⊤2+A−A⊤2 A = \frac{A + A^\top}{2} + \frac{A - A^\top}{2}$$

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

3. The swap operator on functions ($$f(x,y)↦f(y,x)f(x,y) \mapsto f(y,x)$$) or tensors ($$v⊗w↦w⊗vv \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)=f(x,y)+f(y,x)2+f(x,y)−f(y,x)2 f(x,y) = \frac{f(x,y) + f(y,x)}{2} + \frac{f(x,y) - f(y,x)}{2}$$
and
$$v⊗w=v⊗w+w⊗v2+v⊗w−w⊗v2. 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 $$RR$$ of the plane has $$R(v)=−vR(v) = -v$$ for all $$vv$$ in $$R2\mathbf R^2$$, so here the whole space “looks odd” under the effect of $$RR$$. No vector in $$R2\mathbf R^2$$ is fixed by a 180-degree rotation except for the origin.

The use of “order $$22$$” here keeps the algebra very simple, but we can also consider higher-order symmetries rather than symmetries of order 2. Consider for each $$n≥1n \geq 1$$ trying to decompose a function $$f:C→Cf:\mathbf C \to \mathbf C$$ as a sum of functions $$fk(z)f_k(z)$$ that are “twisted” by $$kk$$th powers under interior scaling by an $$nn$$th root of unity: $$fk(ζz)=ζkfk(z)f_k(\zeta z) = \zeta^k f_k(z)$$ for all $$nn$$th roots of unity $$ζ\zeta$$ (or equivalently just $$ζ=e2πi/n\zeta = e^{2\pi i/n}$$) and all complex numbers $$zz$$, where $$0≤k≤n−10 \leq k \leq n-1$$. The case $$n=2n=2$$ is even/odd functions on $$C\mathbf C$$ ($$f0(−z)=f0(z)f_0(-z) = f_0(z)$$ means $$f0f_0$$ is an even function and $$f1(−z)=−f1(z)f_1(-z) = -f_1(z)$$ means $$f1f_1$$ is an odd function). Taking $$n=4n = 4$$, we can try to decompose each function $$f:C→Cf:\mathbf C \to \mathbf C$$ as a sum of four functions
$$f(z)=f0(z)+f1(z)+f2(z)+f2(z) f(z) = f_0(z) + f_1(z) + f_2(z) + f_2(z)$$
where $$f0(iz)=f0(z)f_0(iz) = f_0(z)$$, $$f1(iz)=if1(z)f_1(iz) = if_1(z)$$, $$f2(iz)=−f2(z)f_2(iz) = -f_2(z)$$, and $$f3(iz)=−if3(z)f_3(iz) = -if_3(z)$$ for all $$z∈Cz \in \mathbf C$$.Here are formulas for each of the functions:
$$f0(z)=f(z)+f(iz)+f(−z)+f(−iz)4, f_0(z) = \frac{f(z) + f(iz) + f(-z) + f(-iz)}{4},$$
$$f1(z)=f(z)−if(iz)−f(−z)+if(−iz)4, f_1(z) = \frac{f(z) - if(iz) - f(-z) + if(-iz)}{4},$$
$$f2(z)=f(z)−f(iz)+f(−z)−f(−iz)4, f_2(z) = \frac{f(z) - f(iz) + f(-z) - f(-iz)}{4},$$
$$f3(z)=f(z)+if(iz)−f(−z)−if(−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 $$R→R\mathbf R \to \mathbf R$$. And this is useful in Fourier analysis, since the Fourier transform on functions has order $$44$$.

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 $$22$$ 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.