1540470959-Boundary_Value_Problems_and_Partial_Differential_Equations__Powers

(jair2018) #1

1.8 Numerical Determination of Fourier Coefficients 101


series is to be found for the function, some numerical technique must be em-
ployed to approximate the integrals that give the Fourier coefficients. It turns
out that one of the crudest numerical integration techniques is the best.
Any periodic, sectionally smooth function can be reduced by the procedure
illustrated in Fig. 11 to the sum of some functionsf 1 (x)andf 2 (x), whose series
can be found by integration, and another function that iscontinuous,periodic,
and sectionally smooth. This last function’s Fourier coefficients will approach
0 rapidly withn.
Suppose then thatf(x)is continuous, sectionally smooth, and periodic with
period 2a. We wish to find its Fourier coefficients numerically. For instance,


a 0 =^1
2 a

∫a

−a

f(x)dx.

The integral is approximated using the trapezoidal rule. First, cut up the inter-
val−a<x<aintorequal subintervals with endpointsx 0 ,x 1 ,...,xrwhere


xk=−a+k x,  x=

2 a
r.

Next, evaluate the sum


a 0 ∼=

1

2 a

( 1

2 f(x^0 )+f(x^1 )+···+f(xr−^1 )+

1

2 f(xr)

)

x. (1)

Sincex 0 =−a,xr=a,andfis periodic with period 2a,wehavef(x 0 )=f(xr):
The two terms with^12 multipliers can be combined. Thus, our approxima-
tion is


a 0 ∼=

1

2 a

(

f(x 1 )+f(x 2 )+···+f(xr)

)

·

2 a
r.
The occurrences of 2acancel, and the computed value is just the average of the
functional values.
We use a caret over the usual coefficient name to designate approximations.
Other Fourier coefficients are approximated in a similar way.


Summary


Letf(x)be continuous, sectionally smooth and periodic with period 2a.Ap-
proximate Fourier coefficients off(x)are


aˆ 0 =^1 r

(

f(x 1 )+···+f(xr)

)

, (2)

ˆan=

2

r

(

f(x 1 )cos

(nπx
1
a

)

+···+f(xr)cos

(nπx
r
a

))

, (3)

ˆbn=^2
r

(

f(x 1 )sin

(nπx
1
a

)

+···+f(xr)sin

(nπx
r
a

))

. (4)
Free download pdf