Re: FoourierTransform of a function defined in sections
- To: mathgroup at smc.vnet.net
- Subject: [mg70196] Re: FoourierTransform of a function defined in sections
- From: dimmechan at yahoo.com
- Date: Sat, 7 Oct 2006 07:07:24 -0400 (EDT)
- References: <eg4soa$ffu$1@smc.vnet.net>
Hello. On version 5.1 and newer you can work as follows: Clear[hh] hh[x_] := Piecewise[{{Sin[x]^2, Abs[x] <= Pi}, {0, x > Pi || x < Pi}}] Here is its plot Plot[hh[x], {x, -4, 4}] Here is the FT FourierTransform[hh[x], x, s] -((2*Sqrt[2/Pi]*Sin[Pi*s])/(-4*s + s^3)) Here is the numrical value for s=1/2 N[% /. s -> 1/2] 0.8510768648563898 Here is the check Chop[NIntegrate[(1/Sqrt[2*Pi])*hh[x]*Exp[I*s*x] /. s -> 1/2, {x, -Infinity, Infinity}]] 0.8510768648563898