Skip to main content
Home
A key to conquer the (open source) world.

Main navigation

  • Home
  • About Us
    • About this website
    • About_me
    • Family rivalry
  • Gurus
  • Tutorials
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Tutorials

🌊 3. Fourier Series for Functions with Period 2π

Hero image for keyhole tutorials.

Learn how to compute Fourier series for functions with period 2π. This step-by-step tutorial explains coefficient formulas, orthogonality, the role of The average Fourier constant \( \frac{a_0}{2} \) and convergence using clear visuals and intuition.

Fourier series explained main picture.
Note: References (2.2.x) are explained in 📐 2. Fourier Series General Concepts.

⚙️ 3.1 Formal treatment — computing the coefficients

Suppose the function \( f(x) \), with period \( 2\pi \), is represented by the series

\[f(x)=\frac{a_{0}}{2}+\sum_{n=1}^{\infty }(a_{n}\cos(nx)+b_{n}\sin(nx))\quad(3.1.1 )\]

Then the coefficients can formally be determined as follows.

• 📏 \( a_{0} \) Finding the constant term \( a_{0} \)

If we integrate both sides of (3.1.1) over one period \( 2\pi \), and assume that the integral \( \int_{}^{} \) and the sum \( \sum_{}^{} \) may be interchanged, we obtain

\[ \int_{-\pi}^{\pi}f(x)dx=\frac{a_{0}}{2}
\underbrace{
\int_{-\pi}^{\pi}dx}_{=2\pi\text{ (Hint 1)}}
+\sum_{n=1}^{\infty }\left[ a_{n}
\underbrace{
\int_{-\pi}^{\pi}\cos(nx)dx}_\text{= 0     (See Hint 2)}
+b_{n}
\underbrace{
\int_{-\pi}^{\pi}\sin(nx)dx}_{\substack{\text{= 0   odd integrand}\\\text{over symmetric limits}}}
\right] \]

Hint 1: \( \int_{-\pi}^{\pi}1dx= (\pi - (-\pi))=2\pi \)

Hint 2:

  • Positive and negative parts cancel over a full period. \( \int_{-\pi}^{\pi}\cos(kx)\,dx = 0 \quad (k \ne 0) \)

As a result: \[ a_{0}=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)dx\quad(3.1.2 ) \]

• ✖️ ∫ cos Finding the Cosine Coefficients

If we multiply both sides of (3.1.1) by \( \cos(mx) \) and then integrate both sides over one period \( 2\pi \), assuming again that \( \int_{}^{} \) and \(\sum_{}^{} \) may be interchanged, we obtain

\[ \int_{-\pi}^{\pi}f(x)cos(mx)dx =\frac{a_{0}}{2}
\underbrace{
\int_{-\pi}^{\pi}\cos(mx)dx}_{\text{=0  (See Hint 2)}}
+\sum_{n=1}^{\infty }\left[ a_{n}
\underbrace{
\int_{-\pi}^{\pi}\cos(nx)\cos(mx)dx}_{\substack{
(2.2.3) \quad
\begin{cases}
0 & n \neq m \\
\pi & n=m>0 \\
2\pi & n=m=0
\end{cases}}
}
+b_{n}
\underbrace{
\int_{-\pi}^{\pi} \sin(nx)\cos(mx)dx }_\text{= 0     (2.2.1)}
\right] \]

On the right-hand side only the second term remains. For this term the condition \( (n=m=0) \) is not possible because the summation starts at \( (n=1) \). During the summation all terms with \( (n \neq m) \) are 0 and disappear. The only remaining term is \( (n = m \gt 0) \).

Therefore we obtain

\[ a_{m}=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(mx)dx\quad(3.1.3 ) \]

• ✖️ ∫ sin Finding the Sine Coefficients

 

 

Categories
Open source News
Science
Thu, 04/23/2026 - 15:15

Managed ad1

RSS feed
Powered by Drupal