- #1
dinospamoni
- 92
- 0
Homework Statement
I'm trying to find a Fourier series for the piecewise function where f(x)=
[itex] 0 \in -\pi \leq x \leq 0 [/itex]
[itex] -1 \in 0 \leq x \leq \frac{\pi}{2} [/itex]
[itex] 1 \in \frac{\pi}{2} \leq x \leq \pi [/itex]
Homework Equations
[tex]a_{n} = \frac{1}{\pi} \int_{0}^{2\pi}\cos(nx)y(x)\,dx[/tex]
[tex]b_{n} = \frac{1}{\pi} \int_{0}^{2\pi}\sin(nx)y(x)\,dx[/tex]
The Attempt at a Solution
I found the pattern that every even a is 0, so that becomes
[tex]a_{m} = \sum_{m=1}^{\infty}\frac{(-1)^{m}2}{(2m-1)\pi}[/tex]
and the b coefficients are 0 when n is odd and 0 for every other even n, so that becomes
[tex]b_{m} = \sum_{m=1}^{\infty}\frac{-2}{\frac{4m-2}{2}\pi}[/tex]
however when I plot this, the plot between -pi and -pi/2 is switched with the plot between pi/2 and pi
I attached a picture for reference along with a plot of f(x)
Any ideas of where i went wrong?
Attachments
Last edited: