Previous Up Next

19.4.2  Continuous Fourier Transform

The Fourier transform of a function f is defined by

F(s)=
+∞


−∞
ei s x f(xdx,   s∈ℝ.     (1)

The fourier command computes the Fourier transform.

The inverse Fourier transform, as its name implies, takes a Fourier transform F(x) and returns the original function f(x). It is given by:

f(x)=
1
2 π
 
+∞


−∞
ei s x F(sds.     (2)

The ifourier command computes the inverse Fourier transform.

Note the similarity between the definitions of the Fourier transform (1) and its inverse (2). To compute the inverse transformation of F(s), it is enough to compute the Fourier transform with function F(s)/2π and using the variables s and x instead of x and s, and replacing x with −x in the result.

Transforming rational functions.

An arbitrary rational function can be transformed as long as its full partial fraction decomposition can be found.

Examples

Find the Fourier transform of f(x)=x/x3−19 x+30.

F:=fourier(x/(x^3-19x+30),x,s)
     
1
56
 π  sign
s

16 i e−2 i s −21 i e−3 i s +5 i ei s
          
ifourier(F,s,x)
     
x
x3−19 x+30
          

Find the transform of f(x)=x2+1/x2−1.

F:=fourier((x^2+1)/(x^2-1),x,s)
     
2 π  
δ
s
sign
s
sins
          
ifourier(F,s,x)
     
x2+1
x2−1
          
Transforming general functions.

A range of other (generalized) functions and distributions can be transformed, as demonstrated in the following examples. If fourier does not know how to transform a function, it returns the unevaluated integral (1). In these cases you may try to evaluate the result using eval.

Examples

fourier(3x^2+2x+1,x,s)
     
2 π  
δ
s
+2 i δ
s,1
−3 δ
s,2

          
fourier(Dirac(x-1)+Dirac(x+1),x,s)
     
coss           
fourier(exp(-2*abs(x-1)),x,s)
     
ei s
s2+4
          
fourier(atan(1/(2x^2)),x,s)
     
2 π  e

s
2
 
 sin


s
2



s
          
fourier(BesselJ(3,x),x,s)
     
s 
s2−3

i sign
s+1
+i sign
s−1

s2+1
          
F:=fourier(sin(x)*sign(x),x,s)
     
2
s2−1
          
ifourier(F,s,x)
     
sign
x
sinx
          
fourier(log(abs(x)),x,s)
     
π  
2 γ  δ
s

s
+1

s
          
fourier(rect(x),x,s)
     
sin


s
2



s
          
fourier(exp(-abs(x))*sinc(x),x,s)
     
arctan
s+1
arctan
s−1
          
fourier(1/sqrt(abs(x)),x,s)
     
2
 
π 

s
          
F:=fourier(1/cosh(2x),x,s)
     
π 
e
1
4
 π  s
 
+e
1
4
 π  s
 
          
ifourier(F,s,x)
     
2
e−2 x+ex
          
fourier(Airy_Ai(x/2),x,s)
     
e
8
3
 i s3
 
          
F:=fourier(Gamma(1+i*x/3),x,s)
     
6 π  e

s+e−3 s
 
          
ifourier(F,s,x)
     
Γ


1
3
 i x+1


          
F:=fourier(atan(x/4)/x,x,s)
     
π  ugamma
0,4 
s

          
ifourier(F,s,x)
     
arctan


x
4



x
          
assume(a>0); fourier(exp(-a*x^2+b),x,s)
     
a
 
π 
 e
s2
a
+b
 
a
          

Piecewise functions can be transformed if defined as

piecewise(x<a1,f1,x<a2,f2,…,x<an,fn,f0)

where f0,…,fn are expressions and a1,a2,…,an are real numbers such that a1<a2<⋯<an . Inequalities may be strict or non-strict. For example:

f:=piecewise(x<=-1,exp(x+1),x<=1,1,exp(2-2x)):; F:=fourier(f,x,s)
     
s cossi s sins+4 sins
s 
s−2 i

s+i
          

You can obtain the original function f from the above result by using ifourier.

ifourier(F,s,x)
     
θ
x−1
ex+1+θ
x+1
+θ
x−1
e−2 x+2θ
x−1
          

You can verify that the above expression is equal to f(x) by plotting them.

Convolution Theorem and applications.

The Fourier transform behaves nicely when applied to convolutions. Recall that the convolution fg (see Section 19.2.4) of two functions f and g is defined by

  (f∗ g)(x)=
+∞


−∞
f(tg(xtdt.

The Convolution Theorem states that

  F(f∗ g)=F(fF(g).

As an example, we use this result for computing the convolution of f(x)=e−|x| with itself.

F:=fourier(exp(-abs(x)),x,s)
     
2
s2+1
          
ifourier(F^2,s,x)
     
x θ
x
ex+x θ
x
ex+e

x
 
          

The above result is the desired convolution (ff)(x)=∫−∞+∞f(tf(xtdt.


Previous Up Next