Consider the periodic and hybrid function defined as $$f(t)=x, 0\le x \le 1$$ and $$f(t)=1$$ $$1\le x\le 2$$
Attempt:
I need to calculate Cn $$C_n=\frac{1}{2}\int_0^1 xe^{-in\pi x}dx+\frac{1}{2}\int_1 ^2 1.e^{-in\pi x}dx$$ After evaluating this integral I get $$C_n=\frac{2+in\pi}{2n^2 \pi^2}, n:odd$$
$$C_n=\frac{i}{8n\pi}, n:even$$
I'm confused now because I was expecting Cn to be purely imaginary because the function is odd...but what I have here is Cn containining real and imaginary numbers when n is odd
Can someone please validate my work? Thank you

