In order to understand intuitively what happens when we approximate a filter by truncation, we have to take a little bit of detour and look at the problem from a different perspective. So we could consider the approximated filter hat-h of n as the product of the original impulse response, times a sequence w of n, which is just the indicator function for the interval minus n to plus n. So w of n is just a series of points of value 1 centered in 0, and going from minus n to n. So with this notation, the question now is, how can we express the Fourier Transform of the filter as the product of two sequences? For that, we have to study the modulation theorem. The modulation theorem is really the dual of the convolution theorem. You'll remember the convolution theorem states that the Fourier Transform of the convolution of two sequences is the product in the frequency domain of their Fourier Transforms. The modulation theorem gives us a result for the Fourier Transform of the product of two sequences, and tells us that the Fourier Transform is the convolution of the Fourier Transforms in the frequency domain. So what is a convolution in the frequency domain? Well, in C Infinity, i.e, in the space of infinite support sequences, we can define the convolution in terms of the inner product between two sequences. So the convolution between x and y is the inner product between x conjugated with y time reversed, and delayed by n. So if you apply the definition of the inner product in C Infinity, that's exactly what you get. We can adopt the same strategy in L_2 of minus Pi, Pi, which is the space where DTFTs live, and define the convolution between two Fourier Transforms as the inner product between the first Fourier Transform conjugated and the second Fourier Transform, frequency reversed and delayed by Omega. If we apply the definition of the inner product for L_2 of minus Pi, Pi, we get that the convolution between two Fourier Transforms is 1 over 2 Pi times the integral from minus Pi to Pi, of big X of e_j Sigma times big Y of e_j Omega minus Sigma in this Sigma. With this notation in place, we can prove that the DTFT of the product of two sequences is the convolution of their Fourier Transforms by working backwards. So we start with the inverse DTFT of the convolution of two Fourier Transforms, we can write it out explicitly like so. If we expand the definition of the convolution inside the integral that defines the inverse DTFT, we have the following expression, where here, you have the convolution, and outside here, you have the inverse DTFT. Now we use the same trick that we used when we proved the convolution theorem. Namely, we replace Omega with Omega minus Sigma plus Sigma in the exponential here. We managed to split the complex exponential in a way that will allow us to separate the contribution due to x and to y. Indeed, when we do so, we have the first part here, which is just the inverse DTFT of big X, and here, we have the inverse DTFT of big Y. The fact that the argument to the complex exponential has a minus Sigma term doesn't really bother us because the integral is between minus Pi and Pi, and of course, the DTFT is 2Pi periodic, so an offset does not change the result of the integral. So finally, we have indeed what we're looking for, the product of the two time-domain sequences. As an interesting aside, let's look back at the sinusoidal modulation result with the help of the modulation theorem we just studied. So the DTFT of a sequence x of n multiplied by cosine of Omega_c_n turns out to be the convolution of the DTFT of X, with the DTFT of the cosine of Omega_c_n, which is one-half Delta of Omega minus Omega_c plus Delta of Omega plus Omega_c. This Delta here is the Delta defined over the real line. So it's that functional that isolates the value of a function when it is used under the integral sign. So because of the distributive property of the convolution, we can split the above convolution product into two terms, which we write out explicitly here as convolution integrals. We have, for instance, in the first case, the integral of the product between the DTFT of x and Delta of Sigma minus Omega plus Omega_c in the Sigma. Similar here, we have the complimentary term on the negative axis, the integral of the product between the Fourier Transform of x and Delta of Sigma minus Omega minus Omega_c. Because of the sifting property of the Delta, these integrals will isolate the value for the Fourier Transform for the value of Sigma, where the argument that the Delta is equal to 0. So in the first case, we will have that the Delta will kick in for Sigma equal to Omega minus Omega_c, and in the second term, it will kick in for Sigma equal to Omega plus Omega_c. So in the end, the final result is a well-known modulated signal, one-half the Fourier Transform of the signal centered in Omega_c plus one-half the Fourier Transform of the signal centered in minus Omega_c. So this is another way to arrive at the sinusodal modulation result. But now we should go back to the reason why we started this detour into the modulation theorem and try to understand what the Gibbs phenomenon is all about. So remember, in the beginning of our detour, we were at a point where we had expressed the approximate filter hat-h of n as the product between the ideal impulse response h of n, times an indicator function that serves the purpose of isolating the points of the ideal impulse response that we want to keep. So if this is the ideal impulse response, h of n, and this is w of n, you can see that this window basically kills all these guys here and kills all these guys here, and leaves us with an FIR approximation to the impulse response. In the frequency domain, this corresponds to the convolution of the Fourier Transforms of the two actors. The Fourier Transform of the ideal impulse response is the rect function, that we know very well. The Fourier Transform of the indicator function, we have seen many times before, and it is actually the Fourier Transform of a zero-centered moving average filter. So its formula is here and it's sine of Omega 2n plus 1 over 2 divided by sine of Omega over 2. So here we're going to try and compute the convolution between the Fourier Transforms in a graphical way. Here are the actors involved in the play. We have h of e_j Omega, which is the Fourier Transform of the ideal filter. We have w of e_j Omega, which is the Fourier Transform of the indicator function, and here we have the result, which is the integral of the product of these two guys. As Omega moves along the axis here, we will recenter the Fourier Transform of the indicator function, take the product of the two, and compute the integral. In the beginning, we're just integrating the wiggles of the function over the non-zero part of the ideal impulse response. So what we have is an oscillatory behavior of small amplitude. Things start to become interesting when the main part of the Fourier Transform of the indicator function starts to overlap with the support of the rect or the ideal filter. As we approach the transition band of the filter, we see that the value of the convolution starts to grow, and as a matter of fact, it grows even more where the entire main lobe of the Fourier Transform of the window is under the rect function. As we move along, the ripples that trail the main lobe starts to get integrated and so the behavior in the passband is again oscillatory as these little ripples enter and exit the main integration interval. As we reach the other transition band, we have exactly the symmetric behavior at the other edge of the band. The shape of the Fourier Transform of the approximate filter will depend then on the shape of the Fourier Transform of the indicator function. So if we look at it here, we see that we have what is called a main lobe, here in blue, that will determine how steeply the approximate filter will transition from the stopband to the passband. The width of the main lobe is what determines the steepness, whereas the amplitude of the so-called side lobes will determine the amplitude of the error on either side of the transition band, and this is what determines the Gibbs phenomenon. So in terms of our requirements, what we would like to have is a very narrow main lobe so that the transition is very sharp. At the same time, we would like to have a very small side lobe so that the Gibbs error is kept low, and we would also like to have a short window so that the FIR will be efficient. These are very, very conflicting requirements. There is a large body of literature that is concerned with developing the best possible window in order to approximate an ideal filter. For instance, we have used a rectangular window to truncate the impulse response, but if we use a triangular window that therefore weights the impulse response and tapers it to zero in a more gradual manner, what we have is that we will be able to attenuate the Gibbs error at the price of a wider main lobe. So here, you have the comparison between a 19 tab rectangular window in gray and a 19 tab triangular window in red, and you see that the side lobes are much smaller for the triangular window, but the width of the main lobe has increased.