MHB Find Fourier Series for Piecewise Function

  • Thread starter Thread starter Dustinsfl
  • Start date Start date
  • Tags Tags
    Fourier
Click For Summary
The discussion focuses on finding the Fourier series for a piecewise function defined on the interval from -π to π. The calculations for the coefficients reveal that \( a_0 = \pi \), \( a_n = 0 \), and \( b_n \) is non-zero only for odd \( n \), specifically \( b_n = \frac{-2}{n} \) for odd \( n \) and \( 0 \) for even \( n \). The resulting Fourier series is expressed as \( \frac{\pi}{2} - 2\sum_{n = 1}^{\infty}\frac{1}{2n}\sin(2n)\theta \). The accuracy of the formula can be verified using graphing tools like Desmos, which visually demonstrates the convergence of the series.
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]
 
We all know the definition of n-dimensional topological manifold uses open sets and homeomorphisms onto the image as open set in ##\mathbb R^n##. It should be possible to reformulate the definition of n-dimensional topological manifold using closed sets on the manifold's topology and on ##\mathbb R^n## ? I'm positive for this. Perhaps the definition of smooth manifold would be problematic, though.

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
4K