Finding the Fourier series of a piecewise function (see description)

40 Views Asked by At

I'm struggling with this fouries series exercise. I'm pretty sure I get the wrong answer, but I don't know where I'm going wrong.

The task

Find the Fourier series of f(x), given that f(x) is a periodic function.

enter image description here

My attempt at solving the problem

Sketch:

enter image description here

This in an odd function with a period $T=3$.

$T=2L\ \Rightarrow L=\frac{3}{2}$

The formula for a Fourier series of an odd function:

$\sum_{n=1}^{\infty}b_n\cdot\sin{\left(\frac{n\pi x}{L}\right)}$

The formula for $b_n$:

$b_n=\frac{2}{L}\int_{0}^{L}{f\left(x\right)\cdot\sin{\left(\frac{n\pi x}{L}\right)}}dx$

$b_n=\frac{2}{\left(\frac{3}{2}\right)}\int_{0}^{\frac{3}{2}}{f\left(x\right)\cdot\sin{\left(\frac{n\pi x}{\left(\frac{3}{2}\right)}\right)}}dx=\frac{4}{3}\int_{0}^{1}{x\cdot\sin{\left(\frac{2n\pi x}{3}\right)}}dx+\frac{4}{3}\int_{1}^{\frac{3}{2}}{0\cdot\sin{\left(\frac{2n\pi x}{3}\right)}}dx=\frac{2}{3}$

Insert $b_n$ into the Fourier series formula:

$\frac{2}{3}\sum_{n=1}^{\infty}\sin{\left(\frac{2n\pi x}{3}\right)}$