# Extracting even / odd part of summation trick. Given a function f(x), we know its even part is given as (f(x)+f(-x))/2 and its odd part is given by (f(x)-f(-x))/2.

Extracting even / odd part of summation trick
Given a function f(x), we know its even part is given as $\frac{f\left(x\right)+f\left(-x\right)}{2}$ and its odd part is given by $\frac{f\left(x\right)-f\left(-x\right)}{2}$.
Consider a discrete sequence given by ${a}_{j}$ for $j\ge 1$, then the sum of the terms in the sequence till n terms is given as
$S=\sum _{j}^{n}{a}_{j}$
Suppose I wanted to get the sum of the even terms in the above expression; then
${S}_{odd}=\sum _{j}^{n}\frac{{a}_{-j}+{a}_{j}}{2}$
and, for odd,
${S}_{odd}=\sum _{j}^{n}\frac{{a}_{j}-{a}_{-j}}{2}$
But wait, our sequence was defined for $j\ge 1$. Well, here's the thing: ${a}_{j}$ is some function of j, extending the domain to negative integers and evaluating the function gives the right answer... but I can't understand why the continuous function trick extended to here.
Examples:
Sum of first n numbers given as $\frac{n\left(n+1\right)}{2}$, sum of first n odds will be given as: $\frac{n\left(n+1\right)}{2}-\frac{n\left(1-n\right)}{2}$
My attempt at finding an exact connection: To the discrete sequence $\frac{n\left(n+1\right)}{2}$, we can associate a function $f\left(x\right)=\frac{x\left(x+1\right)}{2}$ and we can think of the summation as summing this function at several different input points i.e:
$S=\sum _{j}^{n}{a}_{j}\to \sum _{k}^{n}f\left(x+k\right)$
Then we apply the even odd decomposition and return back to the sequence world.
My question: Does there exist an association for every sequence with a function? If not, what is the criterion for an association to exist?
You can still ask an expert for help

## Want to know more about Discrete math?

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

honejata1
Step 1
The definition of "even" and "odd" used in the function definition mean that for an "even" function $g,g\left(x\right)=g\left(-x\right)$ for any x, and for an "odd" function $h,h\left(x\right)=-h\left(-x\right)$: the definitions are unrelated to the divisibility by 2 of any numbers.
Step 2
So how are the discrete sequences related? Well, sorry to burst your bubble, but they aren't. Your formula for odds working is a coincedence, and it doesn't work for evens (it evaluates to n, which is not the sum of the first n even numbers)
###### Did you like this example?
Hugo Stokes
Step 1
A different approach yields the sum of the even terms:
${S}_{\text{even}}=\sum _{j}{a}_{2j}=\sum _{j}\frac{1+\left(-1{\right)}^{j}}{2}{a}_{j}$
Step 2
Similarly, the sum of the odd terms is
${S}_{\text{odd}}=\sum _{j}{a}_{2j-1}=\sum _{j}\frac{1-\left(-1{\right)}^{j}}{2}{a}_{j}$