broegger
- 257
- 0
Hi!
I have to calculate the Fourier coefficients c_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)e^{-inx}dx and the Fourier series for the following function:
<br /> f(x)=<br /> \begin{cases}<br /> \frac{2}{\pi}x + 2 & \text{for } x\in \left[-\pi,-\pi/2\right]\\<br /> -\frac{2}{\pi}x & \text{for } x\in \left[-\pi/2,\pi/2\right]\\<br /> \frac{2}{\pi}x - 2 & \text{for } x\in \left[\pi/2,\pi\right]<br /> \end{cases} <br />
Since this function is odd the Fourier series should only contain \sin{x} (right?), but I keep getting a series containing both sine and cosine. Furthermore I'm having big trouble with the integrals; are there any "tricks" when doing such integrals?
I have to calculate the Fourier coefficients c_n = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(x)e^{-inx}dx and the Fourier series for the following function:
<br /> f(x)=<br /> \begin{cases}<br /> \frac{2}{\pi}x + 2 & \text{for } x\in \left[-\pi,-\pi/2\right]\\<br /> -\frac{2}{\pi}x & \text{for } x\in \left[-\pi/2,\pi/2\right]\\<br /> \frac{2}{\pi}x - 2 & \text{for } x\in \left[\pi/2,\pi\right]<br /> \end{cases} <br />
Since this function is odd the Fourier series should only contain \sin{x} (right?), but I keep getting a series containing both sine and cosine. Furthermore I'm having big trouble with the integrals; are there any "tricks" when doing such integrals?