# Finding if the equation is even or odd

I am learning fourier transform and I came across this question in which author right away says the given equation is "even". How does this equation become "even"?

$$x[n]=\begin{cases}A & -M\le n\le M\\0 & \text{elsewhere}\end{cases}$$

Regards

-
Graphically, even functions are those which are symmetric about the y-axis. This function is obviously symmetric about the y-axis. –  rschwieb Jan 2 '13 at 18:31

A function $x(n)$ is even if $x(n) = x(-n)$.

For your function there are two cases:

Case 1: $|n| \leq M$. Then $x(n) = x(-n) = A.$

Case 2: $|n| > M$, and $x(n)=x(-n) = 0.$

In both cases, $x(n) = x(-n)$, so $x$ is even.

EDIT: Incidentally, the words "even" and "odd" come from the fact that if $x(n)$ is analytic, all of the terms in its Taylor series have even powers of $n$ if $x$ is even, or odd powers of $n$ if $x$ is odd. But functions can be even or odd even if they're not differentiable, such as in your case.

-
so if the limit were 0<= n <= M, the equation would have been odd? –  Umer Farooq Jan 2 '13 at 18:30
No. Odd does not mean "not even" (I know it's confusing). Rather, odd means $x(-n) = -x(n)$, which would not be the case for your modified function. $x(n) = n$ or $x(n) = \sin n$ are examples of odd functions. –  user7530 Jan 2 '13 at 18:32
so in which case this equation would be odd? –  Umer Farooq Jan 2 '13 at 18:36
$x(n) = -A$ on $-M \leq n < 0$, $x(n) = A$ on $0 < n \leq M$, and $x(n) = 0$ elsewhere. –  user7530 Jan 2 '13 at 18:38
@UmerFarooq: Another point to observe is that if $A=0$, then the function is both even and odd. Your proposed modification is neither even nor odd. –  Cameron Buie Jan 2 '13 at 19:04

For $-M\leq n\leq M$, $x(-n)=A=x(n)$. Elsewhere, $x(-n)=0=x(n)$.

-