Even and Odd Parts

Consider a function f that is neither even nor odd.


  Clear[f,f1,f2]

Define two new functions in terms of this function.


  f1[x_]:=1/2 (f[x]+f[-x])
  f2[x_]:=1/2 (f[x]-f[-x])

Let's look at a few things.


  Simplify[f1[x]+f2[x]]


  f1[-x]
  f2[-x]

Notice anything?


  Simplify[f1[x]-f1[-x]]


  Simplify[f2[x]+f2[-x]]

Hmm...

The function 1/2 [f(x)+f(-x)] is called the even part of f(x).
The function 1/2 [f(x)-f(-x)] is called the odd part of f(x).

Examples

Up to Even and Odd Functions