Padhaiko › Subjects › Engineering Mathematics III › Chapter 1: Fourier Series and Fourier Transform › Fourier Series & Euler's Formulas Fourier Series & Euler's Formulas Engineering Mathematics III (ENSH 201)
Open in the Padhaiko app Overview
1.2 Fourier Series & Standard Intervals
If the trigonometric series in the form:
2 1 a 0 + ( a 1 cos x + b 1 sin x ) + ( a 2 cos 2 x + b 2 sin 2 x ) + ⋯ + ( a n cos n x + b n sin n x ) + ⋯
or, in a more compact form:
2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
converges uniformly to a function f ( x ) within a specified range of the variable x , the series is called the Fourier series of f ( x ) .
I. Fourier Series in ( α , α + 2 π )
The Fourier series of a function f ( x ) in the interval ( α , α + 2 π ) is given by:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
where:
a 0 a n b n = π 1 ∫ α α + 2 π f ( x ) d x = π 1 ∫ α α + 2 π f ( x ) cos ( n x ) d x = π 1 ∫ α α + 2 π f ( x ) sin ( n x ) d x for n = 1 , 2 , …
II. Fourier Series in ( 0 , 2 π )
Setting α = 0 , the Fourier series of f ( x ) in the interval ( 0 , 2 π ) is given by:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
where:
a 0 a n b n = π 1 ∫ 0 2 π f ( x ) d x , = π 1 ∫ 0 2 π f ( x ) cos ( n x ) d x , = π 1 ∫ 0 2 π f ( x ) sin ( n x ) d x for n = 1 , 2 , …
III. Fourier Series in ( − π , π )
Setting α = − π , the Fourier series of f ( x ) in the interval ( − π , π ) is given by:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
where:
a 0 a n b n = π 1 ∫ − π π f ( x ) d x , = π 1 ∫ − π π f ( x ) cos ( n x ) d x , = π 1 ∫ − π π f ( x ) sin ( n x ) d x for n = 1 , 2 , …
These values of a 0 , a n , b n are known as Euler's formulas or Fourier coefficients .
Theorem Derivation of Euler's Formulas for Fourier Coefficients Let the Fourier series of f ( x ) in the interval ( α , α + 2 π ) be:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x ) ⋯ ( 1 )
Assuming term-by-term integration over [ α , α + 2 π ] is valid, the coefficients are given by:
a 0 a n b n = π 1 ∫ α α + 2 π f ( x ) d x = π 1 ∫ α α + 2 π f ( x ) cos ( n x ) d x = π 1 ∫ α α + 2 π f ( x ) sin ( n x ) d x
Proof 1. To find a 0 : Integrating both sides of ( 1 ) from x = α to x = α + 2 π :
∫ α α + 2 π f ( x ) d x = 2 1 a 0 ∫ α α + 2 π d x + ∫ α α + 2 π ( n = 1 ∑ ∞ a n cos n x ) d x + ∫ α α + 2 π ( n = 1 ∑ ∞ b n sin n x ) d x
Since ∫ α α + 2 π cos ( n x ) d x = 0 and ∫ α α + 2 π sin ( n x ) d x = 0 for all n ≥ 1 :
∫ α α + 2 π f ( x ) d x ⟹ a 0 = 2 1 a 0 ( α + 2 π − α ) + 0 + 0 = a 0 π = π 1 ∫ α α + 2 π f ( x ) d x
2. To find a n : Multiplying both sides of ( 1 ) by cos ( n x ) and integrating from x = α to x = α + 2 π :
∫ α α + 2 π f ( x ) cos ( n x ) d x = 2 1 a 0 ∫ α α + 2 π cos ( n x ) d x + ∫ α α + 2 π ( m = 1 ∑ ∞ a m cos ( m x ) ) cos ( n x ) d x + ∫ α α + 2 π ( m = 1 ∑ ∞ b m sin ( m x ) ) cos ( n x ) d x
By orthogonality, every term vanishes except m = n in the cosine-cosine integral, where ∫ α α + 2 π cos 2 ( n x ) d x = π :
∫ α α + 2 π f ( x ) cos ( n x ) d x ⟹ a n = 0 + π a n + 0 = π a n = π 1 ∫ α α + 2 π f ( x ) cos ( n x ) d x
3. To find b n : Multiplying both sides of ( 1 ) by sin ( n x ) and integrating from x = α to x = α + 2 π :
∫ α α + 2 π f ( x ) sin ( n x ) d x ⟹ b n = 2 1 a 0 ∫ α α + 2 π sin ( n x ) d x + ∫ α α + 2 π m = 1 ∑ ∞ a m cos ( m x ) sin ( n x ) d x + ∫ α α + 2 π m = 1 ∑ ∞ b m sin ( m x ) sin ( n x ) d x = 0 + 0 + π b n = π b n = π 1 ∫ α α + 2 π f ( x ) sin ( n x ) d x for n = 1 , 2 , …
Note 1 & Note 2 (Page 8): Special Cases of α
Note 1: α = 0 , interval 0 < x < 2 π
The coefficients integrate from 0 to 2 π :
a 0 a n b n = π 1 ∫ 0 2 π f ( x ) d x = π 1 ∫ 0 2 π f ( x ) cos ( n x ) d x = π 1 ∫ 0 2 π f ( x ) sin ( n x ) d x
Note 2: α = − π , interval − π < x < π
The coefficients integrate from − π to π :
a 0 a n b n = π 1 ∫ − π π f ( x ) d x = π 1 ∫ − π π f ( x ) cos ( n x ) d x = π 1 ∫ − π π f ( x ) sin ( n x ) d x
If f ( x ) is even on ( − π , π ) :
a 0 a n b n = π 2 ∫ 0 π f ( x ) d x = π 2 ∫ 0 π f ( x ) cos ( n x ) d x = 0
If f ( x ) is odd on ( − π , π ) :
a 0 a n b n = 0 = 0 = π 2 ∫ 0 π f ( x ) sin ( n x ) d x
IV. Fourier Series in ( − l , l ) (Change of Scale)
In many engineering problems, the Fourier series is defined on an arbitrary symmetric interval ( − l , l ) with period 2 l . Consider the Fourier series of a periodic function f ( y ) with period 2 π on ( − π , π ) :
f ( y ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n y + b n sin n y ) ⋯ ( 1 )
where a 0 = π 1 ∫ − π π f ( y ) d y , a n = π 1 ∫ − π π f ( y ) cos ( n y ) d y , and b n = π 1 ∫ − π π f ( y ) sin ( n y ) d y .
To change the period to 2 l , put y = l π x so that d y = l π d x . As x varies from − l to l , y varies from − π to π . Writing f ( x ) for f ( l π x ) , the Fourier series expansion of f ( x ) on ( − l , l ) is:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos l nπ x + b n sin l nπ x )
where the Fourier coefficients are:
a 0 a n b n = l 1 ∫ − l l f ( x ) d x = l 1 ∫ − l l f ( x ) cos ( l nπ x ) d x = l 1 ∫ − l l f ( x ) sin ( l nπ x ) d x for n = 1 , 2 , …
Dirichlet's Conditions & Points of Discontinuity
Theorem Dirichlet's Conditions for Convergence of a Fourier Series For a Fourier series to converge to a function f ( x ) on a given interval, the following conditions must be satisfied:
Piecewise continuity: The function f ( x ) is continuous or piecewise continuous over the interval. At points of discontinuity, the left-hand limit f ( x − ) and the right-hand limit f ( x + ) both exist and are finite.Bounded variation: The function f ( x ) has bounded variation over the interval (a finite number of maxima, minima, and finite jump discontinuities, with no infinite oscillations).Piecewise smoothness: The derivative f ′ ( x ) exists, is finite, and is continuous except at a finite number of points over the interval.Periodicity: The function f ( x ) is periodic (or extended periodically outside the fundamental interval) with period λ : f ( x + λ ) = f ( x ) .Convergence at discontinuities: At any point x where f ( x ) has a finite jump discontinuity, the Fourier series converges to the midpoint (arithmetic mean) of the left-hand and right-hand limits:
Figure 2: Fundamental interval and periodic extension of a function (Book p. 10)
Functions Having Points of Discontinuity
Example Inline 1 Fourier Coefficients for a Piecewise Discontinuous Function If a function f ( x ) in the interval ( α , α + 2 π ) is defined by:
f ( x ) = { ϕ ( x ) ψ ( x ) for α < x < c for c < x < α + 2 π
having a finite jump discontinuity at x = c , find its Fourier coefficients and the value of the series at x = c .
Evaluating the Constant Coefficient a 0 Across the Discontinuity: Splitting the integral for a 0 into the two sub-intervals ( α , c ) and ( c , α + 2 π ) :
a 0 = π 1 ∫ α α + 2 π f ( x ) d x = π 1 ∫ α c ϕ ( x ) d x + π 1 ∫ c α + 2 π ψ ( x ) d x
Evaluating the Cosine Coefficient a n : Splitting the integral for a n at the jump point x = c :
a n = π 1 ∫ α α + 2 π f ( x ) cos ( n x ) d x = π 1 ∫ α c ϕ ( x ) cos ( n x ) d x + π 1 ∫ c α + 2 π ψ ( x ) cos ( n x ) d x
Evaluating the Sine Coefficient b n : Splitting the integral for b n at the jump point x = c :
b n = π 1 ∫ α α + 2 π f ( x ) sin ( n x ) d x = π 1 ∫ α c ϕ ( x ) sin ( n x ) d x + π 1 ∫ c α + 2 π ψ ( x ) sin ( n x ) d x
Dirichlet's Theorem at the Jump Discontinuity:
-2
-1
0
1
2
x
(0, 1)
(0, 2)
Jump midpoint
y = f(x)
Figure 3: Jump discontinuity and midpoint convergence at x = c (Book p. 10)
Since f ( x ) has a finite jump discontinuity at x = c and both one-sided limits f ( c − ) = lim x → c − ϕ ( x ) and f ( c + ) = lim x → c + ψ ( x ) exist, Dirichlet's conditions state that the Fourier series converges to the arithmetic mean:
f ( c ) = 2 f ( c − ) + f ( c + ) = 2 1 [ ϕ ( c ) + ψ ( c ) ]
Worked Out Examples (1–12)
Example 1 1 Obtain the Fourier series for f ( x ) = x 2 in the interval − π < x < π , and hence show that: (i) ∑ n = 1 ∞ n 2 1 = 1 2 1 + 2 2 1 + 3 2 1 + ⋯ = 6 π 2 (ii) ∑ n = 1 ∞ n 2 ( − 1 ) n − 1 = 1 2 1 − 2 2 1 + 3 2 1 − ⋯ = 12 π 2
Fourier Series Formulation & Parity Check: The Fourier series of f ( x ) = x 2 on − π < x < π with period T = 2 π is defined by:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x ) ⋯ ( 1 )
Since f ( − x ) = ( − x ) 2 = x 2 = f ( x ) , f ( x ) is an even function on ( − π , π ) . Therefore, x 2 cos ( n x ) is even (symmetric about the y -axis) and x 2 sin ( n x ) is odd (symmetric about the origin), so:
and the integrals for a 0 and a n can be evaluated by doubling the integral over the half-interval [ 0 , π ] .
Evaluating the Constant Coefficient a 0 : Using the even symmetry of x 2 :
a 0 = π 1 ∫ − π π x 2 d x = π 2 ∫ 0 π x 2 d x = π 2 [ 3 x 3 ] 0 π = π 2 ( 3 π 3 − 0 ) = 3 2 π 2
Thus, the constant term in the series is:
Setting Up the Cosine Coefficients a n : Since x 2 and cos ( n x ) are both even, their product x 2 cos ( n x ) is even, so we can double the integral over [ 0 , π ] :
a n = π 1 ∫ − π π x 2 cos ( n x ) d x = π 2 ∫ 0 π x 2 cos ( n x ) d x ⋯ ( 3 )
The integrand is a polynomial times a cosine. Integration by parts would have to be used twice, so we use Bernoulli's formula, which does all the repetitions in one line.
When u is a polynomial:
∫ u v d x = u v 1 − u ′ v 2 + u ′′ v 3 − u ′′′ v 4 + ⋯
u ′ , u ′′ , u ′′′ , … are the successive derivatives of u .v 1 , v 2 , v 3 , … are the successive integrals of v : v 1 = ∫ v d x , v 2 = ∫ v 1 d x , v 3 = ∫ v 2 d x , and so on.The signs alternate + , − , + , − , … The formula stops as soon as a derivative of u becomes 0 . Derivatives of u and Integrals of v : Take u = x 2 (the polynomial) and v = cos ( n x ) .
Differentiate u until it becomes 0 :
Since u ′′′ = 0 , only the first three terms of Bernoulli's formula are needed.
Integrate v three times, using ∫ cos ( n x ) d x = n s i n n x and ∫ sin ( n x ) d x = − n c o s n x :
v 1 v 2 v 3 = ∫ cos ( n x ) d x = n sin n x = ∫ n sin n x d x = − n 2 cos n x = ∫ ( − n 2 cos n x ) d x = − n 3 sin n x
Applying Bernoulli's Formula: Substituting into ∫ u v d x = u v 1 − u ′ v 2 + u ′′ v 3 :
∫ x 2 cos ( n x ) d x = ( x 2 ) ( n sin n x ) − ( 2 x ) ( − n 2 cos n x ) + ( 2 ) ( − n 3 sin n x ) = n x 2 sin n x + n 2 2 x cos n x − n 3 2 sin n x
The middle term becomes positive because two minus signs multiply: − ( 2 x ) ( − n 2 c o s n x ) = + n 2 2 x c o s n x .
Putting this into ( 3 ) :
a n = π 2 [ n x 2 sin n x + n 2 2 x cos n x − n 3 2 sin n x ] 0 π
Substituting the Limits: Use sin nπ = 0 , sin 0 = 0 and cos nπ = ( − 1 ) n for every whole number n .
At the upper limit x = π , term by term:
n π 2 sin nπ n 2 2 π cos nπ n 3 2 sin nπ = 0 = n 2 2 π ( − 1 ) n = 0
At the lower limit x = 0 : the first two terms contain the factor x , and the third contains sin 0 , so all three are 0 .
Upper value minus lower value:
a n = π 2 [ ( 0 + n 2 2 π ( − 1 ) n − 0 ) − 0 ] = π 2 ⋅ n 2 2 π ( − 1 ) n = n 2 4 ( − 1 ) n
Evaluating b n by Odd Parity: Since x 2 is even and sin ( n x ) is odd, the integrand x 2 sin ( n x ) is an odd function:
b n = π 1 ∫ − π π x 2 sin ( n x ) d x = 0
Assembling the Fourier Series: Substituting 2 1 a 0 = 3 π 2 , a n = n 2 4 ( − 1 ) n , and b n = 0 into equation ( 1 ) :
x 2 = 3 π 2 + n = 1 ∑ ∞ n 2 4 ( − 1 ) n cos ( n x ) = 3 π 2 + 4 n = 1 ∑ ∞ n 2 ( − 1 ) n cos ( n x ) = 3 π 2 + 4 [ − 1 2 cos x + 2 2 cos 2 x − 3 2 cos 3 x + 4 2 cos 4 x − ⋯ ] ⋯ ( 2 )
Deductions (i) and (ii): Part (i): Putting x = π in ( 2 ) , where cos ( nπ ) = ( − 1 ) n :
π 2 π 2 − 3 π 2 3 2 π 2 n = 1 ∑ ∞ n 2 1 = 3 π 2 + 4 n = 1 ∑ ∞ n 2 ( − 1 ) n ( − 1 ) n = 4 n = 1 ∑ ∞ n 2 1 = 4 n = 1 ∑ ∞ n 2 1 = 12 2 π 2 = 6 π 2
Part (ii): Putting x = 0 in ( 2 ) , where cos ( 0 ) = 1 :
0 0 4 n = 1 ∑ ∞ n 2 ( − 1 ) n − 1 n = 1 ∑ ∞ n 2 ( − 1 ) n − 1 = 3 π 2 + 4 n = 1 ∑ ∞ n 2 ( − 1 ) n = 3 π 2 − 4 n = 1 ∑ ∞ n 2 ( − 1 ) n − 1 = 3 π 2 = 12 π 2
∴ 1 2 1 − 2 2 1 + 3 2 1 − 4 2 1 + ⋯ = 12 π 2
Answer: x 2 = 3 π 2 + 4 n = 1 ∑ ∞ n 2 ( − 1 ) n cos ( n x ) , n = 1 ∑ ∞ n 2 1 = 6 π 2 , n = 1 ∑ ∞ n 2 ( − 1 ) n − 1 = 12 π 2
Example 2 2 Expand the function f ( x ) = x sin x as a Fourier series in the interval − π ≤ x ≤ π .
Fourier Series Formulation & Parity Check: Since f ( − x ) = ( − x ) sin ( − x ) = ( − x ) ( − sin x ) = x sin x = f ( x ) , f ( x ) = x sin x is an even function on [ − π , π ] . Because f ( x ) is even:
Thus the Fourier series contains only cosine terms:
f ( x ) = x sin x = 2 1 a 0 + n = 1 ∑ ∞ a n cos ( n x ) ⋯ ( 1 )
Evaluating a 0 by Integration by Parts: Using the even symmetry of x sin x :
a 0 = π 1 ∫ − π π x sin x d x = π 2 ∫ 0 π x sin x d x = π 2 [ x ( − cos x ) − ( 1 ) ( − sin x ) ] 0 π = π 2 [ − x cos x + sin x ] 0 π = π 2 [ ( − π cos π + sin π ) − ( 0 + sin 0 ) ] = π 2 [ − π ( − 1 ) + 0 − 0 ] = π 2 ( π ) = 2
Thus 2 1 a 0 = 2 1 ( 2 ) = 1 .
Evaluating the Special Case n = 1 :
In the general formula for a n = π 2 ∫ 0 π x sin x cos ( n x ) d x , using the product-to-sum identity 2 sin x cos ( n x ) = sin ( n + 1 ) x − sin ( n − 1 ) x produces a denominator of n − 1 upon integration. For n = 1 , n − 1 = 0 (division by zero), so a 1 must be computed separately before n ≥ 2 .
For n = 1 , using sin x cos x = 2 1 sin ( 2 x ) :
a 1 = π 2 ∫ 0 π x sin x cos x d x = π 1 ∫ 0 π x sin ( 2 x ) d x = π 1 [ x ( − 2 cos 2 x ) − ( 1 ) ( − 4 sin 2 x ) ] 0 π = π 1 [ − 2 x cos 2 x + 4 sin 2 x ] 0 π = π 1 [ ( − 2 π cos ( 2 π ) + 4 sin ( 2 π ) ) − ( 0 + 0 ) ] = π 1 ( − 2 π ( 1 ) ) = − 2 1
Evaluating a n for n ≥ 2 : Using the trigonometric identity 2 cos ( n x ) sin x = sin ( n + 1 ) x − sin ( n − 1 ) x :
a n = π 2 ∫ 0 π x sin x cos ( n x ) d x = π 1 ∫ 0 π x [ sin ( n + 1 ) x − sin ( n − 1 ) x ] d x = π 1 [ x ( − n + 1 cos ( n + 1 ) x ) − ( 1 ) ( − ( n + 1 ) 2 sin ( n + 1 ) x ) ] 0 π − π 1 [ x ( − n − 1 cos ( n − 1 ) x ) − ( 1 ) ( − ( n − 1 ) 2 sin ( n − 1 ) x ) ] 0 π
Since sin ( n ± 1 ) π = 0 and cos ( n ± 1 ) π = ( − 1 ) n ± 1 = − ( − 1 ) n :
a n = π 1 [ − n + 1 π ( − 1 ) n + 1 ] − π 1 [ − n − 1 π ( − 1 ) n − 1 ] = n + 1 ( − 1 ) n − n − 1 ( − 1 ) n = ( − 1 ) n ( n + 1 1 − n − 1 1 ) = ( − 1 ) n ( n 2 − 1 ( n − 1 ) − ( n + 1 ) ) = ( − 1 ) n ( n 2 − 1 − 2 ) = n 2 − 1 2 ( − 1 ) n + 1 for n = 2 , 3 , 4 , …
Assembling the Fourier Series: Combining 2 1 a 0 = 1 , a 1 = − 2 1 , and a n = n 2 − 1 2 ( − 1 ) n + 1 for n ≥ 2 :
x sin x = 1 − 2 1 cos x + n = 2 ∑ ∞ n 2 − 1 2 ( − 1 ) n + 1 cos ( n x ) = 1 − 2 1 cos x + 2 n = 2 ∑ ∞ n 2 − 1 ( − 1 ) n + 1 cos ( n x ) = 1 − 2 1 cos x − 2 2 − 1 2 cos 2 x + 3 2 − 1 2 cos 3 x − 4 2 − 1 2 cos 4 x + ⋯ = 1 − 2 1 cos x − 1 ⋅ 3 2 cos 2 x + 2 ⋅ 4 2 cos 3 x − 3 ⋅ 5 2 cos 4 x + ⋯
Answer: x sin x = 1 − 2 1 cos x + 2 n = 2 ∑ ∞ n 2 − 1 ( − 1 ) n + 1 cos ( n x ) = 1 − 2 1 cos x − 1 ⋅ 3 2 cos 2 x + 2 ⋅ 4 2 cos 3 x − 3 ⋅ 5 2 cos 4 x + ⋯
Example 3 3 Find the Fourier series expansion of:
f ( x ) = { − π x for − π < x < 0 for 0 < x < π
and deduce that 1 2 1 + 3 2 1 + 5 2 1 + ⋯ = 8 π 2 .
Fourier Series Definition & Integral Splitting: The interval is ( − π , π ) with period 2 π . Since the function definition changes at x = 0 , every Euler integral is split into two parts: ∫ − π 0 and ∫ 0 π .
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
Evaluating a 0 : Splitting the integral at x = 0 :
a 0 = π 1 [ ∫ − π 0 ( − π ) d x + ∫ 0 π x d x ] = π 1 ( [ − π x ] − π 0 + [ 2 x 2 ] 0 π ) = π 1 ( [ 0 − ( π 2 )] + [ 2 π 2 − 0 ] ) = π 1 ( − π 2 + 2 π 2 ) = π 1 ( − 2 π 2 ) = − 2 π
Thus 2 1 a 0 = − 4 π .
Evaluating a n : Splitting the integral and integrating the second term by parts:
a n = π 1 [ ∫ − π 0 ( − π ) cos ( n x ) d x + ∫ 0 π x cos ( n x ) d x ] = − ∫ − π 0 cos ( n x ) d x + π 1 ∫ 0 π x cos ( n x ) d x = − [ n sin n x ] − π 0 + π 1 [ x n sin n x − ( 1 ) ( − n 2 cos n x ) ] 0 π = − [ 0 − n sin ( − nπ ) ] + π 1 [ x n sin n x + n 2 cos n x ] 0 π = 0 + π 1 [ ( π n sin nπ + n 2 cos nπ ) − ( 0 + n 2 cos 0 ) ] = π 1 ( n 2 ( − 1 ) n − n 2 1 ) = π n 2 ( − 1 ) n − 1
Branching for even and odd n :
For even n = 2 k : a 2 k = π ( 2 k ) 2 1 − 1 = 0 For odd n = 2 k − 1 : a 2 k − 1 = π ( 2 k − 1 ) 2 − 1 − 1 = − π ( 2 k − 1 ) 2 2 Evaluating b n : Splitting the integral and integrating by parts:
b n = π 1 [ ∫ − π 0 ( − π ) sin ( n x ) d x + ∫ 0 π x sin ( n x ) d x ] = − ∫ − π 0 sin ( n x ) d x + π 1 ∫ 0 π x sin ( n x ) d x = − [ − n cos n x ] − π 0 + π 1 [ x ( − n cos n x ) − ( 1 ) ( − n 2 sin n x ) ] 0 π = [ n cos n x ] − π 0 + π 1 [ − n x cos n x + n 2 sin n x ] 0 π = ( n cos 0 − n cos ( − nπ ) ) + π 1 [ ( − n π cos nπ + 0 ) − ( 0 + 0 ) ] = n 1 − ( − 1 ) n − n ( − 1 ) n = n 1 − 2 ( − 1 ) n
Branching for even and odd n :
For even n = 2 k : b 2 k = 2 k 1 − 2 ( 1 ) = − 2 k 1 For odd n = 2 k − 1 : b 2 k − 1 = 2 k − 1 1 − 2 ( − 1 ) = 2 k − 1 3 Assembling the Series: Substituting a 0 , a n , and b n into the series:
f ( x ) = − 4 π + n = 1 ∑ ∞ π n 2 ( − 1 ) n − 1 cos ( n x ) + n = 1 ∑ ∞ n 1 − 2 ( − 1 ) n sin ( n x ) = − 4 π − π 2 k = 1 ∑ ∞ ( 2 k − 1 ) 2 cos ( 2 k − 1 ) x + n = 1 ∑ ∞ n 1 − 2 ( − 1 ) n sin ( n x ) = − 4 π − π 2 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ ) + ( 1 3 sin x − 2 sin 2 x + 3 3 sin 3 x − 4 sin 4 x + ⋯ ) ⋯ ( 3 )
Deduction at the Jump Discontinuity x = 0 : Since x = 0 is a point of finite jump discontinuity with left-hand limit f ( 0 − ) = − π and right-hand limit f ( 0 + ) = 0 , by Dirichlet's convergence condition:
f ( 0 ) = 2 f ( 0 − ) + f ( 0 + ) = 2 − π + 0 = − 2 π
Setting x = 0 in equation ( 3 ) , where cos ( 0 ) = 1 and sin ( 0 ) = 0 :
− 2 π − 2 π + 4 π − 4 π k = 1 ∑ ∞ ( 2 k − 1 ) 2 1 = − 4 π − π 2 ( 1 2 1 + 3 2 1 + 5 2 1 + ⋯ ) + 0 = − π 2 k = 1 ∑ ∞ ( 2 k − 1 ) 2 1 = − π 2 k = 1 ∑ ∞ ( 2 k − 1 ) 2 1 = ( − 4 π ) ( − 2 π ) = 8 π 2
Answer: f ( x ) = − 4 π − π 2 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ ) + ( 1 3 sin x − 2 sin 2 x + 3 3 sin 3 x − ⋯ ) , k = 1 ∑ ∞ ( 2 k − 1 ) 2 1 = 8 π 2
Example 4 4 Obtain the Fourier series of the function:
f ( x ) = { x + π − x − π for 0 ≤ x ≤ π for − π ≤ x ≤ 0
Problem Setup & Erratum Clarification:
The Fourier series is:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
Evaluating a 0 Over [ − π , 0 ] and [ 0 , π ] :
a 0 = − π 1 ∫ − π 0 ( x + π ) d x + π 1 ∫ 0 π ( x + π ) d x = − π 1 [ 2 x 2 + π x ] − π 0 + π 1 [ 2 x 2 + π x ] 0 π = − π 1 [ ( 0 + 0 ) − ( 2 π 2 − π 2 ) ] + π 1 [ ( 2 π 2 + π 2 ) − ( 0 + 0 ) ] = − π 1 ( − ( − 2 π 2 ) ) + π 1 ( 2 3 π 2 ) = − 2 π + 2 3 π = π
Thus 2 1 a 0 = 2 π .
Evaluating a n : Integrating by parts on both sub-intervals:
a n = − π 1 ∫ − π 0 ( x + π ) cos ( n x ) d x + π 1 ∫ 0 π ( x + π ) cos ( n x ) d x = − π 1 [ ( x + π ) n sin n x + n 2 cos n x ] − π 0 + π 1 [ ( x + π ) n sin n x + n 2 cos n x ] 0 π = − π 1 [ ( 0 + n 2 1 ) − ( 0 + n 2 ( − 1 ) n ) ] + π 1 [ ( 0 + n 2 ( − 1 ) n ) − ( 0 + n 2 1 ) ] = − π n 2 1 [ 1 − ( − 1 ) n ] + π n 2 1 [ ( − 1 ) n − 1 ] = π n 2 2 [ ( − 1 ) n − 1 ]
For even n : a n = 0 For odd n : a n = − π n 2 4 Evaluating b n : Integrating by parts on both sub-intervals:
b n = − π 1 ∫ − π 0 ( x + π ) sin ( n x ) d x + π 1 ∫ 0 π ( x + π ) sin ( n x ) d x = − π 1 [ − ( x + π ) n cos n x + n 2 sin n x ] − π 0 + π 1 [ − ( x + π ) n cos n x + n 2 sin n x ] 0 π = n 2 [ 1 − ( − 1 ) n ]
For even n : b n = 0 For odd n : b n = n 4 Assembling the Series: Substituting the coefficients:
f ( x ) = 2 π + odd n ∑ ( − π n 2 4 ) cos ( n x ) + odd n ∑ ( n 4 ) sin ( n x ) = 2 π − π 4 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ ) + 4 ( 1 sin x + 3 sin 3 x + 5 sin 5 x + ⋯ )
Answer: f ( x ) = 2 π − π 4 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ ) + 4 ( 1 sin x + 3 sin 3 x + 5 sin 5 x + ⋯ )
Example 5 5 Find a Fourier series for f ( x ) = e − x in the interval 0 < x < 2 π .
Fourier Series Formulation on ( 0 , 2 π ) : In the interval ( 0 , 2 π ) with period T = 2 π , the Fourier series is:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
Evaluating a 0 : Integrating e − x over [ 0 , 2 π ] :
a 0 = π 1 ∫ 0 2 π e − x d x = π 1 [ − 1 e − x ] 0 2 π = π 1 ( − e − 2 π − ( − 1 ) ) = π 1 − e − 2 π
Thus 2 1 a 0 = 2 π 1 − e − 2 π .
Evaluating a n :
a n = π 1 ∫ 0 2 π e − x cos ( n x ) d x = π 1 [ 1 + n 2 e − x ( − cos n x + n sin n x ) ] 0 2 π = π ( n 2 + 1 ) 1 [ e − 2 π ( − cos 2 nπ + n sin 2 nπ ) − e 0 ( − cos 0 + n sin 0 ) ] = π ( n 2 + 1 ) 1 [ e − 2 π ( − 1 + 0 ) − ( 1 ) ( − 1 + 0 ) ] = π ( n 2 + 1 ) 1 ( − e − 2 π + 1 ) = π ( n 2 + 1 ) 1 − e − 2 π
Evaluating b n : Using the standard antiderivative ∫ e a x sin ( b x ) d x = a 2 + b 2 e a x ( a s i n b x − b c o s b x ) :
b n = π 1 ∫ 0 2 π e − x sin ( n x ) d x = π 1 [ 1 + n 2 e − x ( − sin n x − n cos n x ) ] 0 2 π = π ( n 2 + 1 ) 1 [ e − 2 π ( − sin 2 nπ − n cos 2 nπ ) − e 0 ( − sin 0 − n cos 0 ) ] = π ( n 2 + 1 ) 1 [ e − 2 π ( 0 − n ) − ( 1 ) ( 0 − n ) ] = π ( n 2 + 1 ) 1 ( − n e − 2 π + n ) = π ( n 2 + 1 ) n ( 1 − e − 2 π )
Assembling the Series: Factoring out π 1 − e − 2 π :
e − x = 2 π 1 − e − 2 π + n = 1 ∑ ∞ [ π ( n 2 + 1 ) 1 − e − 2 π cos ( n x ) + π ( n 2 + 1 ) n ( 1 − e − 2 π ) sin ( n x ) ] = π 1 − e − 2 π [ 2 1 + n = 1 ∑ ∞ n 2 + 1 cos ( n x ) + n = 1 ∑ ∞ n 2 + 1 n sin ( n x ) ]
Answer: e − x = π 1 − e − 2 π [ 2 1 + n = 1 ∑ ∞ n 2 + 1 cos n x + n = 1 ∑ ∞ n 2 + 1 n sin n x ]
Example 6 6 Obtain the Fourier series to represent the function f ( x ) = x for 0 < x < 2 π .
Fourier Series Formulation on ( 0 , 2 π ) : For the interval ( 0 , 2 π ) with period T = 2 π , the Fourier series expansion is:
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
where the Euler coefficients are defined on ( 0 , 2 π ) by:
a 0 a n b n = π 1 ∫ 0 2 π f ( x ) d x , = π 1 ∫ 0 2 π f ( x ) cos ( n x ) d x , = π 1 ∫ 0 2 π f ( x ) sin ( n x ) d x
Evaluating a 0 : Substituting f ( x ) = x :
a 0 = π 1 ∫ 0 2 π x d x = π 1 [ 2 x 2 ] 0 2 π = π 1 ( 2 ( 2 π ) 2 − 0 ) = π 1 ( 2 4 π 2 ) = 2 π
Thus 2 1 a 0 = 2 1 ( 2 π ) = π .
Evaluating a n : Applying integration by parts with u = x (u ′ = 1 ) and d v = cos ( n x ) d x (v = n s i n n x ):
a n = π 1 ∫ 0 2 π x cos ( n x ) d x = π 1 [ x n sin n x − ( 1 ) ( − n 2 cos n x ) ] 0 2 π = π 1 [ x n sin n x + n 2 cos n x ] 0 2 π = π 1 [ ( 2 π n sin 2 nπ + n 2 cos 2 nπ ) − ( 0 + n 2 cos 0 ) ]
Since sin ( 2 nπ ) = 0 , cos ( 2 nπ ) = 1 , and cos 0 = 1 :
a n = π 1 [ ( 0 + n 2 1 ) − ( n 2 1 ) ] = π 1 ( 0 ) = 0
Evaluating b n : Applying integration by parts with u = x (u ′ = 1 ) and d v = sin ( n x ) d x (v = − n c o s n x ):
b n = π 1 ∫ 0 2 π x sin ( n x ) d x = π 1 [ x ( − n cos n x ) − ( 1 ) ( − n 2 sin n x ) ] 0 2 π = π 1 [ − n x cos n x + n 2 sin n x ] 0 2 π = π 1 [ ( − n 2 π cos 2 nπ + n 2 sin 2 nπ ) − ( 0 + 0 ) ]
Since cos ( 2 nπ ) = 1 and sin ( 2 nπ ) = 0 :
b n = π 1 ( − n 2 π ( 1 ) + 0 ) = − n 2
Assembling the Series: Substituting 2 1 a 0 = π , a n = 0 , and b n = − n 2 :
x = π + n = 1 ∑ ∞ ( − n 2 ) sin ( n x ) = π − 2 n = 1 ∑ ∞ n sin n x = π − 2 ( 1 sin x + 2 sin 2 x + 3 sin 3 x + 4 sin 4 x + ⋯ )
Answer: x = π − 2 n = 1 ∑ ∞ n sin n x = π − 2 ( 1 sin x + 2 sin 2 x + 3 sin 3 x + ⋯ )
Example 7 7 Find a Fourier series to represent f ( x ) = π − x for 0 < x < 2 π .
Fourier Series Formulation on ( 0 , 2 π ) : For f ( x ) = π − x on the interval ( 0 , 2 π ) :
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
Evaluating a 0 : Integrating π − x over [ 0 , 2 π ] :
a 0 = π 1 ∫ 0 2 π ( π − x ) d x = π 1 [ π x − 2 x 2 ] 0 2 π = π 1 [ ( π ( 2 π ) − 2 ( 2 π ) 2 ) − ( 0 − 0 ) ] = π 1 ( 2 π 2 − 2 4 π 2 ) = π 1 ( 2 π 2 − 2 π 2 ) = 0
Thus 2 1 a 0 = 0 .
Evaluating a n : Integrating by parts with u = π − x (u ′ = − 1 ) and d v = cos ( n x ) d x (v = n s i n n x ):
a n = π 1 ∫ 0 2 π ( π − x ) cos ( n x ) d x = π 1 [ ( π − x ) n sin n x − ( − 1 ) ( − n 2 cos n x ) ] 0 2 π = π 1 [ ( π − x ) n sin n x − n 2 cos n x ] 0 2 π = π 1 [ ( ( π − 2 π ) n sin 2 nπ − n 2 cos 2 nπ ) − ( ( π − 0 ) n sin 0 − n 2 cos 0 ) ] = π 1 [ ( 0 − n 2 1 ) − ( 0 − n 2 1 ) ] = π 1 ( − n 2 1 + n 2 1 ) = 0
Evaluating b n : Integrating by parts with u = π − x (u ′ = − 1 ) and d v = sin ( n x ) d x (v = − n c o s n x ):
b n = π 1 ∫ 0 2 π ( π − x ) sin ( n x ) d x = π 1 [ ( π − x ) ( − n cos n x ) − ( − 1 ) ( n 2 sin n x ) ] 0 2 π = π 1 [ − ( π − x ) n cos n x + n 2 sin n x ] 0 2 π = π 1 [ ( − ( π − 2 π ) n cos 2 nπ + 0 ) − ( − ( π − 0 ) n cos 0 + 0 ) ] = π 1 [ ( − ( − π ) n 1 ) − ( − π n 1 ) ] = π 1 ( n π + n π ) = π 1 ( n 2 π ) = n 2
Assembling the Series: Substituting a 0 = 0 , a n = 0 , and b n = n 2 :
π − x = 0 + 0 + n = 1 ∑ ∞ n 2 sin ( n x ) = 2 n = 1 ∑ ∞ n sin n x = 2 ( 1 sin x + 2 sin 2 x + 3 sin 3 x + 4 sin 4 x + ⋯ )
Answer: π − x = 2 n = 1 ∑ ∞ n sin n x = 2 ( 1 sin x + 2 sin 2 x + 3 sin 3 x + ⋯ )
Example 8 8 Find the Fourier series of f ( x ) = x ( 2 π − x ) in ( 0 , 2 π ) where f ( x ) = f ( x + 2 π ) .
Fourier Series Formulation on ( 0 , 2 π ) : Writing f ( x ) = 2 π x − x 2 on ( 0 , 2 π ) with period T = 2 π :
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos n x + b n sin n x )
Evaluating a 0 :
a 0 = π 1 ∫ 0 2 π ( 2 π x − x 2 ) d x = π 1 [ π x 2 − 3 x 3 ] 0 2 π = π 1 [ ( π ( 4 π 2 ) − 3 8 π 3 ) − ( 0 − 0 ) ] = π 1 ( 4 π 3 − 3 8 π 3 ) = π 1 ( 3 4 π 3 ) = 3 4 π 2
Thus 2 1 a 0 = 3 2 π 2 .
Evaluating a n : Applying generalized integration by parts with u = 2 π x − x 2 (u ′ = 2 π − 2 x , u ′′ = − 2 ) and v = cos ( n x ) :
a n = π 1 ∫ 0 2 π ( 2 π x − x 2 ) cos ( n x ) d x = π 1 [ ( 2 π x − x 2 ) ( n sin n x ) − ( 2 π − 2 x ) ( − n 2 cos n x ) + ( − 2 ) ( − n 3 sin n x ) ] 0 2 π = π 1 [ ( 2 π x − x 2 ) n sin n x + ( 2 π − 2 x ) n 2 cos n x + 2 n 3 sin n x ] 0 2 π = π 1 [ ( 0 + ( 2 π − 4 π ) n 2 cos 2 nπ + 0 ) − ( 0 + ( 2 π − 0 ) n 2 cos 0 + 0 ) ] = π 1 [ − n 2 2 π ( 1 ) − n 2 2 π ( 1 ) ] = π 1 ( − n 2 4 π ) = − n 2 4
Evaluating b n : Applying generalized integration by parts with u = 2 π x − x 2 (u ′ = 2 π − 2 x , u ′′ = − 2 ) and v = sin ( n x ) :
b n = π 1 ∫ 0 2 π ( 2 π x − x 2 ) sin ( n x ) d x = π 1 [ ( 2 π x − x 2 ) ( − n cos n x ) − ( 2 π − 2 x ) ( − n 2 sin n x ) + ( − 2 ) ( n 3 cos n x ) ] 0 2 π = π 1 [ − ( 2 π x − x 2 ) n cos n x + ( 2 π − 2 x ) n 2 sin n x − 2 n 3 cos n x ] 0 2 π = π 1 [ ( 0 + 0 − n 3 2 cos 2 nπ ) − ( 0 + 0 − n 3 2 cos 0 ) ] = π 1 ( − n 3 2 + n 3 2 ) = 0
Assembling the Series: Substituting 2 1 a 0 = 3 2 π 2 , a n = − n 2 4 , and b n = 0 :
2 π x − x 2 = 3 2 π 2 + n = 1 ∑ ∞ ( − n 2 4 ) cos ( n x ) = 3 2 π 2 − 4 n = 1 ∑ ∞ n 2 cos n x = 3 2 π 2 − 4 ( 1 2 cos x + 2 2 cos 2 x + 3 2 cos 3 x + ⋯ )
Answer: 2 π x − x 2 = 3 2 π 2 − 4 n = 1 ∑ ∞ n 2 cos n x
Example 9 9 Find the Fourier series to represent f ( x ) = x 2 in the interval ( − l , l ) .
Fourier Series Formulation on ( − l , l ) & Parity Check: In the arbitrary period interval ( − l , l ) with period T = 2 l :
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos l nπ x + b n sin l nπ x ) ⋯ ( 1 )
Since f ( − x ) = ( − x ) 2 = x 2 = f ( x ) , f ( x ) is an even function on ( − l , l ) . Consequently:
b n = l 1 ∫ − l l x 2 sin ( l nπ x ) d x = 0
Evaluating a 0 : Using even symmetry to double the integral over [ 0 , l ] :
a 0 = l 1 ∫ − l l x 2 d x = l 2 ∫ 0 l x 2 d x = l 2 [ 3 x 3 ] 0 l = l 2 ( 3 l 3 − 0 ) = 3 2 l 2
Thus 2 1 a 0 = 3 l 2 .
Evaluating a n : Applying generalized integration by parts with u = x 2 and v = cos ( l nπ x ) :
a n = l 2 ∫ 0 l x 2 cos ( l nπ x ) d x = l 2 [ x 2 ( l nπ sin l nπ x ) − ( 2 x ) ( − l 2 n 2 π 2 cos l nπ x ) + ( 2 ) ( − l 3 n 3 π 3 sin l nπ x ) ] 0 l = l 2 [ nπ l x 2 sin ( l nπ x ) + n 2 π 2 2 l 2 x cos ( l nπ x ) − n 3 π 3 2 l 3 sin ( l nπ x ) ] 0 l
Evaluating at limits x = l and x = 0 , with sin ( nπ ) = 0 and cos ( nπ ) = ( − 1 ) n :
a n = l 2 [ ( 0 + n 2 π 2 2 l 2 ( l ) cos ( nπ ) − 0 ) − ( 0 + 0 − 0 ) ] = l 2 ( n 2 π 2 2 l 3 ( − 1 ) n ) = n 2 π 2 4 l 2 ( − 1 ) n
Assembling the Series: Substituting into equation ( 1 ) :
x 2 = 3 l 2 + n = 1 ∑ ∞ n 2 π 2 4 l 2 ( − 1 ) n cos ( l nπ x ) = 3 l 2 + π 2 4 l 2 n = 1 ∑ ∞ n 2 ( − 1 ) n cos ( l nπ x ) = 3 l 2 + π 2 4 l 2 [ − 1 2 cos l π x + 2 2 cos l 2 π x − 3 2 cos l 3 π x + ⋯ ]
Answer: x 2 = 3 l 2 + π 2 4 l 2 n = 1 ∑ ∞ n 2 ( − 1 ) n cos ( l nπ x ) = 3 l 2 + π 2 4 l 2 [ − 1 2 cos ( π x / l ) + 2 2 cos ( 2 π x / l ) − 3 2 cos ( 3 π x / l ) + ⋯ ]
Example 10 10 Find the Fourier series representation of f ( x ) = x on the interval ( − 2 , 2 ) .
Fourier Series Formulation on ( − 2 , 2 ) & Parity Check: Here the half-period is l = 2 . In the interval ( − l , l ) = ( − 2 , 2 ) :
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos 2 nπ x + b n sin 2 nπ x )
Since f ( − x ) = − x = − f ( x ) , f ( x ) = x is an odd function on ( − 2 , 2 ) . Therefore:
a 0 a n = 2 1 ∫ − 2 2 x d x = 0 , = 2 1 ∫ − 2 2 x cos ( 2 nπ x ) d x = 0
The Fourier series consists purely of sine terms.
Setting up the Fourier Sine Coefficient b n : Since the product of two odd functions x and sin ( 2 nπ x ) is even, the integral over ( − 2 , 2 ) doubles the integral over ( 0 , 2 ) :
b n = 2 1 ∫ − 2 2 x sin ( 2 nπ x ) d x = 2 2 ∫ 0 2 x sin ( 2 nπ x ) d x = ∫ 0 2 x sin ( 2 nπ x ) d x
Integration by Parts on b n : Applying integration by parts with u = x (u ′ = 1 ) and d v = sin ( 2 nπ x ) d x :
v 1 v 2 = − 2 nπ cos 2 nπ x = − nπ 2 cos 2 nπ x = − n 2 π 2 4 sin 2 nπ x
Using ∫ u d v = u v 1 − u ′ v 2 :
b n = [ x ( − nπ 2 cos 2 nπ x ) − ( 1 ) ( − n 2 π 2 4 sin 2 nπ x ) ] 0 2 = [ − nπ 2 x cos ( 2 nπ x ) + n 2 π 2 4 sin ( 2 nπ x ) ] 0 2
Substituting Limits & Parity Simplification: Evaluating at the limits x = 2 and x = 0 :
b n = [ ( − nπ 2 ( 2 ) cos ( nπ ) + n 2 π 2 4 sin ( nπ ) ) − ( 0 + 0 ) ] = − nπ 4 cos ( nπ ) = − nπ 4 ( − 1 ) n = nπ 4 ( − 1 ) n + 1
Assembling the Series: Substituting a 0 = 0 , a n = 0 , and b n = nπ 4 ( − 1 ) n + 1 :
x = n = 1 ∑ ∞ nπ 4 ( − 1 ) n + 1 sin ( 2 nπ x ) = π 4 n = 1 ∑ ∞ n ( − 1 ) n + 1 sin ( 2 nπ x ) = π 4 [ 1 sin 2 π x − 2 sin 2 2 π x + 3 sin 2 3 π x − 4 sin 2 4 π x + ⋯ ]
Answer: x = π 4 n = 1 ∑ ∞ n ( − 1 ) n + 1 sin ( 2 nπ x ) = π 4 [ 1 sin ( π x /2 ) − 2 sin ( 2 π x /2 ) + 3 sin ( 3 π x /2 ) − ⋯ ]
Example 11 11 Obtain a Fourier series for:
f ( x ) = { l − x 0 for 0 < x < l for l < x < 2 l
with period 2 l .
Fourier Series Formulation on ( 0 , 2 l ) : For a function of period 2 l given on ( 0 , 2 l ) :
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos l nπ x + b n sin l nπ x )
Since f ( x ) = 0 on ( l , 2 l ) , the second sub-interval contributes zero to all three coefficients.
Evaluating a 0 :
a 0 = l 1 ∫ 0 l ( l − x ) d x = l 1 [ l x − 2 x 2 ] 0 l = l 1 ( l 2 − 2 l 2 ) = l 1 ( 2 l 2 ) = 2 l
Thus 2 1 a 0 = 4 l .
Evaluating a n : Integrating by parts with u = l − x (u ′ = − 1 ) and d v = cos ( l nπ x ) d x :
a n = l 1 ∫ 0 l ( l − x ) cos ( l nπ x ) d x = l 1 [ ( l − x ) ( l nπ sin l nπ x ) − ( − 1 ) ( − l 2 n 2 π 2 cos l nπ x ) ] 0 l = l 1 [ nπ l ( l − x ) sin ( l nπ x ) − n 2 π 2 l 2 cos ( l nπ x ) ] 0 l = l 1 [ ( 0 − n 2 π 2 l 2 cos ( nπ ) ) − ( 0 − n 2 π 2 l 2 cos 0 ) ] = l 1 ( − n 2 π 2 l 2 ( − 1 ) n + n 2 π 2 l 2 ) = n 2 π 2 l [ 1 − ( − 1 ) n ]
For even n : a n = 0 For odd n : a n = n 2 π 2 2 l Evaluating b n : Integrating by parts with u = l − x (u ′ = − 1 ) and d v = sin ( l nπ x ) d x :
b n = l 1 ∫ 0 l ( l − x ) sin ( l nπ x ) d x = l 1 [ ( l − x ) ( − l nπ cos l nπ x ) − ( − 1 ) ( − l 2 n 2 π 2 sin l nπ x ) ] 0 l = l 1 [ − nπ l ( l − x ) cos ( l nπ x ) − n 2 π 2 l 2 sin ( l nπ x ) ] 0 l = l 1 [ ( 0 − 0 ) − ( − nπ l 2 − 0 ) ] = l 1 ( nπ l 2 ) = nπ l
Assembling the Series: Substituting a 0 , a n , and b n :
f ( x ) = 4 l + n = 1 ∑ ∞ [ n 2 π 2 l [ 1 − ( − 1 ) n ] cos ( l nπ x ) + nπ l sin ( l nπ x ) ] = 4 l + π 2 2 l ( 1 2 cos l π x + 3 2 cos l 3 π x + 5 2 cos l 5 π x + ⋯ ) + π l ( 1 sin l π x + 2 sin l 2 π x + 3 sin l 3 π x + ⋯ )
Answer: f ( x ) = 4 l + n = 1 ∑ ∞ [ n 2 π 2 l [ 1 − ( − 1 ) n ] cos ( l nπ x ) + nπ l sin ( l nπ x ) ]
Example 12 12 Find the Fourier series of the function f ( x ) = 2 x − x 2 in the interval ( 0 , 2 ) .
Fourier Series Formulation on ( 0 , 2 ) : Here the interval is ( 0 , 2 l ) = ( 0 , 2 ) , so l = 1 and l nπ x = nπ x :
f ( x ) = 2 1 a 0 + n = 1 ∑ ∞ ( a n cos nπ x + b n sin nπ x )
Evaluating a 0 : Integrating over [ 0 , 2 ] with l = 1 :
a 0 = 1 1 ∫ 0 2 ( 2 x − x 2 ) d x = [ x 2 − 3 x 3 ] 0 2 = ( 4 − 3 8 ) − ( 0 ) = 3 4
Thus 2 1 a 0 = 3 2 .
Evaluating a n : Applying generalized integration by parts with u = 2 x − x 2 (u ′ = 2 − 2 x , u ′′ = − 2 ) and v = cos ( nπ x ) :
a n = ∫ 0 2 ( 2 x − x 2 ) cos ( nπ x ) d x = [ ( 2 x − x 2 ) ( nπ sin nπ x ) − ( 2 − 2 x ) ( − n 2 π 2 cos nπ x ) + ( − 2 ) ( − n 3 π 3 sin nπ x ) ] 0 2 = [ ( 2 x − x 2 ) nπ sin nπ x + ( 2 − 2 x ) n 2 π 2 cos nπ x + 2 n 3 π 3 sin nπ x ] 0 2 = [ ( 0 + ( 2 − 4 ) n 2 π 2 cos 2 nπ + 0 ) − ( 0 + ( 2 − 0 ) n 2 π 2 cos 0 + 0 ) ] = − n 2 π 2 2 cos 2 nπ − n 2 π 2 2 cos 0 = − n 2 π 2 2 ( 1 ) − n 2 π 2 2 ( 1 ) = − n 2 π 2 4
Evaluating b n : Applying generalized integration by parts with u = 2 x − x 2 and v = sin ( nπ x ) :
b n = ∫ 0 2 ( 2 x − x 2 ) sin ( nπ x ) d x = [ ( 2 x − x 2 ) ( − nπ cos nπ x ) − ( 2 − 2 x ) ( − n 2 π 2 sin nπ x ) + ( − 2 ) ( n 3 π 3 cos nπ x ) ] 0 2 = [ − ( 2 x − x 2 ) nπ cos nπ x + ( 2 − 2 x ) n 2 π 2 sin nπ x − 2 n 3 π 3 cos nπ x ] 0 2 = [ ( 0 + 0 − n 3 π 3 2 cos 2 nπ ) − ( 0 + 0 − n 3 π 3 2 cos 0 ) ] = − n 3 π 3 2 + n 3 π 3 2 = 0
Assembling the Series: Substituting 2 1 a 0 = 3 2 , a n = − n 2 π 2 4 , and b n = 0 :
2 x − x 2 = 3 2 + n = 1 ∑ ∞ ( − n 2 π 2 4 ) cos ( nπ x ) = 3 2 − π 2 4 n = 1 ∑ ∞ n 2 cos ( nπ x ) = 3 2 − π 2 4 [ 1 2 cos π x + 2 2 cos 2 π x + 3 2 cos 3 π x + 4 2 cos 4 π x + ⋯ ]
Answer: 2 x − x 2 = 3 2 − π 2 4 n = 1 ∑ ∞ n 2 cos ( nπ x ) = 3 2 − π 2 4 [ 1 2 cos π x + 2 2 cos 2 π x + 3 2 cos 3 π x + ⋯ ]
Exercise 1 (Questions & Final Book Answers)
Exercise - 1 Question 1 Obtain a Fourier series to represent x − x 2 from x = − π to x = π and deduce that 12 π 2 = 1 2 1 − 2 2 1 + 3 2 1 − 4 2 1 + ⋯
Evaluating a 0 : For the interval ( − π , π ) :
a 0 = π 1 ∫ − π π ( x − x 2 ) d x = π 1 [ ∫ − π π x d x − ∫ − π π x 2 d x ] = 0 − π 2 ∫ 0 π x 2 d x = − π 2 [ 3 x 3 ] 0 π = − 3 2 π 2
Thus:
Evaluating a n : Since x cos n x is odd and x 2 cos n x is even:
a n = π 1 ∫ − π π ( x − x 2 ) cos n x d x = − π 2 ∫ 0 π x 2 cos n x d x = − π 2 [ x 2 n sin n x + 2 x n 2 cos n x − 2 n 3 sin n x ] 0 π = − π 2 ( n 2 2 π cos nπ − 0 ) = − n 2 4 ( − 1 ) n = n 2 4 ( − 1 ) n + 1
Evaluating b n : Since x sin n x is even and x 2 sin n x is odd:
b n = π 1 ∫ − π π ( x − x 2 ) sin n x d x = π 2 ∫ 0 π x sin n x d x = π 2 [ − x n cos n x + n 2 sin n x ] 0 π = π 2 ( − n π cos nπ − 0 ) = − n 2 ( − 1 ) n = n 2 ( − 1 ) n + 1
Assembling the Series: Substituting a 0 , a n , b n into the Fourier series:
x − x 2 = − 3 π 2 + 4 ( 1 2 cos x − 2 2 cos 2 x + 3 2 cos 3 x − ⋯ ) + 2 ( 1 sin x − 2 sin 2 x + 3 sin 3 x − ⋯ )
Deducing the Identity: Setting x = 0 , where f ( 0 ) = 0 :
0 3 π 2 12 π 2 = − 3 π 2 + 4 ( 1 2 1 − 2 2 1 + 3 2 1 − 4 2 1 + ⋯ ) = 4 ( 1 2 1 − 2 2 1 + 3 2 1 − 4 2 1 + ⋯ ) = 1 2 1 − 2 2 1 + 3 2 1 − 4 2 1 + ⋯
Answer: − 3 π 2 + 4 ( 1 2 cos x − 2 2 cos 2 x + ⋯ ) + 2 ( 1 sin x − 2 sin 2 x + ⋯ )
Question 2 If f ( x ) = x + x 2 for − π ≤ x ≤ π , then find the Fourier series of f ( x ) and deduce that 6 π 2 = 1 2 1 + 2 2 1 + 3 2 1 + 4 2 1 + ⋯
Evaluating a 0 : For f ( x ) = x + x 2 on ( − π , π ) :
a 0 = π 1 ∫ − π π ( x + x 2 ) d x = π 2 ∫ 0 π x 2 d x = π 2 [ 3 x 3 ] 0 π = 3 2 π 2
Thus:
Evaluating a n by Tabular Integration: Since x cos n x is odd and x 2 cos n x is even:
a n = π 2 ∫ 0 π x 2 cos n x d x = π 2 [ x 2 n sin n x + 2 x n 2 cos n x − 2 n 3 sin n x ] 0 π = π 2 ( n 2 2 π cos nπ − 0 ) = n 2 4 ( − 1 ) n
Evaluating b n by Integration by Parts: Since x sin n x is even and x 2 sin n x is odd:
b n = π 2 ∫ 0 π x sin n x d x = π 2 [ − x n cos n x + n 2 sin n x ] 0 π = π 2 ( − n π cos nπ − 0 ) = − n 2 ( − 1 ) n
Assembling the Fourier Series: Writing in sigma notation:
f ( x ) = 3 π 2 + n = 1 ∑ ∞ [ n 2 4 ( − 1 ) n cos n x − n 2 ( − 1 ) n sin n x ] = 3 π 2 + n = 1 ∑ ∞ ( − 1 ) n ( n 2 4 cos n x − n 2 sin n x )
Deducing the Value of the Series: By Dirichlet's theorem, at the boundary points x = ± π :
2 f ( π − ) + f ( − π + ) = 2 ( π + π 2 ) + ( − π + π 2 ) = π 2
Substituting x = π into the series:
π 2 π 2 − 3 π 2 3 2 π 2 6 π 2 = 3 π 2 + n = 1 ∑ ∞ ( − 1 ) n ( n 2 4 ( − 1 ) n − 0 ) = 4 n = 1 ∑ ∞ n 2 1 = 4 n = 1 ∑ ∞ n 2 1 = 1 2 1 + 2 2 1 + 3 2 1 + 4 2 1 + ⋯
Answer: 3 π 2 + n = 1 ∑ ∞ ( − 1 ) n ( n 2 4 cos n x − n 2 sin n x )
Question 3 Obtain a Fourier series for f ( x ) = x 3 in the interval − π ≤ x ≤ π .
Parity Analysis: Since f ( − x ) = ( − x ) 3 = − x 3 = − f ( x ) , f ( x ) is an odd function on ( − π , π ) :
The Fourier series consists purely of sine terms:
Evaluating b n by Tabular Integration: The coefficient b n is:
Integrating by parts:
∫ x 3 sin n x d x = x 3 ( − n cos n x ) − ( 3 x 2 ) ( − n 2 sin n x ) + ( 6 x ) ( n 3 cos n x ) − ( 6 ) ( n 4 sin n x ) = − n x 3 cos n x + n 2 3 x 2 sin n x + n 3 6 x cos n x − n 4 6 sin n x
Substituting the Limits: Evaluating from x = 0 to x = π :
b n = π 2 [ − n π 3 cos nπ + n 3 6 π cos nπ ] = 2 ( − 1 ) n [ − n π 2 + n 3 6 ] = 2 ( − 1 ) n + 1 [ n π 2 − n 3 6 ]
Assembling the Series: Writing out terms for n = 1 , 2 , 3 , … :
x 3 = 2 [ ( 1 π 2 − 1 3 6 ) sin x − ( 2 π 2 − 2 3 6 ) sin 2 x + ( 3 π 2 − 3 3 6 ) sin 3 x − ⋯ ]
Answer: 2 [ ( 1 π 2 − 1 3 6 ) sin x − ( 2 π 2 − 2 3 6 ) sin 2 x + ( 3 π 2 − 3 3 6 ) sin 3 x − ⋯ ]
Question 4 Obtain a Fourier series to represent e − a x from x = − π to x = π and derive series for s i n h π π .
Evaluating a 0 : By definition:
a 0 = π 1 ∫ − π π e − a x d x = π 1 [ − a e − a x ] − π π = aπ e aπ − e − aπ = aπ 2 sinh aπ
Thus:
Evaluating a n and b n : Using ∫ e − a x cos n x d x = a 2 + n 2 e − a x ( − a cos n x + n sin n x ) :
a n = π 1 [ a 2 + n 2 e − a x ( − a cos n x + n sin n x ) ] − π π = π ( a 2 + n 2 ) 1 [ − a e − aπ ( − 1 ) n + a e aπ ( − 1 ) n ] = π ( a 2 + n 2 ) 2 a sinh aπ ( − 1 ) n
Using ∫ e − a x sin n x d x = a 2 + n 2 e − a x ( − a sin n x − n cos n x ) :
b n = π 1 [ a 2 + n 2 e − a x ( − a sin n x − n cos n x ) ] − π π = π ( a 2 + n 2 ) 1 [ − n e − aπ ( − 1 ) n + n e aπ ( − 1 ) n ] = π ( a 2 + n 2 ) 2 n sinh aπ ( − 1 ) n + 1
Assembling the Series: Factoring out π 2 s i n h aπ :
e − a x = π 2 sinh aπ [ ( 2 a 1 − 1 2 + a 2 a cos x + 2 2 + a 2 a cos 2 x − ⋯ ) + ( 1 2 + a 2 sin x − 2 2 + a 2 2 sin 2 x + 3 2 + a 2 3 sin 3 x − ⋯ ) ]
Deriving Series for s i n h π π : Setting a = 1 and x = 0 where e 0 = 1 :
1 sinh π π = π 2 sinh π ( 2 1 − 1 2 + 1 1 + 2 2 + 1 1 − 3 2 + 1 1 + ⋯ ) = 2 ( 2 1 − 2 1 + 5 1 − 10 1 + ⋯ )
Answer: π 2 sinh aπ [ ( 2 a 1 − 1 2 + a 2 a cos x + 2 2 + a 2 a cos 2 x − ⋯ ) + ( 1 2 + a 2 sin x − 2 2 + a 2 2 sin 2 x + 3 2 + a 2 3 sin 3 x − ⋯ ) ]
Question 5 Obtain a Fourier series to represent the function f ( x ) = ∣ x ∣ for − π ≤ x ≤ π , and hence deduce 8 π 2 = 1 2 1 + 3 2 1 + 5 2 1 + ⋯
Parity Analysis & Formulation: Since ∣ − x ∣ = ∣ x ∣ , f ( x ) is an even function:
The Fourier series is:
∣ x ∣ = 2 a 0 + n = 1 ∑ ∞ a n cos n x
Evaluating a 0 : Integrating directly:
a 0 = π 2 ∫ 0 π x d x = π 2 [ 2 x 2 ] 0 π = π
Thus:
Evaluating a n : Integrating by parts:
Assembling the Series & Deducing the Sum: Substituting a 0 and a n :
∣ x ∣ = 2 π − π 4 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ )
Setting x = 0 where ∣0∣ = 0 :
0 π 4 ( 1 2 1 + 3 2 1 + 5 2 1 + ⋯ ) 8 π 2 = 2 π − π 4 ( 1 2 1 + 3 2 1 + 5 2 1 + ⋯ ) = 2 π = 1 2 1 + 3 2 1 + 5 2 1 + ⋯
Answer: 2 π − π 4 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ )
Question 6 Obtain the Fourier series for the function f ( x ) = { 1 + π 2 x 1 − π 2 x for − π ≤ x ≤ 0 for 0 ≤ x ≤ π and hence deduce that 1 2 1 + 3 2 1 + 5 2 1 + ⋯ = 8 π 2 .
Parity Analysis: Notice that f ( − x ) = f ( x ) = 1 − π 2∣ x ∣ , so f ( x ) is an even function:
Evaluating a 0 : Integrating over [ 0 , π ] :
a 0 = π 2 ∫ 0 π ( 1 − π 2 x ) d x = π 2 [ x − π x 2 ] 0 π = π 2 ( π − π ) = 0
Thus:
Evaluating a n : Integrating by parts:
Assembling the Series & Deducing the Sum: Summing over odd n :
f ( x ) = π 2 8 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ )
Setting x = 0 where f ( 0 ) = 1 :
1 8 π 2 = π 2 8 ( 1 2 1 + 3 2 1 + 5 2 1 + ⋯ ) = 1 2 1 + 3 2 1 + 5 2 1 + ⋯
Answer: π 2 8 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ )
Question 7 Obtain the Fourier series of the function f ( x ) = { − 4 π 4 π for − π < x < 0 for 0 < x < π and f ( x + 2 π ) = f ( x ) .
Parity Analysis: Since f ( − x ) = − f ( x ) , f ( x ) is an odd function:
Evaluating b n : By definition:
b n = π 2 ∫ 0 π 4 π sin n x d x = 2 1 [ − n cos n x ] 0 π = 2 n 1 − cos nπ = 2 n 1 − ( − 1 ) n
Odd and Even Harmonic Evaluation: Evaluating for even and odd integers:
Assembling the Fourier Series: Writing out the odd harmonic terms:
f ( x ) = 1 sin x + 3 sin 3 x + 5 sin 5 x + ⋯
Answer: ( 1 sin x + 3 sin 3 x + 5 sin 5 x + ⋯ ) (Book print typo has alternating signs)
Question 8 Obtain the Fourier series of the function f ( x ) = ⎩ ⎨ ⎧ − 1 0 1 for − π < x < − π /2 for − π /2 < x < π /2 for π /2 < x < π and f ( x + 2 π ) = f ( x ) .
Parity Analysis: f ( − x ) = − f ( x ) , so f ( x ) is an odd function:
Evaluating b n : Evaluating over the non-zero interval [ π /2 , π ] :
b n = π 2 ∫ π /2 π ( 1 ) sin n x d x = π 2 [ − n cos n x ] π /2 π = πn 2 [ cos ( 2 nπ ) − cos nπ ] = πn 2 [ cos ( 2 nπ ) − ( − 1 ) n ]
Evaluating Individual Harmonic Coefficients: For n = 1 :
For n = 2 :
For n = 3 :
Assembling the Series: Substituting the evaluated coefficients:
f ( x ) = π 2 ( sin x − sin 2 x + 3 sin 3 x + ⋯ )
Answer: π 2 ( sin x − sin 2 x + 3 sin 3 x + ⋯ )
Question 9 Find the Fourier series of f ( x ) = ∣ sin x ∣ in the interval − π ≤ x ≤ π .
Parity Analysis: Since ∣ sin ( − x ) ∣ = ∣ − sin x ∣ = ∣ sin x ∣ , f ( x ) is even on ( − π , π ) :
Evaluating a 0 and a 1 : Since sin x ≥ 0 on [ 0 , π ] :
a 0 = π 2 ∫ 0 π sin x d x = π 2 [ − cos x ] 0 π = π 4
Thus:
For n = 1 :
a 1 = π 2 ∫ 0 π sin x cos x d x = π 1 ∫ 0 π sin 2 x d x = 0
Evaluating a n for n ≥ 2 : Using 2 sin x cos n x = sin ( n + 1 ) x − sin ( n − 1 ) x :
a n = π 1 ∫ 0 π [ sin ( n + 1 ) x − sin ( n − 1 ) x ] d x = π 1 [ − n + 1 cos ( n + 1 ) x + n − 1 cos ( n − 1 ) x ] 0 π = π 1 [ n + 1 1 − ( − 1 ) n + 1 − n − 1 1 − ( − 1 ) n − 1 ] = − π ( n 2 − 1 ) 2 ( ( − 1 ) n + 1 )
For odd n , a n = 0 . For even n = 2 m :
Assembling the Series: Substituting the coefficients:
∣ sin x ∣ = π 2 − π 4 m = 1 ∑ ∞ 4 m 2 − 1 cos 2 m x = π 2 − π 4 ( 3 cos 2 x + 15 cos 4 x + ⋯ + 4 n 2 − 1 cos 2 n x + ⋯ )
Answer: π 2 − π 4 ( 3 cos 2 x + 15 cos 4 x + ⋯ + 4 n 2 − 1 cos 2 n x + ⋯ )
Question 10 Find the Fourier series of f ( x ) = ∣ cos x ∣ in the interval − π ≤ x ≤ π .
Parity Analysis & Formulation: Since ∣ cos ( − x ) ∣ = ∣ cos x ∣ , f ( x ) is an even function of period π :
Evaluating a 0 : Integrating over the symmetry intervals:
a 0 = π 2 ∫ 0 π ∣ cos x ∣ d x = π 2 [ ∫ 0 π /2 cos x d x − ∫ π /2 π cos x d x ] = π 2 [ 1 − ( − 1 )] = π 4
Thus:
Evaluating a n by Integral Splitting: For n = 1 :
a 1 = π 2 [ ∫ 0 π /2 cos 2 x d x − ∫ π /2 π cos 2 x d x ] = 0
For n ≥ 2 , using 2 cos x cos n x = cos ( n + 1 ) x + cos ( n − 1 ) x :
a n = π 2 [ ∫ 0 π /2 cos x cos n x d x − ∫ π /2 π cos x cos n x d x ] = π ( 1 − n 2 ) 4 cos ( nπ /2 )
For odd n , cos ( nπ /2 ) = 0 , so a n = 0 . For even n = 2 m :
Assembling the Series: Writing out terms for m = 1 , 2 , … :
∣ cos x ∣ = π 2 + π 4 ( 3 cos 2 x − 15 cos 4 x + ⋯ )
Answer: π 2 + π 4 ( 3 cos 2 x − 15 cos 4 x + ⋯ )
Question 11 Find the Fourier series for f ( x ) = e x in the interval − π ≤ x ≤ π .
Evaluating a 0 : By definition:
a 0 = π 1 ∫ − π π e x d x = π e π − e − π = π 2 sinh π
Thus:
Evaluating a n and b n : Using ∫ e x cos n x d x = 1 + n 2 e x ( cos n x + n sin n x ) :
a n = π 1 [ 1 + n 2 e x ( cos n x + n sin n x ) ] − π π = π ( 1 + n 2 ) 2 ( − 1 ) n sinh π
Using ∫ e x sin n x d x = 1 + n 2 e x ( sin n x − n cos n x ) :
b n = π 1 [ 1 + n 2 e x ( sin n x − n cos n x ) ] − π π = − π ( 1 + n 2 ) 2 n ( − 1 ) n sinh π = π ( 1 + n 2 ) 2 n ( − 1 ) n + 1 sinh π
Harmonic Expansion: Writing out terms for n = 1 , 2 , 3 :
a 1 b 1 = − 2 π 2 sinh π = 2 π 2 sinh π
Assembling the Series: Factoring out π 2 s i n h π :
e x = π 2 sinh π [ ( 2 1 − 2 cos x + 5 cos 2 x − 10 cos 3 x + ⋯ ) + ( 2 sin x − 5 2 sin 2 x + ⋯ ) ]
Answer: π 2 sinh π [ ( 2 1 − 2 cos x + 5 cos 2 x − 10 cos 3 x + ⋯ ) + ( 2 sin x − 5 2 sin 2 x + ⋯ ) ]
Question 12 Find the Fourier series of the function f ( x ) = { π + x π − x if − π < x < 0 if 0 < x < π with period 2 π .
Parity Analysis: Notice f ( − x ) = π − ∣ − x ∣ = π − ∣ x ∣ = f ( x ) , so f ( x ) is an even function:
Evaluating a 0 : Integrating directly:
a 0 = π 2 ∫ 0 π ( π − x ) d x = π 2 [ π x − 2 x 2 ] 0 π = π
Thus:
Evaluating a n : Integrating by parts:
Assembling the Series: Writing out terms for odd n :
f ( x ) = 2 π + π 4 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ )
Answer: 2 π + π 4 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ )
Question 13 Find the Fourier series of the function f ( x ) = 2 1 ( π − x ) in the interval 0 ≤ x ≤ 2 π and deduce that 1 − 3 1 + 5 1 − 7 1 + ⋯ = 4 π .
Evaluating a 0 and a n in ( 0 , 2 π ) : Evaluating a 0 :
a 0 = π 1 ∫ 0 2 π 2 1 ( π − x ) d x = 2 π 1 [ π x − 2 x 2 ] 0 2 π = 2 π 1 ( 2 π 2 − 2 π 2 ) = 0
Thus:
Evaluating a n :
a n = 2 π 1 ∫ 0 2 π ( π − x ) cos n x d x = 2 π 1 [ ( π − x ) n sin n x − n 2 cos n x ] 0 2 π = 0
Evaluating b n : Integrating by parts:
b n = 2 π 1 ∫ 0 2 π ( π − x ) sin n x d x = 2 π 1 [ − ( π − x ) n cos n x − n 2 sin n x ] 0 2 π = 2 π 1 [ n π cos 2 nπ + n π ] = n 1
Assembling the Series: Substituting b n :
f ( x ) = 1 sin x + 2 sin 2 x + 3 sin 3 x + ⋯
Deducing the Identity: Setting x = 2 π where f ( π /2 ) = 2 1 ( π − π /2 ) = 4 π :
4 π = 1 sin ( π /2 ) + 2 sin π + 3 sin ( 3 π /2 ) + ⋯ = 1 − 3 1 + 5 1 − 7 1 + ⋯
Question 14 If f ( x ) = 4 ( π − x ) 2 in 0 ≤ x ≤ 2 π , show that the Fourier series of f ( x ) = 12 π 2 + ∑ n = 1 ∞ n 2 c o s n x .
Evaluating a 0 in ( 0 , 2 π ) : By definition:
a 0 = π 1 ∫ 0 2 π 4 ( π − x ) 2 d x = 4 π 1 [ − 3 ( π − x ) 3 ] 0 2 π = 12 π 1 [ π 3 − ( − π 3 ) ] = 6 π 2
Thus:
Evaluating a n by Tabular Integration: Evaluating a n :
a n = 4 π 1 ∫ 0 2 π ( π − x ) 2 cos n x d x = 4 π 1 [ ( π − x ) 2 n sin n x − 2 ( π − x ) n 2 cos n x − 2 n 3 sin n x ] 0 2 π = 4 π 1 [ n 2 2 π − ( − n 2 2 π ) ] = n 2 1
Evaluating b n by Tabular Integration: Evaluating b n :
b n = 4 π 1 ∫ 0 2 π ( π − x ) 2 sin n x d x = 4 π 1 [ − ( π − x ) 2 n cos n x − 2 ( π − x ) n 2 sin n x + 2 n 3 cos n x ] 0 2 π = 4 π 1 [ ( − n π 2 + n 3 2 ) − ( − n π 2 + n 3 2 ) ] = 0
Assembling the Series: Substituting the coefficients:
f ( x ) = 12 π 2 + n = 1 ∑ ∞ n 2 cos n x
Answer: f ( x ) = 12 π 2 + n = 1 ∑ ∞ n 2 cos n x
Question 15 Obtain a Fourier series of f ( x ) = 12 1 ( 3 x 2 − 6 x π + 2 π 2 ) in the interval ( 0 , 2 π ) and deduce that 6 π 2 = 1 2 1 + 2 2 1 + 3 2 1 + ⋯
Evaluating a 0 Directly in ( 0 , 2 π ) : Evaluating the mean value:
a 0 = π 1 ∫ 0 2 π 12 1 ( 3 x 2 − 6 π x + 2 π 2 ) d x = 12 π 1 [ x 3 − 3 π x 2 + 2 π 2 x ] 0 2 π = 12 π 1 ( 8 π 3 − 12 π 3 + 4 π 3 ) = 0
Thus:
Evaluating a n by Tabular Integration: Integrating by parts with u = 12 1 ( 3 x 2 − 6 π x + 2 π 2 ) :
a n = π 1 ∫ 0 2 π 12 1 ( 3 x 2 − 6 π x + 2 π 2 ) cos n x d x = π 1 [ 12 3 x 2 − 6 π x + 2 π 2 n sin n x + 2 x − π n 2 cos n x − 2 n 3 sin n x ] 0 2 π = π 1 ( 2 n 2 π − ( − 2 n 2 π ) ) = n 2 1
Evaluating b n by Tabular Integration: Integrating with sin n x :
b n = π 1 ∫ 0 2 π 12 1 ( 3 x 2 − 6 π x + 2 π 2 ) sin n x d x = π 1 [ − 12 3 x 2 − 6 π x + 2 π 2 n cos n x + 2 x − π n 2 sin n x + 2 n 3 cos n x ] 0 2 π = π 1 [ ( − 6 n π 2 + 2 n 3 1 ) − ( − 6 n π 2 + 2 n 3 1 ) ] = 0
Assembling the Series: Substituting the coefficients:
Deducing the Sum: Setting x = 0 where f ( 0 ) = 12 2 π 2 = 6 π 2 :
6 π 2 = n = 1 ∑ ∞ n 2 cos ( 0 ) = 1 2 1 + 2 2 1 + 3 2 1 + ⋯
Question 16 Find the Fourier series to represent the function given by f ( x ) = { x 2 π − x if 0 ≤ x ≤ π if π ≤ x ≤ 2 π and hence deduce that 1 2 1 + 3 2 1 + 5 2 1 + ⋯ = 8 π 2 .
Evaluating a 0 in ( 0 , 2 π ) : Evaluating the mean value:
a 0 = π 1 [ ∫ 0 π x d x + ∫ π 2 π ( 2 π − x ) d x ] = π 1 [ 2 π 2 + 2 π 2 ] = π
Thus:
Evaluating a n by Integration by Parts: Evaluating on each interval:
Evaluating b n : Evaluating the sine integrals:
b n = π 1 [ ∫ 0 π x sin n x d x + ∫ π 2 π ( 2 π − x ) sin n x d x ] = π 1 ( [ − x n cos n x + n 2 sin n x ] 0 π + [ − ( 2 π − x ) n cos n x − n 2 sin n x ] π 2 π ) = π 1 [ − n π cos nπ + n π cos nπ ] = 0
Assembling the Series & Deducing the Identity: Substituting a 0 and a n :
f ( x ) = 2 π − π 4 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ )
Setting x = 0 where f ( 0 ) = 0 :
0 1 2 1 + 3 2 1 + 5 2 1 + ⋯ = 2 π − π 4 ( 1 2 1 + 3 2 1 + 5 2 1 + ⋯ ) = 8 π 2
Answer: 2 π − π 4 ( 1 2 cos x + 3 2 cos 3 x + 5 2 cos 5 x + ⋯ )
Question 17 Find the Fourier expansion of the function f ( x ) = { 1 2 for 0 < x < π for π < x < 2 π and hence deduce that 4 π = 1 1 − 3 1 + 5 1 − 7 1 + ⋯
Evaluating a 0 : Integrating across the two pieces:
a 0 = π 1 [ ∫ 0 π ( 1 ) d x + ∫ π 2 π ( 2 ) d x ] = π 1 ( π + 2 π ) = 3
Thus:
Evaluating a n : Evaluating the cosine integrals:
a n = π 1 [ ∫ 0 π cos n x d x + 2 ∫ π 2 π cos n x d x ] = π 1 ( [ n sin n x ] 0 π + 2 [ n sin n x ] π 2 π ) = 0
Evaluating b n : Evaluating the sine integrals:
Assembling the Series & Deducing the Identity: Substituting into the Fourier series:
f ( x ) = 2 3 − π 2 ( 1 sin x + 3 sin 3 x + 5 sin 5 x + ⋯ )
Setting x = 2 π where f ( π /2 ) = 1 :
1 π 2 ( 1 − 3 1 + 5 1 − 7 1 + ⋯ ) 4 π = 2 3 − π 2 ( 1 − 3 1 + 5 1 − 7 1 + ⋯ ) = 2 1 = 1 − 3 1 + 5 1 − 7 1 + ⋯
Answer: 2 3 − π 2 ( 1 sin x + 3 sin 3 x + 5 sin 5 x + ⋯ )
Question 18 Find the Fourier series of f ( x ) = 1 − x 2 in the interval − 1 ≤ x ≤ 1 .
Parity Analysis (l = 1 ): Since f ( − x ) = 1 − ( − x ) 2 = 1 − x 2 = f ( x ) , f ( x ) is an even function:
Evaluating a 0 : Integrating over [ 0 , 1 ] :
a 0 = 1 2 ∫ 0 1 ( 1 − x 2 ) d x = 2 [ x − 3 x 3 ] 0 1 = 3 4
Thus:
Evaluating a n by Tabular Integration: Integrating by parts:
a n = 2 ∫ 0 1 ( 1 − x 2 ) cos ( nπ x ) d x = 2 [ ( 1 − x 2 ) nπ sin nπ x − ( − 2 x ) ( − n 2 π 2 cos nπ x ) + ( − 2 ) ( − n 3 π 3 sin nπ x ) ] 0 1 = 2 [ − n 2 π 2 2 cos nπ ] = − n 2 π 2 4 ( − 1 ) n = n 2 π 2 4 ( − 1 ) n + 1
Assembling the Series: Writing out terms for n = 1 , 2 , 3 , … :
1 − x 2 = 3 2 + π 2 4 ( 1 2 cos π x − 2 2 cos 2 π x + 3 2 cos 3 π x − ⋯ )
Answer: 3 2 + π 2 4 ( 1 2 cos π x − 2 2 cos 2 π x + 3 2 cos 3 π x − ⋯ )
Question 19 Find the Fourier series of f ( x ) = e − x in the interval − l ≤ x ≤ l .
Evaluating a 0 in ( − l , l ) : By definition:
a 0 = l 1 ∫ − l l e − x d x = l 1 [ − e − x ] − l l = l e l − e − l = l 2 sinh l
Thus:
Evaluating a n : Using the standard antiderivative:
a n = l 1 ∫ − l l e − x cos ( l nπ x ) d x = l 1 [ 1 + l 2 n 2 π 2 e − x ( − cos l nπ x + l nπ sin l nπ x ) ] − l l = l 2 + n 2 π 2 l [ − e − l ( − 1 ) n − ( − e l ( − 1 ) n ) ] = l 2 + n 2 π 2 2 l sinh l ( − 1 ) n
Evaluating b n : Using the sine antiderivative:
b n = l 1 ∫ − l l e − x sin ( l nπ x ) d x = l 1 [ 1 + l 2 n 2 π 2 e − x ( − sin l nπ x − l nπ cos l nπ x ) ] − l l = l 2 + n 2 π 2 nπ [ − e − l ( − 1 ) n − ( − e l ( − 1 ) n ) ] = l 2 + n 2 π 2 2 nπ sinh l ( − 1 ) n
Assembling the Series: Factoring out l s i n h l :
e − x = l sinh l [ 1 − 2 l 2 ( l 2 + π 2 cos ( π x / l ) − l 2 + 2 2 π 2 cos ( 2 π x / l ) + ⋯ ) − 2 π l ( l 2 + π 2 sin ( π x / l ) − l 2 + 2 2 π 2 2 sin ( 2 π x / l ) + ⋯ ) ]
Answer: l sinh l [ 1 − 2 l 2 ( l 2 + π 2 cos ( π x / l ) − l 2 + 2 2 π 2 cos ( 2 π x / l ) + ⋯ ) − 2 π l ( l 2 + π 2 sin ( π x / l ) − l 2 + 2 2 π 2 2 sin ( 2 π x / l ) + ⋯ ) ]
Question 20 Find the Fourier series for the function f ( x ) = x − x 2 in the interval − 1 ≤ x ≤ 1 .
Evaluating a 0 (l = 1 ): Evaluating the average:
a 0 = 1 1 ∫ − 1 1 ( x − x 2 ) d x = − 2 ∫ 0 1 x 2 d x = − 2 [ 3 x 3 ] 0 1 = − 3 2
Thus:
Evaluating a n : Evaluating a n :
a n = ∫ − 1 1 ( x − x 2 ) cos ( nπ x ) d x = − 2 ∫ 0 1 x 2 cos ( nπ x ) d x = − 2 [ n 2 π 2 2 cos nπ ] = n 2 π 2 4 ( − 1 ) n + 1
Evaluating b n : Evaluating b n :
b n = ∫ − 1 1 ( x − x 2 ) sin ( nπ x ) d x = 2 ∫ 0 1 x sin ( nπ x ) d x = 2 [ − nπ cos nπ ] = nπ 2 ( − 1 ) n + 1
Assembling the Series: Writing out the harmonic terms:
x − x 2 = − 3 1 + π 2 4 ( 1 2 cos ( π x ) − 2 2 cos ( 2 π x ) + 3 2 cos ( 3 π x ) − ⋯ ) + π 2 ( 1 sin ( π x ) − 2 sin ( 2 π x ) + 3 sin ( 3 π x ) − ⋯ )
Answer: − 3 1 + π 2 4 ( 1 2 cos ( π x ) − 2 2 cos ( 2 π x ) + 3 2 cos ( 3 π x ) − ⋯ ) + π 2 ( 1 sin ( π x ) − 2 sin ( 2 π x ) + 3 sin ( 3 π x ) − ⋯ )
Question 21 Find the Fourier series for the function f ( x ) = x 2 − 2 in the interval − 2 ≤ x ≤ 2 .
Parity Analysis (l = 2 ): Since f ( − x ) = ( − x ) 2 − 2 = x 2 − 2 = f ( x ) , f ( x ) is an even function:
Evaluating a 0 : Integrating over [ 0 , 2 ] :
a 0 = 2 2 ∫ 0 2 ( x 2 − 2 ) d x = [ 3 x 3 − 2 x ] 0 2 = 3 8 − 4 = − 3 4
Thus:
Evaluating a n : Integrating by parts:
a n = 2 2 ∫ 0 2 ( x 2 − 2 ) cos ( 2 nπ x ) d x = [ ( x 2 − 2 ) nπ 2 sin 2 nπ x − ( 2 x ) ( − n 2 π 2 4 cos 2 nπ x ) + ( 2 ) ( − n 3 π 3 8 sin 2 nπ x ) ] 0 2 = n 2 π 2 16 cos nπ = − n 2 π 2 16 ( − 1 ) n + 1
Assembling the Series: Writing out terms for n = 1 , 2 , 3 , … :
x 2 − 2 = − 3 2 − π 2 16 ( 1 cos ( π x /2 ) − 4 cos ( 2 π x /2 ) + 9 cos ( 3 π x /2 ) − ⋯ )
Answer: − 3 2 − π 2 16 ( 1 cos ( π x /2 ) − 4 cos ( 2 π x /2 ) + 9 cos ( 3 π x /2 ) − ⋯ )
Question 22 Find a Fourier series for f ( x ) = { 0 1 for − 2 < x < 0 for 0 < x < 2 in the interval ( − 2 , 2 ) .
Evaluating a 0 (l = 2 ): Evaluating the average:
Thus:
Evaluating a n : Evaluating the cosine integral:
a n = 2 1 ∫ 0 2 ( 1 ) cos ( 2 nπ x ) d x = 2 1 [ nπ 2 sin 2 nπ x ] 0 2 = 0
Evaluating b n : Evaluating the sine integral:
Assembling the Series: Writing out odd harmonic terms:
f ( x ) = 2 1 + π 2 ( 1 sin ( π x /2 ) + 3 sin ( 3 π x /2 ) + ⋯ )
Answer: 2 1 + π 2 ( 1 sin ( π x /2 ) + 3 sin ( 3 π x /2 ) + ⋯ )
Question 23 If f ( x ) = { π x π ( 2 − x ) for 0 ≤ x ≤ 1 for 1 ≤ x ≤ 2 , then show that the Fourier series in the interval ( 0 , 2 ) is f ( x ) = 2 π − π 4 [ 1 2 c o s π x + 3 2 c o s 3 π x + 5 2 c o s 5 π x + ⋯ ] .
Evaluating a 0 in ( 0 , 2 ) (l = 1 ): Evaluating the average:
a 0 = 1 1 [ ∫ 0 1 π x d x + ∫ 1 2 π ( 2 − x ) d x ] = π [ 2 1 + 2 1 ] = π
Thus:
Evaluating a n by Integration by Parts: Integrating on each piece:
Evaluating b n : Evaluating the sine integrals:
b n = ∫ 0 1 π x sin ( nπ x ) d x + ∫ 1 2 π ( 2 − x ) sin ( nπ x ) d x = π ( [ − x nπ cos nπ x + n 2 π 2 sin nπ x ] 0 1 + [ − ( 2 − x ) nπ cos nπ x − n 2 π 2 sin nπ x ] 1 2 ) = π [ − nπ cos nπ + nπ cos nπ ] = 0
Assembling the Series: Substituting into the Fourier series:
f ( x ) = 2 π − π 4 [ 1 2 cos π x + 3 2 cos 3 π x + 5 2 cos 5 π x + ⋯ ]
Answer: f ( x ) = 2 π − π 4 [ 1 2 cos π x + 3 2 cos 3 π x + 5 2 cos 5 π x + ⋯ ]
Question 24 Find the Fourier series to represent the function f ( x ) = x 2 in the interval ( 0 , 2 ) .
Evaluating a 0 in ( 0 , 2 ) (l = 1 , period 2 ): Evaluating the average:
a 0 = 1 1 ∫ 0 2 x 2 d x = [ 3 x 3 ] 0 2 = 3 8
Thus:
Evaluating a n by Tabular Integration: Evaluating a n :
a n = ∫ 0 2 x 2 cos ( nπ x ) d x = [ x 2 nπ sin nπ x + 2 x n 2 π 2 cos nπ x − 2 n 3 π 3 sin nπ x ] 0 2 = n 2 π 2 4 cos 2 nπ = n 2 π 2 4
Evaluating b n by Tabular Integration: Evaluating b n :
b n = ∫ 0 2 x 2 sin ( nπ x ) d x = [ − x 2 nπ cos nπ x + 2 x n 2 π 2 sin nπ x + 2 n 3 π 3 cos nπ x ] 0 2 = − nπ 4 cos 2 nπ = − nπ 4
Assembling the Series: Substituting the coefficients:
x 2 = 3 4 + n = 1 ∑ ∞ [ n 2 π 2 4 cos ( nπ x ) − nπ 4 sin ( nπ x ) ] = 3 4 + π 2 4 ( 1 2 cos π x + 2 2 cos 2 π x + 3 2 cos 3 π x + ⋯ ) − π 4 ( 1 sin π x + 2 sin 2 π x + 3 sin 3 π x + ⋯ )
Answer: 3 4 + π 2 4 ( 1 2 cos π x + 2 2 cos 2 π x + 3 2 cos 3 π x + ⋯ ) − π 4 ( 1 sin π x + 2 sin 2 π x + 3 sin 3 π x + ⋯ )
Past exam questions for Engineering Mathematics III
Padhaiko: a study app for BE Computer, Tribhuvan University. Works offline in the app.