Find The First 6 Terms Of The Fourier Serie

Find the first 6 terms of the Fourier series of the periodic function ( ) of period = 2

defined by: ( ) = − < <

Solution


I do not know which format you are to create, but let me do

the sine-cosine form, as others can be derived from that.

In general, the n-th term of the Fourier series is of the form

ancos(2πnx/P) + bnsin(2πnx/P)), where P is your period 2π.

Therefore the n-th term simplifies to

ancos(nx) + bnsin(nx)

For P = 2π and f(x) = x the coefficients an and bn are (by the Fourier Theorem)

an = 1/π ∫x cos(nx) dx

bn = 1/π ∫x sin(nx) dx

where the integrals are over the given interval from -π to π.

Let’s first evaluate the indefinite integrals

An(x) = ∫x cos(nx) dx

Bn(x) = ∫x sin(nx) dx

The case n=0 is special, as the integrals reduce to

A0(x) = ∫x dx = x²/2 + C

B0(x) = ∫0 dx = C

In case n > 0, for both An(x) and Bn(x) use integration by parts of the form

∫uv’ = uv – ∫u’v

For An(x) we have u = x, v’ = cos(nx). Hence v = sin(nx)/n.

An(x) = x sin(nx)/n – ∫sin(nx)/n dx

= x sin(nx)/n + cos(nx)/n² + C

For Bn(x) we have u = x, v’ = sin(nx). Hence v = -cos(nx)/n.

Bn(x) = -x cos(nx)/n – ∫-cos(nx)/n dx

= -x cos(nx)/n + sin(nx)/n² + C

Now we can calculate the coefficients an, bn:

an = (A(π) – A(-π))/π

bn = (B(π) – B(-π))/π

a0 = (π²/2 – π²/2)/π = 0

b0 = 0

For n > 0

an = ( π sin(πn)/n + cos(πn)/n² – (-πsin(-πn)/n + cos(-πn)/n²))/π = 0

bn = (-πcos(πn)/n + sin(πn)/n² – (πcos(-πn)/n + sin(-πn)/n²))/π = 2×(-1)n/n

The first six terms are of the Fourier series for f(x)=x are

0 – 2 sin(x)/1 + 2 sin(2x)/2 – 2 sin(3x)/3 + 2 sin(4x)/4 – 2 sin(5x)/5