Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I want to find the Fourier series of $f(x)$ defined by $f(x)=\begin{cases} 1 , -L\le x<0\\ 0, 0\le x<L. \end{cases} $

Well, to find $a_0$ I do this integral: $$a_0=1/L \int _{-L}^0 dx +1/L \int _0^L0 \, dx=1.$$

Calculating the others:

$a_n=0$.

$$b_n=1/L \int _{-L}^0 \sin\frac{\pi n x }L \, dx=-\frac{1}{\pi n}(1-\cos(\pi n))=-\frac{1}{\pi n}(1-(-1)^n)).$$

Now the answer in the book is this:

$$f(x)=\frac{1}{2}-\frac{2}{\pi}\sum_{n=0}^\infty \frac{\sin{[(2n-1)\frac{\pi n}{L}]}}{2n-1}$$

Why my $a_0$ is wrong? And what about the $\cos (\pi n)$ term? Thank you very much for your help!

share|improve this question
2  
I prefer the complex form as it avoids this silly ${1 \over 2}$ business with $a_0$. –  copper.hat Aug 17 at 19:28
1  
For the $\cos(\pi n)$ term, compare what happens when $n$ is even versus odd. –  Semiclassical Aug 17 at 19:50

1 Answer 1

Note that

$$a_0 = \frac{1}{2L}\int_{-L}^{L} \dots$$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.