0% found this document useful (0 votes)
39 views10 pages

Fourier 401

The discrete Fourier transform (DFT) provides an orthogonal basis of complex exponentials to represent periodic discrete-time signals. It decomposes a signal into its frequency components. The DFT maps a vector of N time-domain samples to a vector of N frequency-domain coefficients. It is computed using a fast Fourier transform (FFT) algorithm which runs in O(N log N) time rather than O(N^2).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views10 pages

Fourier 401

The discrete Fourier transform (DFT) provides an orthogonal basis of complex exponentials to represent periodic discrete-time signals. It decomposes a signal into its frequency components. The DFT maps a vector of N time-domain samples to a vector of N frequency-domain coefficients. It is computed using a fast Fourier transform (FFT) algorithm which runs in O(N log N) time rather than O(N^2).
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Discrete Fourier Transform (aka DFT aka FFT)

1 Introduction

We consider vectors in CN . We will define an orthogonal basis e(0) , . . . , e(N−1) which is important in many applications.
>
A vector f = [ f0 , . . . , fN−1 ]> can be written as f = fˆ0 e(0) + · · · + fˆN−1 with a coefficient vector fˆ = fˆ0 , . . . , fˆN−1 .


Recall that for an orthogonal basis we obtain the coefficients as

f , e(k)

fˆk = (k) (k) 
e ,e

1.1 1-periodic functions, trigonometric functions with frequency 0, 1, 2, . . . , M

We are interested in “periodic signals”. We say a function f is 1-periodic if

f (t + 1) = f (t) for all t ∈ R

The function f (t) may have complex values.


If a function g has period L > 0, then the function f (x) := g(Lx) has period 1. Therefore it is sufficient to consider 1-periodic
signals.
We want to approximate this signal using 1-periodic trigonometric functions of frequency 0, 1, . . . , M:

v(t) = a0 · 1 + a1 cos(2πt) + b1 sin(2πt) + · · · + aM cos(2πMt) + bM cos(2πMt)


|{z} | {z } | {z }
freq. 0 frequency 1 frequency M

with coefficients ak , bk ∈ C.
Since

eit = cost + i sint


1 1 it
cost = (eit + e−it ), e − e−it

sint =
2 2i
we can write v(t) as
M
v(t) = ∑ fˆk e2πikt
k=−M

Note that eit is on the unit circle in the complex plane. Let ω := e2πi/N . The equation zN = 1 has the N solutions

ω 0 , ω 1 , . . . , ω N−1

located on the unit circle, with angles j 2π


N , j = 0, . . . , N − 1.
1.2 Periodic functions for discrete time values, “aliasing”

We consider a step size 1/N and the discrete points t j = j/N for j ∈ Z. A signal is given by values f j at the points t j , j ∈ Z.
As the signal is periodic we have
f j+N = f j for j ∈ Z.
Hence we only need to specify the values
f = [ f0 , . . . , fN−1 ]> ∈ CN .
Let k ∈ Z be an integer. We now want to use the values of the trigonometric function e2πikt at the points t j : This function has
the values given by the vector
h i>
e(k) := e2πik·0/N , . . . , e2πik· j/N

We have so-called aliasing: We have for any k ∈ Z that e(k) = e(k+N)

e2πi(k+N)t j = e2πi(k+N) j/N = e2πi jk/N e|{z}


2πi j
= e2πikt j
1

This means that the vectors e(k) for all k ∈ Z are actually only N different vectors which keep repeating: Consider e.g. N = 5
(−2) (−1) (0) (1) (2) (3) (4)
. . . , e|{z} e(5) , |{z}
, e|{z}, e , e , e , e , e , |{z} e(6) , . . .
e(3) e(4) e(0) e(1)

In order to represent the vector f = [ f0 , . . . , f4 ]> ∈ C5 we need a basis of 5 vectors. We pick the vectors e(0) , e(1) , e(2) , e(3) , e(4) .
We could also have picked the vectors e(−2) , e(−1) , e(0) , e(1) , e(2) , but these are exactly the same vectors, just in a different
order.
We also define the corresponding vectors c(k) and s(k) for cos(k2πt) and sin(k2πt):

c(k) := [cos(k2πt0 ), . . . , cos(k2πtN−1 )]> , s(k) := [sin(k2πt0 ), . . . , sin(k2πtN−1 )]>


e(k) = c(k) + is(k) (1)
1 (k)
  1  (k) 
c(k) = e + e(−k) , s(k) = e − e(−k)
2 2i
i.e., n o n o
e(0) = c(0) , span e(k) , e(−k) = span c(k) , s(k) for k = 1, 2, 3, . . .

For N = 5 the vectors e(0) , e(1) , e(2) , e(3) , e(4) can also be written as e(0) , e(1) , e(2) , e(−2) , e(−1) because of aliasing. Hence
n o n o
C5 = span e(0) , e(1) , e(2) , e(3) , e(4) = span c(0) , c(1) , c(2) , s(1) , s(2)

This works for any odd N = 2M + 1:


n o n o
CN = span e(0) , . . . , e(N−1) = span c(0) , c(1) , . . . , c(M) , s(1) , . . . , s(M)

1.3 The discrete Fourier transform FN

We claim that the vectors e(0) , . . . , e(N−1) form an orthogonal basis of CN : We have
  N−1 N−1
e(k) , e(l) = ∑ e2πik j/N e−2πil j/N = ∑ a j a := e2πi(k−l)/N
j=0 j=0
For k = l we have a = 1 and hence  
e(k) , e(k) = N. (2)

For k, l ∈ {0, . . . , N − 1} with k 6= l we have a 6= 1 and


  N−1 aN − 1 e2πi(k−l) − 1 1 − 1
e(k) , e(l) = ∑ a j = = = = 0.
j=0 a−1 a−1 a−1

A vector f = [ f0 , . . . , fN−1 ]> ∈ CN can be written as a linear combination of e(0) , . . . , e(N−1) . Using the orthogonality we
obtain for the coefficients fˆk
f , e(k)
N−1

1 N−1
f = ∑ fˆk e (k)
fˆk = (k) (k)  = ∑ f j e−2πik j/N (3)
k=0 e ,e N j=0

Given a vector f ∈ CN in the “time domain” we obtain a vector fˆ ∈ CN in the “frequency domain”. This operation is called
the discrete Fourier transform FN , its inverse is called FN−1 :

fˆ = FN f , f = FN−1 fˆ

For odd N = 2M + 1 we have


n o n o
CN = span e(0) , . . . , e(N−1) = span c(0) , c(1) , . . . , c(M) , s(1) , . . . , s(M)

We claim that the vectors c(0) , c(1) , . . . , c(M) , s(1) , . . . , s(M) also form an orthogonal basis. Using (1) it is easy to see that
these vectors are orthogonal on each other and
      N
c(0) , c(0) = N, c(k) , c(k) = s(k) , s(k) = for k = 1, 2, 3, . . .
2

1.4 Discrete Fourier transform in Matlab


>
The discrete Fourier transform FN maps the vector f = [ f0 , . . . , fN−1 ]> in the time domain to the vector fˆ = fˆ0 , . . . , fˆN−1


in the frequency domain. The inverse discrete Fourier transform FN−1 maps the vector fˆ back to the vector ~f :

fˆ = FN f , f = FN−1 fˆ

As an example consider the vector f = [1, 1, 1, 1]> in the time domain. Since this corresponds to the function v(t) = 1 the
Fourier vector is fˆ = [1, 0, 0, 0]:

F4 [1, 1, 1, 1]> = [1, 0, 0, 0]> , F4−1 [1, 0, 0, 0]> = [1, 1, 1, 1]> .

Matlab has the built-in functions fft and ifft for the discrete Fourier transform and its inverse. But they have the factors
N, N −1 reversed, compared with our definitions. Therefore we define
four = @(f)fft(f)/length(f);
ifour = @(f) ifft(f)*length(f);

Then we can compute the discrete Fourier transform in Matlab:


>> f = [1,1,1,1]
f = 1 1 1 1
>> fh = four(f)
fh = 1 0 0 0
>> ifour(fh)
ans = 1 1 1 1
In Matlab all indices are shifted by 1: You can access components of a Matlab vector v using v(1), v(2), ... .
Note that Matlab begins counting with 1, whereas our data and Fourier vectors are indexed from 0 to N − 1. Therefore fˆj
corresponds to fh(j+1) in Matlab. In our example we have fˆ = ( fˆ0 , fˆ1 , fˆ2 , fˆ3 ) = (1, 0, 0, 0) and fˆ0 corresponds to fh(1) in
Matlab.

1.5 Interpretation of fˆ0 , . . . , fˆN−1 and the interpolating function v(t)

Case of odd N
>
Assume we have for N = 5 a vector f = [ f0 , . . . , f4 ]> and we compute the discrete Fourier transform fˆ = fˆ0 , fˆ1 , fˆ2 , fˆ3 , fˆ4 .


This means that

f = fˆ0 e(0) + fˆ1 e(1) + fˆ2 e(2) + fˆ3 e(3) + fˆ4 e(4)
z}|{ z}|{
(0) (1) (2) (−2)
ˆ ˆ ˆ
= f0 e + f1 e + f2 e + f3 e ˆ + f4 e(−1)
ˆ
= a0 c(0) + a1 c(1) + a2 c(2) + b1 s(1) + b2 s(2)

using aliasing.
For [a0 , a1 , a2 , b1 , b2 ]> ∈ R5 we obviously have that f = a0 c(0) + a1 c(1) + a2 c(2) + b1 s(1) + b2 s(2) ∈ R5 . Since
c(0) , c(1) , c(2) , s(1) , s(2) are linearly independent vectors in R5 a vector f ∈ R5 corresponds to a unique vector
[a0 , a1 , a2 , b1 , b2 ]> ∈ R5 .
For a real vector f ∈ R5 the coefficients fˆ0 , . . . , fˆ4 will be complex in general, but the coefficients a0 , a1 , a2 , b1 , b2 will be
real.
Therefore the function

v(t) = fˆ0 + fˆ1 e2πit + fˆ2 e4πit + fˆ3 e−4πit + fˆ4 e−2πit
= a0 · 1 + a1 cos(2πt) + a2 cos(4πt) + b1 sin(2πt) + b2 sin(4πt)

is a 1-periodic trigonometric function with frequency ≤ 2 which satisfies v(t j ) = f j . This is called an interpolating function.
>
For any odd N = 2M + 1 the Fourier vector fˆ0 , fˆ1 , . . . , fˆN−1 yields the interpolating function v(t) given by


v(t) = fˆ0 + fˆ1 e2πit + · · · + fˆn eM2πit + fˆN−M e(−M)2πit + · · · + fˆN−1 u(−1)2πit (4)
= a0 · 1 + a1 cos(2πt) + · · · + aM cos(M2πt) + b1 sin(2πt) + · · · + b2 sin(4πt) (5)

Therefore the entries of the Fourier vector should be interpreted as follows:

frequency h 0 1 2 ··· M M ··· 2 1 i


fˆ0 fˆ1 fˆ2 · · · fˆM fˆM+1 · · · fˆN−2 fˆN−1

Here fˆ0 corresponds to frequency 0, it gives the mean value of our data. Then fˆ1 and fˆN−1 together tell us about frequency
1. The highest frequency terms fˆM , fˆM+1 for frequency M are in the middle of the vector.

Case of even N
>
Consider for N = 6 a discrete signal a vector ~f = [ f0 , . . . , f5 ] with the discrete Fourier transform fˆ = fˆ0 , fˆ1 , fˆ2 , fˆ3 , fˆ4 , fˆ5 .


This means that

f = fˆ0 e(0) + fˆ1 e(1) + fˆ2 e(2) + fˆ3 |{z}


e(3) + fˆ4 |{z}
e(4) + fˆ5 |{z}
e(5)
e(−3) e(−2) e(−1)
We would like obtain a “balanced formula” with respect to positive and negative k. What should we do with e(3) ? The answer
is
e(3) = 21 e(3) + 12 e(−3)
yielding

f = fˆ0 e(0) + fˆ1 e(1) + fˆ2 e(2) + fˆ3 e(3) + fˆ4 e(4) + fˆ5 e(5)
 
= fˆ0 e(0) + fˆ1 e(1) + fˆ2 e(2) + fˆ3 21 e(3) + e(−3) + fˆ4 e(−2) + fˆ5 e(−1)
= a0 c(0) + a1 c(1) + a2 c(2) + a3 c(3) + b1 s(1) + b2 s(2)

This corresponds to the 1-periodic trigonometric function

v(t) = fˆ0 + fˆ1 e2πit + fˆ2 e4πit + fˆ3 12 e6πit + e−6πit + fˆ4 e−4πit + fˆ5 e−2πit


= c0 · 1 + a1 cos(2πt) + a2 cos(4πt) + a3 cos(6πt) + b1 sin(2πt) + b2 sin(4πt)

which satisfies v(t j ) = f j . Note that for the highest frequency 3 we only use cos(6πt) and NOT sin(6πt). This makes
sense since sin(6πt) is zero at the points t j :

j
sin(3 · 2πt j ) = sin(3 · 2π ) = sin( jπ) = 0
6

For general even N = 2M the Fourier vector ( fˆ0 , fˆ1 , . . . , fˆN−1 ) yields the interpolating function

v(t) = fˆ0 + fˆ1 e2πit + · · · + fˆM−1 e(M−1)2πit + fˆM 21 eM2πit + e−M2πit + fˆM+1 e−(M−1)2πit + · · · + fˆN−1 e−2πit


= c0 · 1 + a1 cos(2πt) + · · · + aM cos(M2πt) + b1 sin(2πt) + · · · + bM−1 sin((M − 1)2πt)

Therefore the entries of the Fourier vector should be interpreted as follows:

frequency h 0 1 2 ··· M−1 M M −1 ··· 2 1 i


fˆ0 fˆ1 fˆ2 · · · fˆM−1 fˆM fˆM+1 · · · fˆN−2 fˆN−1

1.6 Properties of the discrete Fourier transform

Here we summarize the key properties:

1 N−1 N−1
fˆk = ∑ f j e−2πik j/N ⇔ fj = ∑ fˆk e2πik j/N Inversion
N j=0 k=0

1 N−1 2 N−1 2
∑ fj
N j=0
= ∑ fˆk Parseval (6)
k=0

1 N−1
qj = ∑ f` g j−` ⇔ q̂k = fˆk ĝk Convolution
N `=0

Recall that (
  N for k = l
e(k) , e(`) =
0 for k 6= l

This gave us the formula for fˆk in (3), and we obtain from f = fˆ0 e(0) + · · · + fˆN−1 e(N−1)
N−1 2  (k) (k) 
(f, f) = ∑ fˆk e ,e
k=0 | {z }
N
yielding the Parseval formula. In the same way we obtain

1 N−1 N−1
∑ j j ∑ fˆk ĝk
N j=0
f g =
k=0

For the convolution we plug in the Fourier representation of g j−` and switch the order of the sums:

1 N−1 1 N−1 N−1 2πi( j−`)k/N


qj = =
∑ ` j−` N ∑ f` ∑ ĝk e
f g
N `=0 `=0 k=0
!
N−1 N−1
qj = ∑ ∑ f` e−2πi`k/N ĝk e2πik j/N
k=0 `=0
| {z }
fˆk

Hence we have q j = ∑N−1 2πik j/N with q̂ = fˆ ĝ . Remember that the signals are periodic (wrap-around): g = g
k=0 q̂k e k k k j j+N . So
g j−` with j − ` < 0 has to be interpreted in this way.
1.7 Efficient computation of FN and FN−1 : Fast Fourier Transform
>
Assume we are given the vector fˆ = fˆ0 , . . . , fˆN−1 ∈ CN in the frequency domain. We want to find the vector f = FN−1 f =


[ f0 , . . . , fN−1 ]> ∈ CN in the time domain.

N−1
fj = ∑ fˆk e2πik j/N
k=0
 
1 1 1 ··· 1

 1 ω1 ω2 ··· ω N−1 

f = EN fˆ, EN = 
 1 ω2 ω4 ··· ω 2(N−1) 
 with ω := e2πi/N
 .. .. .. .. 
 . . . . 
1 ω N−1 ω 2(N−1) · · · ω (N−1)(N−1)

Since ω satisfies ω N = 1 all entries of EN are one of the N values 1, ω, . . . , ω N−1 .


E.g., for N = 4 we have ω = e2πi/4 = eiπ/2 = i and
 
1 1 1 1
 1 i −1 −i 
E4 =  
 1 −1 1 −1 
1 −i −1 i

If we naively evaluate the formula f = EN fˆ we have to compute N multiplications and N − 1 additions for each component,
in addition to computing ω, ω 2 , . . . , ω N−1 . This means that the computation of f costs at least N 2 multiplications (plus
a similar number of additions etc.). For a vector of length N = 1000 this means that we have at least 106 operations. This
means that it is not practical to compute discrete Fourier transforms of long vectors.
Fortunately there is a way to reorganize the computation in such a way that only N · log2 N operations are required. E.g., for
N = 1024 we have
N 2 ≈ 106 , N · log2 N = 1024 · 10 ≈ 104

Note that e2πik j/N = wNjk where we define


wN := e2πi/N

Assume that N is even. Then we can split up the sum in even and odd terms: Using wN/2 = w2N we obtain
N−1 N/2−1 N/2−1 N/2−1 N/2−1
j(2k) j(2k+1)
fj = ∑ wNjk fˆk = ∑ wN fˆ2k + ∑ wN fˆ2k+1 = ∑ jk ˆ
wN/2 f2k + wNj ∑ jk ˆ
wN/2 f2k+1
k=0 k=0 k=0 k=0 k=0
| {z } | {z }
aj bj
N/2−1 jk ˆ −1 ˆe
>
f2k for j = 0, . . . , N2 − 1: This is FN/2 f where fˆe := fˆ0 , fˆ2 , . . . , fˆN−2 ∈ CN/2 is the vector

Consider a j := ∑k=0 wN/2
N N jk N/2
of even Fourier coefficients. For j = 2 ,...,N − 1 we can write j = 2 + J and have wN/2 = wJK
N/2 since wN/2 = 1. Hence
a N +J = aJ , i.e.,
2  
a0
ye
 
.. −1 e
with ye := FN/2
= ŷ
 
 . ye
aN−1

N/2−1 >
wNj jk ˆ −1 ˆo
f2k+1 for j = 0, . . . , N2 − 1: Consider FN/2 f where fˆo := fˆ1 , fˆ3 , . . . , fˆN−1 ∈ CN/2 is the

Consider b j := ∑ wN/2
k=0
| {z }
cj
jk N/2
vector of odd Fourier coefficients. For j = N2 , . . . , N − 1 we can write j = N
2 + J and obtain with wN/2 = wJK
N/2 and wN = −1
that b N +J = −bJ , i.e.,
2

 
  1
b0 
yo
  wN 
..  −1 o
= with yo :=   FN/2 ŷ
  
. −yo ..
.

 
bN−1 N/2−1
wN

Hence we obtain for even N


 
1

ye + yo
  wN 
FN−1 fˆ = −1 e  −1 o
with ye := FN/2 ŷ , yo :=   FN/2 ŷ

ye − yo ..
 . 
N/2−1
wN

Let cN denote the number of operations needed to compute the vector FN−1 fˆ. We need to compute 2 transforms of length
1/2 N/2−1 N
N/2, wN := e2πi/N = wN/2 , N2 − 2 multiplications to get 1, wN , . . . , wN , 2 multiplications to get yo , and N additions to
e o
compute y ± y . Let 1 operation denote [1 addition/subtraction, 1 multiplication/division/square root and memory access
for reading writing], then
cN = 2cN/2 + N

This algorithm is implemented in the Matlab functions fft and ifft and therefore used in our functions four and ifour .

2 Applications

2.1 Least squares fit with trigonometric functions of frequency 0, 1, . . . , K

Assume we are given a signal u ∈ CN , and we want to find the best least square fit using frequencies 0, 1, . . . , K
n o n o
VK = span e(−K) , e(−K+1) , . . . , e(K) = span c(0) , c(1) , s(1) , . . . , c(K) , s(K)

where dimVK = 2K + 1 ≤ N. Applying the DFT gives û := FN u, and because of the orthogonality of e(k) we get the least
squares fit w ∈ VK given by

w := û0 e(0) + û1 e(1) + · · · + ûK e(K) + ûN−K e(−K) + · · · + ûN−1 e(−1)

This corresponds to the function

v(t) = û0 + û1 e2πit + · · · + ûK eK2πit + ûN−K e−K2πit + · · · + ûN−1 e−2πit

2.2 Any linear translation invariant operator becomes diagonal in frequency space

Consider the “translation operator” T which maps [u0 , . . . , uN−1 ]> to [uN , u0 , . . . , uN−1 ]> , this corresponds to the matrix
 
1
 1 
T =
 
.. 
 . 
1

A linear mapping A ∈ CN×N is called translation invariant if it satisfies AT v = TAv for all v ∈ CN , i.e.,

AT = TA
Note that
Te(k) = e2πik/N e(k) = ω k e(k) , ω := e2πi/N
I.e., the matrix T has the eigenvalues ω 0 , ω 1 , . . . , ω N−1 (these are the N different roots of 1), and corresponding eigenvectors
e(0) , . . . , e(N−1) .
Conversely, if we have Av = ω k v we must have v = ck e(k) with some ck ∈ C.
Let v := Ae(k) . Then
T v = TAe(k) = ATe(k) = Ae(k) ω k = ω k v
hence there is ck ∈ C with v = ck e(k) . Hence we have shown

Ae(k) = ck e(k)

i.e., e(0) , . . . , e(N−1) are eigenvectors of A.


For a vector
f = fˆ0 e(0) + · · · + fˆN−1 e(N−1)
we obtain
(0) (N−1)
g = A f = fˆ0 Ae ˆ
| {z } + · · · + fN−1 Ae
| {z }
c0 e(0) cN−1 e(N−1)
i.e., the operation g = A f in the time domain corresponds in the frequency domain to

fˆ0
    
ĝ0 c0
 ..   ..   .. 
ĝk = ck fˆk , . . . , ĝN−1 = cN−1 fˆN−1 , i.e.,  . = .  . 
ĝN−1 cN−1 fˆN−1

Result: Any translation


  invariant linear mapping A in the time domain corresponds to a diagonal matrix
c0
 ..  in the frequency domain. Hence in the frequency domain

 .
cN−1
• we can apply the mapping v = Au with N operations: v̂k = ck ûk for k = 0, . . . , N − 1
• we can apply the inverse mapping u = A−1 v with N operations: ûk = c−1
k v̂k for k = 0, . . . , N − 1 (if ck 6= 0 for all k)

In general computing v = Au in the time domain takes N 2 operations, and computing u = A−1 v in the time domain using
Gaussian elimination takes 13 N 3 operations. Since the cost of the DFT is only N log N, it is much more efficient to perform
these operations in the frequency domain.

2.3 Computing discrete convolutions and deconvolutions (periodic setting)

For two signals f , g ∈ CN we define the periodic discrete convolution by

1 N−1
vj = ∑ u` g j−`
N `=0

(note that g j is considered a periodic signal with g j−N = g j here). We can interpret this as applying a “filter” to the signal u.
This filter given by g j can e.g. be a smoothing filter. By using the DFT we can compute the filtered signal v using O(N log N)
operations.
Moreover, we can get back from the filtered signal v to the original signal u using O(N log N) operations if ĝk 6= 0 for all k.
This is called “deconvolution”.
2.4 Approximating the solution of a differential equations (periodic setting)

As an example consider the ordinary differential equation


−U 00 (t) + βU(t) = f (t) (7)
with β ≥ 0. Here F(t) is a given 1-periodic function. We want to find a 1-periodic function U(t) satisfying (8).
We assume that we are given the values f j = F( j/N) for j = 0, . . . , N − 1, and we want to find values u j approximating
U( j/N) for j = 0, . . . , N − 1.
We approximate U 00 (t j ) using a difference quotient
u j−1 − 2u j + u j+1
U 00 (t j ) ≈ , with h := N −1
h2
For
N−1
uj = ∑ ûk ek2πi jk/N
k=0
we obtain
N−1 N−1 N−1
u j+1 = ∑ ûk ek2πi( j+1)/N = ∑ ûk ek2πi/N ek2πi j/N , u j−1 = ∑ ûk e−k2πi/N ek2πi j/N
k=0 k=0 k=0
N−1  
ik2π/N −ik2π/N
u j+1 + u j−1 − 2u j = ∑ e +e − 2 ûk ek2πi j/N
k=0 | {z
  }
2 cos (k2π/N) − 1
Note that cost − 1 ≥ 0 and cost − 1 > 0 if t 6= j2π, j ∈ Z .
For −U 00 (t j ) + βU(t j ) we obtain the approximation
N−1
u j−1 − 2u j + u j+1
∑ Ck ûk ek2πi( j+1)/N with Ck := N 2 2 cos(k2π/N) − 1 +β
 
− + β u j =
h2 k=0 | {z }
≥0
This means that the operator in the time domain
u j−1 − 2u j + u j+1
fj = +uj (8)
h2
becomes
fˆk = Ck ûk
in the frequency domain. We are given the vector f = [ f0 , . . . , fN−1 ]> . Solving (8) in the time domain would require solving
an N × N linear system Au = f using elimination.
Case 1: β > 0 . In this case we have Ck 6= 0 for all k. Using DFT we can obtain the unique solution in the frequency domain
as
ûk := fˆk /Ck for k = 0, . . . , N − 1
This means that the matrix A corresponding to the linear system (8) is nonsingular.
Case 2: β = 0 . In this case we have C0 = 0, but Ck > 0 for k = 1, . . . , N − 1. Hence we must have

fˆ0 = 0 · û0 = 0
This means that in order to obtain a solution the vector f = [ f0 , . . . , fN−1 ]> must have sum zero.
If this condition is satisfied, we obtain the solution û = [û0 , . . . , ûN−1 ]> given by
û0 = arbitrary, ûk = fˆk /Ck for k = 1, . . . , N − 1
This means that we can add c · [1, . . . , 1]> with arbitrary c ∈ R to the solution vector.
Therefore the matrix A has the null space span {[1, . . . , 1]}, and we have (range A)> = span {[1, . . . , 1]}.
Note that for β = 0 we have the differential equation −U 00 (t) = f (t), and it is clear that for any solution U(t) also U(t) + c
is a solution.

You might also like