(i) To find a n a_n a n , we multiply both sides of the Fourier series expansion by cos ( m π x L ) \cos\left(\frac{m\pi x}{L}\right) cos ( L mπ x ) and integrate from − L -L − L to L L L , where m m m is an integer.
∫ − L L f ( x ) cos ( m π x L ) d x = ∫ − L L a 0 2 cos ( m π x L ) d x + ∫ − L L ∑ n = 1 ∞ ( a n cos ( n π x L ) + b n sin ( n π x L ) ) cos ( m π x L ) d x \int_{-L}^{L} f(x) \cos\left(\frac{m\pi x}{L}\right) dx = \int_{-L}^{L} \frac{a_0}{2} \cos\left(\frac{m\pi x}{L}\right) dx + \int_{-L}^{L} \sum_{n=1}^{\infty} \left(a_n \cos\left(\frac{n\pi x}{L}\right) + b_n \sin\left(\frac{n\pi x}{L}\right)\right) \cos\left(\frac{m\pi x}{L}\right) dx ∫ − L L f ( x ) cos ( L mπ x ) d x = ∫ − L L 2 a 0 cos ( L mπ x ) d x + ∫ − L L ∑ n = 1 ∞ ( a n cos ( L nπ x ) + b n sin ( L nπ x ) ) cos ( L mπ x ) d x
We can interchange the integral and summation because of convergence properties.
∫ − L L f ( x ) cos ( m π x L ) d x = a 0 2 ∫ − L L cos ( m π x L ) d x + ∑ n = 1 ∞ ( a n ∫ − L L cos ( n π x L ) cos ( m π x L ) d x + b n ∫ − L L sin ( n π x L ) cos ( m π x L ) d x ) \int_{-L}^{L} f(x) \cos\left(\frac{m\pi x}{L}\right) dx = \frac{a_0}{2} \int_{-L}^{L} \cos\left(\frac{m\pi x}{L}\right) dx + \sum_{n=1}^{\infty} \left(a_n \int_{-L}^{L} \cos\left(\frac{n\pi x}{L}\right) \cos\left(\frac{m\pi x}{L}\right) dx + b_n \int_{-L}^{L} \sin\left(\frac{n\pi x}{L}\right) \cos\left(\frac{m\pi x}{L}\right) dx\right) ∫ − L L f ( x ) cos ( L mπ x ) d x = 2 a 0 ∫ − L L cos ( L mπ x ) d x + ∑ n = 1 ∞ ( a n ∫ − L L cos ( L nπ x ) cos ( L mπ x ) d x + b n ∫ − L L sin ( L nπ x ) cos ( L mπ x ) d x )
We will now use the orthogonality properties of sine and cosine functions:
∫ − L L cos ( n π x L ) cos ( m π x L ) d x = { 0 , n ≠ m L , n = m ≠ 0 2 L , n = m = 0 \int_{-L}^{L} \cos\left(\frac{n\pi x}{L}\right) \cos\left(\frac{m\pi x}{L}\right) dx = \begin{cases} 0, & n \neq m \\ L, & n = m \neq 0 \\ 2L, & n = m = 0 \end{cases} ∫ − L L cos ( L nπ x ) cos ( L mπ x ) d x = ⎩ ⎨ ⎧ 0 , L , 2 L , n = m n = m = 0 n = m = 0 ∫ − L L sin ( n π x L ) cos ( m π x L ) d x = 0 \int_{-L}^{L} \sin\left(\frac{n\pi x}{L}\right) \cos\left(\frac{m\pi x}{L}\right) dx = 0 ∫ − L L sin ( L nπ x ) cos ( L mπ x ) d x = 0 for all n n n and m m m . ∫ − L L sin ( n π x L ) sin ( m π x L ) d x = { 0 , n ≠ m L , n = m ≠ 0 0 , n = m = 0 \int_{-L}^{L} \sin\left(\frac{n\pi x}{L}\right) \sin\left(\frac{m\pi x}{L}\right) dx = \begin{cases} 0, & n \neq m \\ L, & n = m \neq 0 \\ 0, & n = m = 0 \end{cases} ∫ − L L sin ( L nπ x ) sin ( L mπ x ) d x = ⎩ ⎨ ⎧ 0 , L , 0 , n = m n = m = 0 n = m = 0
The first term on the right-hand side is:
∫ − L L cos ( m π x L ) d x = 0 \int_{-L}^{L} \cos\left(\frac{m\pi x}{L}\right) dx = 0 ∫ − L L cos ( L mπ x ) d x = 0 for m ≠ 0 m \neq 0 m = 0 .
If m = 0 m=0 m = 0 , ∫ − L L a 0 2 cos ( 0 ) d x = a 0 2 ∫ − L L 1 d x = a 0 2 ( 2 L ) = a 0 L \int_{-L}^{L} \frac{a_0}{2} \cos(0) dx = \frac{a_0}{2} \int_{-L}^{L} 1 dx = \frac{a_0}{2} (2L) = a_0L ∫ − L L 2 a 0 cos ( 0 ) d x = 2 a 0 ∫ − L L 1 d x = 2 a 0 ( 2 L ) = a 0 L .
Since we are seeking a n a_n a n (where n ≠ 0 n \neq 0 n = 0 ), we have: ∫ − L L f ( x ) cos ( n π x L ) d x = a n ∫ − L L cos 2 ( n π x L ) d x = a n L \int_{-L}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) dx = a_n \int_{-L}^{L} \cos^2\left(\frac{n\pi x}{L}\right) dx = a_n L ∫ − L L f ( x ) cos ( L nπ x ) d x = a n ∫ − L L cos 2 ( L nπ x ) d x = a n L a n = 1 L ∫ − L L f ( x ) cos ( n π x L ) d x a_n = \frac{1}{L} \int_{-L}^{L} f(x) \cos\left(\frac{n\pi x}{L}\right) dx a n = L 1 ∫ − L L f ( x ) cos ( L nπ x ) d x
(ii) To find b n b_n b n , we multiply both sides of the Fourier series expansion by sin ( m π x L ) \sin\left(\frac{m\pi x}{L}\right) sin ( L mπ x ) and integrate from − L -L − L to L L L , where m m m is an integer.
∫ − L L f ( x ) sin ( m π x L ) d x = ∫ − L L a 0 2 sin ( m π x L ) d x + ∫ − L L ∑ n = 1 ∞ ( a n cos ( n π x L ) + b n sin ( n π x L ) ) sin ( m π x L ) d x \int_{-L}^{L} f(x) \sin\left(\frac{m\pi x}{L}\right) dx = \int_{-L}^{L} \frac{a_0}{2} \sin\left(\frac{m\pi x}{L}\right) dx + \int_{-L}^{L} \sum_{n=1}^{\infty} \left(a_n \cos\left(\frac{n\pi x}{L}\right) + b_n \sin\left(\frac{n\pi x}{L}\right)\right) \sin\left(\frac{m\pi x}{L}\right) dx ∫ − L L f ( x ) sin ( L mπ x ) d x = ∫ − L L 2 a 0 sin ( L mπ x ) d x + ∫ − L L ∑ n = 1 ∞ ( a n cos ( L nπ x ) + b n sin ( L nπ x ) ) sin ( L mπ x ) d x
∫ − L L f ( x ) sin ( m π x L ) d x = a 0 2 ∫ − L L sin ( m π x L ) d x + ∑ n = 1 ∞ ( a n ∫ − L L cos ( n π x L ) sin ( m π x L ) d x + b n ∫ − L L sin ( n π x L ) sin ( m π x L ) d x ) \int_{-L}^{L} f(x) \sin\left(\frac{m\pi x}{L}\right) dx = \frac{a_0}{2} \int_{-L}^{L} \sin\left(\frac{m\pi x}{L}\right) dx + \sum_{n=1}^{\infty} \left(a_n \int_{-L}^{L} \cos\left(\frac{n\pi x}{L}\right) \sin\left(\frac{m\pi x}{L}\right) dx + b_n \int_{-L}^{L} \sin\left(\frac{n\pi x}{L}\right) \sin\left(\frac{m\pi x}{L}\right) dx\right) ∫ − L L f ( x ) sin ( L mπ x ) d x = 2 a 0 ∫ − L L sin ( L mπ x ) d x + ∑ n = 1 ∞ ( a n ∫ − L L cos ( L nπ x ) sin ( L mπ x ) d x + b n ∫ − L L sin ( L nπ x ) sin ( L mπ x ) d x )
∫ − L L sin ( m π x L ) d x = 0 \int_{-L}^{L} \sin\left(\frac{m\pi x}{L}\right) dx = 0 ∫ − L L sin ( L mπ x ) d x = 0 for all m m m . Thus, ∫ − L L a 0 2 sin ( m π x L ) d x = 0 \int_{-L}^{L} \frac{a_0}{2} \sin\left(\frac{m\pi x}{L}\right) dx = 0 ∫ − L L 2 a 0 sin ( L mπ x ) d x = 0
Using orthogonality properties, we get:
∫ − L L f ( x ) sin ( n π x L ) d x = b n ∫ − L L sin 2 ( n π x L ) d x = b n L \int_{-L}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) dx = b_n \int_{-L}^{L} \sin^2\left(\frac{n\pi x}{L}\right) dx = b_n L ∫ − L L f ( x ) sin ( L nπ x ) d x = b n ∫ − L L sin 2 ( L nπ x ) d x = b n L
Therefore,
b n = 1 L ∫ − L L f ( x ) sin ( n π x L ) d x b_n = \frac{1}{L} \int_{-L}^{L} f(x) \sin\left(\frac{n\pi x}{L}\right) dx b n = L 1 ∫ − L L f ( x ) sin ( L nπ x ) d x