416 CHAPTER 17. INNER PRODUCT SPACES
Then instead of the integral given above, you could write a Riemann sum which approxi-mates it. I will simply write the left Riemann sum. This yields the approximation bk for ak.Assuming f is continuous, the approximation would improve as N→ ∞.
bk =1
2π
N−1
∑j=0
f(
j2π
N
)e−ik( j 2π
N ) 2π
N=
1N
N−1
∑j=0
(e−i 2π
N
)k jy j
where y j is defined to be the value of the function at x j. This is called the discreet Fouriertransform. In terms of matrix multiplication, let ωN = e−i 2π
N . Then
b−(N−1)...
b−1
b0
b1...
bN−1
=
1N
1 (ωN)N−1 · · · (ωN)
(N−1)(N−1)
......
...1 ωN · · · (ωN)
(N−1)
1 1 · · · 1
1 ωN · · · ω(N−1)N
......
...
1 ωN−1N · · · ω
(N−1)(N−1)N
y0
y1...
yN−1
Thus you can find these approximate values by matrix multiplication.
Example 17.6.1 Suppose you have the following table of values for the function f .0 1
π/2 2π −1
3π/2 12π 2
Note that the above only uses the first four values.
In this case, N = 4 and so ωN = e−i(π/2) = −i. Then the approximate Fourier coeffi-cients are given by
b−3
b−2
b−1
b0
b1
b2
b3
=
14
1 i3 i6 i9
1 i2(i2)2 (
i2)3
1 i i2 i3
1 1 1 11 −i −1 i1 (−i)2 (−i)4 (−i)6
1 (−i)3 (−i)6 (−i)9
12−11