MHB Help with Fourier series mistake

Click For Summary
The discussion revolves around the calculation of Fourier series coefficients for the function defined piecewise as $f(x) = -x$ on $[-\pi, 0]$ and $f(x) = x$ on $[0, \pi]$. The user correctly computes $a_0$ and $a_n$, but encounters an issue with $b_n$, initially believing it should equal zero. Upon evaluating the integral for $b_n$, they mistakenly attempt to combine the two parts, leading to a non-zero result. A fellow participant points out the error in doubling the integral, clarifying that both parts are necessary for cancellation. The user acknowledges the correction, resolving the confusion.
ognik
Messages
626
Reaction score
2
Hi - frustratingly I get some problems right 1st time, others just defy me (Headbang)

$f(x) = -x, [-\pi,0]; = x, [0,\pi]$

I get $a_0 = \pi$ and $a_n = \frac{-4}{\pi \left(2n-1\right)^2}$ which agrees with the book - but I thought I'd check $b_n$ for practice, it should = 0 according to the book, but I got:
$ \frac{1}{\pi} \left[ \int_{-\pi}^{0}-x Sinnx \,dx + \int_{0}^{\pi}x Sin nx \,dx \right] $
$= \frac{2}{\pi}\int_{0}^{\pi}x Sin nx \,dx $
$ = \frac{2}{\pi}\left[ \frac{x}{n}\left(-Cosnx\right) \right]^{\pi}_0 + 0 \ne 0$?
 
Physics news on Phys.org
I believe your second step is faulty - you can't just double the integral because they can't be combined. I think you need both parts so they somehow cancel each other.
 
Last edited:
...and so they do, thanks
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K