PAGE 1

9.3 Fourier Cosine and Sine Series

Last time: \( f(t) \) period \( 2L \)

\[ f(t) \sim \frac{1}{2} a_0 + \sum_{n=1}^{\infty} \left[ a_n \cos\left(\frac{n \pi t}{L}\right) + b_n \sin\left(\frac{n \pi t}{L}\right) \right] \]
\[ a_n = \frac{1}{L} \int_{0}^{2L} f(t) \cos\left(\frac{n \pi t}{L}\right) dt \]
\[ b_n = \frac{1}{L} \int_{0}^{2L} f(t) \sin\left(\frac{n \pi t}{L}\right) dt \]
Note: The integration can be over any interval with length \( 2L \).

We've seen many examples of purely cosine or sine terms in the series.

Why?

A function \( f(t) \) is even if \( f(-t) = f(t) \).

For example: \( t^2, t^4, t^6, \cos(t) \)

→ have vertical axis symmetry

PAGE 2

Even and Odd Functions

A graph of the even function  f(t) = t^2 . It shows a parabola symmetric about the vertical  f(t)  axis. Points at  t_0  and  -t_0  are marked, both having the same vertical value of  t_0^2 , connected by a horizontal dashed line.

Graph of \( f(t) = t^2 \)

A graph of the even function  f(t) = \cos(t) . The curve is symmetric about the vertical  f(t)  axis. Points at  t_0  and  -t_0  are marked with the same vertical value,  \cos(t_0) , connected by a horizontal dashed line.

Graph of \( f(t) = \cos(t) \)

Odd Functions

A function \( f(t) \) is odd if \( f(-t) = -f(t) \).

Examples of odd functions:

\( t, t^3, t^5, \sin(t) \)

These have origin symmetry.

A graph of the odd function  f(t) = t^3 . The curve passes through the origin and shows rotational symmetry. A point at  (t_0, t_0^3)  is connected by a dashed line through the origin to a point at  (-t_0, -t_0^3) .

Graph of \( f(t) = t^3 \)

A graph of the odd function  f(t) = \sin(t) . The wave-like curve passes through the origin and is symmetric with respect to the origin, meaning a 180-degree rotation maps the graph onto itself.

Graph of \( f(t) = \sin(t) \)

Properties of Products

  • Product of two even functions is even
  • Product of two odd functions is even
  • Product of one odd and one even is odd
PAGE 3

Fourier Series Coefficients: Symmetry Properties

Revisit the formula for the Fourier coefficient \( a_n \):

\[ a_n = \frac{1}{L} \int_{-L}^{L} f(t) \cos\left(\frac{n\pi t}{L}\right) dt \]

Note: The term \( \cos\left(\frac{n\pi t}{L}\right) \) is an even function.

Case 1: Even Functions

If \( f(t) \) is even, then the product \( f(t) \cos\left(\frac{n\pi t}{L}\right) \) is even. This implies vertical axis symmetry.

A Cartesian coordinate system showing a graph of  f(t) \cos\left(\frac{n\pi t}{L}\right) . The curve is symmetric about the vertical axis (even symmetry). The area under the curve is shaded between  -L  and  L , illustrating that the total area is twice the area from  0  to  L .
Figure 1: Symmetry of an even function product.

Due to symmetry, the integral can be simplified:

\[ a_n = \frac{2}{L} \int_{0}^{L} f(t) \cos\left(\frac{n\pi t}{L}\right) dt \]

Case 2: Odd Functions

If \( f(t) \) is even, then the product \( f(t) \sin\left(\frac{n\pi t}{L}\right) \) is odd. This implies origin symmetry.

A Cartesian coordinate system showing a graph of  f(t) \sin\left(\frac{n\pi t}{L}\right) . The curve passes through the origin and exhibits origin symmetry (odd symmetry). The area from  -L  to  0  is below the horizontal axis, while the area from  0  to  L  is above it, demonstrating that the net area is zero.
Figure 2: Symmetry of an odd function product.

For the sine coefficient \( b_n \):

\[ b_n = 0 \]

(The net area is zero)

PAGE 4

Fourier Series for Even and Odd Functions

If \( f(t) \) is even w/ period \( 2L \)

\( b_n = 0 \) for all \( n \)

\[ a_n = \frac{2}{L} \int_{0}^{L} f(t) \cos\left(\frac{n\pi t}{L}\right) dt \]

\[ f(t) \sim \frac{1}{2} a_0 + \sum_{n=1}^{\infty} a_n \cos\left(\frac{n\pi t}{L}\right) \]

Fourier cosine series

Repeating the analysis on the last page w/ odd \( f(t) \), we see

If \( f(t) \) is odd w/ period \( 2L \)

\( a_n = 0 \) for all \( n \)

\[ b_n = \frac{2}{L} \int_{0}^{L} f(t) \sin\left(\frac{n\pi t}{L}\right) dt \]

\[ f(t) \sim \sum_{n=1}^{\infty} b_n \sin\left(\frac{n\pi t}{L}\right) \]

Fourier sine series

PAGE 5

Compact Function Specification via Extensions

We can now specify a function in a more compact way: give \( f(t) \) on half a period, then state whether to add even or odd extensions to complete.

Example

For example,

\[ f(t) = \begin{cases} t & 0 < t < 2 \\ 1 & 2 < t < 3 \end{cases} \quad \text{period } \underline{6} \]

With Even Extensions

w/ even extensions:

A graph on a Cartesian coordinate system showing the even extension of a piecewise function  f(t) . The original segment from  t=0  to  t=3  is reflected across the vertical axis to the interval  t=-3  to  t=0 , creating a symmetric 'V' shape at the origin that continues periodically. This symmetry results in a Fourier cosine series.

results in a cosine series

With Odd Extensions

w/ odd extensions:

A graph on a Cartesian coordinate system showing the odd extension of a piecewise function  f(t) . The original segment from  t=0  to  t=3  is reflected through the origin to the interval  t=-3  to  t=0 , creating an anti-symmetric shape. This rotational symmetry results in a Fourier sine series.

results in a sine series

PAGE 6

let's write out the series for the 2nd case

odd, so \( a_n = 0 \) for all \( n \)

\[ b_n = \frac{2}{3} \int_{0}^{3} f(t) \sin\left(\frac{n \pi t}{3}\right) dt \]
\[ = \dots \]
\[ = \frac{6 \sin\left(\frac{2n\pi}{3}\right) - 4n\pi \cos\left(\frac{2n\pi}{3}\right)}{n^2 \pi^2} + \frac{2 \cos\left(\frac{2n\pi}{3}\right) - 2 \cos(n\pi)}{n\pi} \]
\[ f(t) \sim \left( \frac{3\sqrt{3}}{\pi^2} + \frac{3}{\pi} \right) \sin\left(\frac{\pi t}{3}\right) + \left( \frac{-3\sqrt{3}}{4\pi^2} - \frac{1}{\pi} \right) \sin\left(\frac{2\pi t}{3}\right) + \dots \]

New Example

let's try another one: \( f(t) = \sin(t) \) for \( 0 < t < \pi \), period \( 2\pi \) w/ even extensions

Cosine series

A graph of the even extension of the sine function. The horizontal axis is labeled t and the vertical axis is labeled f(t). The function f(t) = sin(t) is shown as a solid green curve on the interval [0, pi]. Its even extension is shown as a solid red curve on the interval [-pi, 0]. Periodic repetitions are shown as dashed curves in red and green across the t-axis, creating a series of arches similar to a rectified sine wave.
Graph of the even extension of \( f(t) = \sin(t) \) over multiple periods.
PAGE 7

even so \( b_n = 0 \) for all \( n \)

\[ a_0 = \frac{2}{\pi} \int_{0}^{\pi} \sin(t) \, dt = \frac{4}{\pi} \]
\[ a_n = \frac{2}{\pi} \int_{0}^{\pi} \sin(t) \cos(nt) \, dt \]
\[ = \dots = \frac{2 \left[ (-1)^n + 1 \right]}{\pi (1 - n^2)} = \begin{cases} 0 & \text{if } n \text{ is odd} \\ \frac{4}{\pi (1 - n^2)} & \text{if } n \text{ is even} \end{cases} \]
\[ \sin(t) \sim \frac{2}{\pi} - \frac{4}{3\pi} \cos(2t) - \frac{4}{15\pi} \cos(4t) - \frac{4}{35\pi} \cos(6t) - \dots \]
PAGE 8

Fourier Series Approximation of Piecewise Odd Extension (Period=6)

The following graph illustrates the Fourier series approximation of a piecewise odd periodic function with a period of \( T = 6 \). The visualization demonstrates how increasing the number of terms \( N \) in the partial sum improves the accuracy of the approximation, particularly highlighting the Gibbs phenomenon at points of discontinuity.

A graph showing the Fourier series approximation of a piecewise odd function with period  T = 6 . The x-axis represents time  t  ranging from -6 to 6, and the y-axis represents  f(t)  from -2 to 2. The true periodic function is shown as a dashed gray line. Four partial sum approximations are plotted:  N = 1  (blue),  N = 5  (orange),  N = 20  (green), and  N = 100  (red). The higher the value of  N , the closer the approximation follows the true function, though sharp oscillations (Gibbs phenomenon) remain visible at the jump discontinuities.
Figure 1: Comparison of Fourier partial sums \( S_N(t) \) for \( N = 1, 5, 20, 100 \) against the true periodic function.

Key Observations:

  • As \( N \) increases, the approximation becomes more accurate in the continuous regions of the function.
  • At the points of discontinuity (e.g., \( t = -4, -3, -2, 2, 3, 4 \)), the Fourier series exhibits persistent overshoots, a characteristic of the Gibbs phenomenon.
  • The function is odd, meaning \( f(t) = -f(-t) \), which is reflected in the symmetry of the graph about the origin.
PAGE 9

Fourier Series: Even Extension of \(\sin(t)\) (Period = \(2\pi\))

A line graph showing the Fourier series approximations of the even extension of the sine function, which is the absolute value of sine, |\sin(t)|. The x-axis represents time t from -2\pi to 2\pi, and the y-axis represents f(t) from 0.0 to 1.0. A dashed gray line shows the target function |\sin(t)|, which consists of periodic positive arches. Several colored curves represent Fourier approximations for different values of N: a flat orange line for N=0 and N=1 at approximately 0.64, a green curve for N=2 that oscillates around the target, and a red curve for N=5 which closely follows the shape of the absolute sine arches.
Figure 1: Comparison of Fourier series approximations for the even extension \(|\sin(t)|\) with varying numbers of terms \(N\).

The graph above illustrates the convergence of the Fourier series for the even extension of a sine wave, which is mathematically equivalent to the rectified sine function \(f(t) = |\sin(t)|\). Because the function is even, its Fourier series consists only of cosine terms and a constant offset.

Key Observations:

  • Target Function: The dashed gray line represents the even extension \(|\sin(t)|\).
  • \(N = 0, 1\): The orange line represents the DC component (average value), which is approximately \(\frac{2}{\pi} \approx 0.637\).
  • \(N = 2\): The green curve begins to capture the periodic nature but has significant overshoot and undershoot.
  • \(N = 5\): The red curve shows much higher fidelity to the original function, demonstrating how increasing the number of harmonic terms improves the approximation.