Convolution Example

Mathematica's Convolve command finds the convolution of two functions on the real line. To restrict to the interval [-π,π], multiply by a step functions that zeroes out the rest of the real line.

Plot[UnitBox[x],{x,-6,6}]

Plot[UnitBox[x/(2Pi)],{x,-6,6}]

g=1/(2Pi)Convolve[UnitBox[x]UnitBox[x/(2Pi)],UnitBox[x]UnitBox[x/(2Pi)],x,y]

Plot[g,{y,-Pi,Pi}]

h=1/(2Pi)Convolve[g,UnitBox[y]UnitBox[y/(2Pi)],y,z]

Plot[h,{z,-Pi,Pi},PlotRange->All]