Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am sampling a continuous signal $x_c(t)$ that follows a triangle function in the time domain, meaning:

$$x_c(t)=\left\{\begin{array}{rl}1-|t/a|,&|t|<|a|\\ 0,&\mbox{otherwise}\end{array}\right.$$

Parameter $a$ is an integer multiple of my sampling interval $T_0$ such that $a=kT_0$. Thus:

$$x_d[n]=\left\{\begin{array}{rl}1-|n/k|,&|n|<|k|\\ 0,&\mbox{otherwise}\end{array}\right.$$

I am wondering if a discrete-time Fourier transform $x_d[n]$ exists in closed-form, like the continuous-time Fourier transform of $x_c(t)$. I know that the continuous time triangle function is the convolution of two rectangular functions, and I know that the discrete-time Fourier transform exists in closed form for the rectangular function, however, I am having trouble writing down my sampled discrete version of the triangle function as a convolution of two discrete rectangles.

It is interesting that the inverse DTFT for the triangle function (i.e. triangle function in the frequency domain) is listed in this table and it looks very much like the Fourier transform of the continuous-time version. If the other side of the DTFT doesn't exist (in closed form), I'd be interested in learning the reason why, as I am new to the signal processing and Fourier analysis world.

share|cite|improve this question
up vote 3 down vote accepted

We have to compute $$X(\omega):=\sum_{n\in{\mathbb Z}}\ x(n)e^{-i\omega n}$$ for the function $$x(n):=\Bigl(1-{|n|\over N}\Bigr)\qquad (|n|<N)$$ and $x(n):=0$ otherwise. It follows that $$X(\omega)=1 +\sum_{n=1}^{N-1} \Bigl(1-{n\over N}\Bigr) (e^{i\omega n}+ e^{-i\omega n})=1 + 2 \sum_{n=1}^{N-1} \Bigl(1-{n\over N}\Bigr) \cos(n\omega)\ .$$ Mathematica can compute this sum; we get $$X(\omega)={\sin^2(N\omega/2) \over N \sin^2(\omega/2)}\ .$$ Basis of this result is the formula for the sum of the finite geometric series $\sum_{n=1}^{N-1} z^n$ and a similar formula for sums of the form $\sum_{n=1}^{N-1} n z^n$.

share|cite|improve this answer
Thanks! Didn't know it was this simple -- and the formula looks very similar to the continuous version. – M.B.M. Mar 13 '12 at 2:46

The convolution-based approach: define $y_d[n]=1$ if $0\le n<k$, and $y_d[n]=0$ otherwise. Then $$x_d[n] = \frac{1}{k} \sum_{m} y_d[m]y_d[m-n]\tag{1}$$ which is the convolution of $y_d$ with its reflection $\tilde y_d[n]=y_d[-n]$. The Fourier transform of $y_d$ is easy to find: $$ \sum_{n=0}^{k-1} e^{-i\omega n} = \frac{1-e^{-i\omega k}}{1-e^{-i\omega }} = \frac{e^{ i\omega k/2 }-e^{-i\omega k/2}}{e^{ i\omega/2 }-e^{-i\omega/2 }}e^{-i\omega(k-1)/2} = \frac{\sin(k\omega/2)}{\sin(\omega/2)} e^{-i\omega(k-1)/2} $$ The transform of reflection $\tilde y_d[n]$ is the conjugate of the above, so the only difference is the exponential term becoming $e^{i\omega(k-1)/2}$. When the transforms are multiplied, the exponential cancels out, and the result is $$\frac{\sin^2(k\omega/2)}{\sin^2(\omega/2)} $$ Recall the factor of $1/k$ in $(1)$, and that's it.

share|cite|improve this answer
This is a very nice answer -- I love the use of the fact that triangle function is a convolution of two rectangular functions. I feel it makes this a very intuitive solution. – M.B.M. Jun 3 '15 at 3:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.