Fourier series coefficients for a piecewise periodic function

fourier series

I have the following question:

The non-zero Fourier series coefficients of the below function will contain:

graph of the question

The answer is: $a_0, b_n, n=1, 3, 5, \cdot \cdot \cdot$

So I first tried to find some symmetry like if it's even, odd, half wave symmetric but couldn't see any.

Then I tried to find $b_n$:
$$\int_{-1}^1 (x + 1) \sin\left(\frac{n \pi x}{4}\right) dx + \int_1^3 2 \left(\frac{n \pi x}{4}\right) dx + \int_3^5 (5 – x) \sin\left(\frac{n \pi x}{4}\right) dx $$

$$= -\frac{8 \left(\pi n \cos\left(\frac{n \pi}{4}\right) – 4 \sin\left(\frac{n \pi}{4}\right)\right)}{\pi^2 n^2} + \frac{8 \left(2 \sin\left(\frac{3n \pi}{4}\right) – 2 \sin\left(\frac{5n \pi}{4}\right) + \pi n \cos\left(\frac{3n \pi}{4}\right)\right)}{\pi^2 n^2} + \frac{16 \sin\left(\frac{n \pi}{4}\right) \sin\left(\frac{n \pi}{2}\right)}{\pi n}\tag{1}$$

The actual value is $\frac 18$ times the above result(but that doesn't matter right now) because:

$$b_n=\frac 18 \int_T x(t) \sin(nw_0t)dt$$

Here $w_0=\frac {2\pi}{T}$ and $T=8$, $T$ being the fundamental time period.

But again I am stuck. How can I prove that the above expression$(1)$ is zero for even $n$? Also if someone can show a solution with less calculation and more observation then it would be really helpful.

Best Answer

Well, the function jumps from $0$ to $2$ on the region $[-1,1]$, if you subtract 1 (and you found this constant 1 when you wrote $\int_{-1}^1(x+{\color{red}1})\sin (\dots) dx$) you end up with an odd function. Therefore the cosine part is all 0, except for the initial one which accounts for subtracting 1.

Also, after subtracting 1, the function satisfies $F(x+T/2) = -F(x)$. (probably what you called half-wave symmetric). This kills all the sine integrals when the sine "hits these two parts evenly"; i.e. every even term.

Conclusion: we have $a_0$ and $b_n$ for odd $n$.

Related Question