Re: a question about the UnitStep function
- To: mathgroup at smc.vnet.net
- Subject: [mg58497] Re: a question about the UnitStep function
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Mon, 4 Jul 2005 02:24:33 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 7/3/05 at 3:57 AM, pdesai1 at umbc.edu (Pratik Desai) wrote: >Pratik Desai wrote: >>Zhou Jiang wrote: >>>Dear Mathgroup, I want to let Mathematica compute the convolution >>>of two sqare waves. I did as follows >>>f[x_]:=(UnitStep[x+1]-UnitStep[x-1])/2; >>>integrand=f[z] f[x-z]; >After seeing other posts, I realize my post was obviously wrong. I >sincerely apologize for that. Although my approach using fourier >transform should work for example if I change my approach as shown >below, I get a triangular wave but not what everybody else is >getting >Clear[f,d,d1,h,z] >f[x_]:=(UnitStep[x+1]-UnitStep[x-1])/2; >d[\[Omega]_]=FourierTransform[f[x],x,\[Omega]] >d1[\[Omega]_]=FourierTransform[f[x-1],x,\[Omega]] >h[x_]=InverseFourierTransform[d[\[Omega]]*d1[\[Omega]]//FullSimplify,\[Omega], >x] >Plot[h[x],{x,-10,10}] If you look carefully at the original poster's integrand, you will see he is convolving f with itself. So, I think your h needs to be h[x_]=InverseFourierTransform[(d[\[Omega]])^2//FullSimplify,\[Omega], x] -- To reply via email subtract one hundred and four