Fourier series of a function

  • Thread starter estro
  • Start date
  • #1
241
0
I'm trying to find Fourier series for the following function:
[tex]f(x) = \begin{cases}1, & \mbox{if x $\in (-\frac{\pi}{2}+2\pi n,\frac{\pi}{2}+2\pi n)$ } \\
-1, & \mbox{if x $\in [\frac{\pi}{2}+2\pi n,\frac{3\pi}{2} + 2\pi n]$} \end{cases}[/tex]

This is how I calculated a_n and b_n:
[Please See 2.pdf and 3.pdf]

So I got the following series: [tex] \sum_{n=1}^{\infty} \cos{nx}\frac{4(-1)^{n+1}}{\pi(2n-1)}[/tex]

But when I checked if it converges to f(x) at point \pi I get that it diverges, however all requirements of Fourier theorem are met.

What am I doing wrong?
 

Attachments

  • 2.pdf
    125.5 KB · Views: 120
  • 3.pdf
    119.6 KB · Views: 103

Answers and Replies

  • #2
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,559
770
I'm trying to find Fourier series for the following function:
[tex]f(x) = \begin{cases}1, & \mbox{if x $\in (-\frac{\pi}{2}+2\pi n,\frac{\pi}{2}+2\pi n)$ } \\
-1, & \mbox{if x $\in [\frac{\pi}{2}+2\pi n,\frac{3\pi}{2} + 2\pi n]$} \end{cases}[/tex]

This is how I calculated a_n and b_n:
[Please See 2.pdf and 3.pdf]

So I got the following series: [tex] \sum_{n=1}^{\infty} \cos{nx}\frac{4(-1)^{n+1}}{\pi(2n-1)}[/tex]

But when I checked if it converges to f(x) at point \pi I get that it diverges, however all requirements of Fourier theorem are met.

What am I doing wrong?

The cos(nx) term in the sum should be cos((2n-1)x) since you only pick up the odd subscripts. Otherwise it is correct. You could have saved half the work by noting that since the function is period 2pi, you could have used the formula on (-pi,pi) and observed the function is even. That's why the bn are 0. And using the half range integral for an would have made less work there too.
 
  • #3
241
0
Thanks, indeed it saved me a lot of work!
 

Related Threads on Fourier series of a function

Replies
8
Views
1K
Replies
12
Views
19K
  • Last Post
Replies
10
Views
10K
Replies
1
Views
620
Replies
2
Views
555
Replies
4
Views
2K
  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
3
Views
560
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
1K
Top