Find Fourier Series for Piecewise Function

  • Context: MHB 
  • Thread starter Thread starter Dustinsfl
  • Start date Start date
  • Tags Tags
    Fourier
Click For Summary

Discussion Overview

The discussion revolves around finding the Fourier series for a piecewise function defined on the interval from \(-\pi\) to \(\pi\). Participants explore the calculation of Fourier coefficients \(a_0\), \(a_n\), and \(b_n\), and the resulting series representation of the function. The conversation includes technical reasoning and verification of results.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • Post 1 presents the Fourier series calculation, asserting that \(a_0 = \pi\), \(a_n = 0\), and \(b_n\) takes specific values depending on whether \(n\) is odd or even.
  • Post 2 reiterates the calculation of \(b_n\) and suggests a different approach to the integral, claiming that \(g(\theta) = \theta \sin n\theta\) is an even function, leading to a modified expression for \(b_n\).
  • Post 3 proposes a Fourier series representation that differs from Post 1, stating it as \(\frac{\pi}{2} - 2\sum_{n = 1}^{\infty}\frac{1}{2n}\sin(2n)\theta\).
  • Post 4 agrees with the series presented in Post 3 and suggests using a graphing application to verify the formula's accuracy.

Areas of Agreement / Disagreement

There is no consensus on the correct form of the Fourier series, as participants present differing expressions for \(b_n\) and the resulting series. The discussion remains unresolved regarding the accuracy of the calculations and the final series representation.

Contextual Notes

Participants do not fully resolve the implications of the even function property on the calculation of \(b_n\), and there are discrepancies in the final series forms presented.

Dustinsfl
Messages
2,217
Reaction score
5
Find the Fourier series for
$$
f(\theta) = \begin{cases}
\theta, & 0\leq \theta \leq\pi\\
\pi + \theta, & -\pi\leq \theta < 0
\end{cases}.
$$

$$
a_0 = \frac{1}{\pi}\int_0^{\pi}\theta d\theta + \frac{1}{\pi}\int_{-\pi}^0\theta d\theta + \int_{-\pi}^0 d\theta
$$
The first and second integral together are 0 so the $a_0 = \pi$
$$
a_n = \frac{1}{\pi}\int_0^{\pi}\theta\cos n\theta d\theta + \frac{1}{\pi}\int_{-\pi}^0\theta\cos n\theta d\theta + \int_{-\pi}^0 \cos n\theta d\theta
$$
The first and second integral together are 0 so the $a_n = 0$
$$
b_n = \frac{1}{\pi}\int_0^{\pi}\theta\sin n\theta d\theta + \frac{1}{\pi}\int_{-\pi}^0\theta\sin n\theta d\theta + \int_{-\pi}^0\sin n\theta d\theta
$$
The first and second integral together are 0 so the $b_n = \begin{cases}\frac{-2}{n}, & \text{if n is odd}\\0, & \text{if n is even}\end{cases}$

So
$$
\frac{\pi}{2} - 2\sum_{n = 1}^{\infty}\frac{1}{2n-1}\sin(2n - 1)\theta
$$

Correct?
 
Physics news on Phys.org
dwsmith said:
$$
b_n = \frac{1}{\pi}\int_0^{\pi}\theta\sin n\theta d\theta + \frac{1}{\pi}\int_{-\pi}^0\theta\sin n\theta d\theta + \int_{-\pi}^0\sin n\theta d\theta
$$
The first and second integral together are 0 so the $b_n = \begin{cases}\frac{-2}{n}, & \text{if n is odd}\\0, & \text{if n is even}\end{cases}$

So
$$
\frac{\pi}{2} - 2\sum_{n = 1}^{\infty}\frac{1}{2n-1}\sin(2n - 1)\theta
$$

Correct?

Hi dwsmith, :)

I think you have made a little error. As you can see \(g(\theta)=\theta\sin n\theta=g(-\theta)\). Therefore \(g\) is an even function. Hence,

\[b_n = \frac{1}{\pi}\int_0^{\pi}\theta\sin n\theta d\theta + \frac{1}{\pi}\int_{-\pi}^0\theta\sin n\theta d\theta + \int_{-\pi}^0\sin n\theta d\theta= \frac{2}{\pi}\int_0^{\pi}\theta\sin n\theta d\theta + \int_{-\pi}^0\sin n\theta d\theta\]

Kind Regards,
Sudharaka.
 
So the Fourier series is
$$
\frac{\pi}{2} - 2\sum_{n = 1}^{\infty}\frac{1}{2n}\sin(2n)\theta.
$$
 
dwsmith said:
So the Fourier series is
$$
\frac{\pi}{2} - 2\sum_{n = 1}^{\infty}\frac{1}{2n}\sin(2n)\theta.
$$
Correct! You can check that this formula works by using the excellent Desmos graphing application that now comes for free with MathHelpBoards. See the graph below. In fact, click on the graph and you will see the formula used to generate it. Use the slider to see the sum of up to 20 terms of this Fourier series, and notice how it converges to the midpoint of each jump in the graph.

[graph]ymrd1ovgce[/graph]
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 29 ·
Replies
29
Views
5K