Calculating fourier series coefficients

712 Views Asked by At

So I just learnt the topic on fourier series and need a bi of help. I know when you calculate the fourier series of a function, you have to find the coefficients Ao, An and Bn and I am familiar on this. But I noticed that if the function is odd, you can straightaway say Ao=An=0 and if the function is even, Bn=0. With reference to the picture below, is there anyway to know if this function is even/odd? To save time from deriving the coefficients? Any help is appreciated thanks

Question

1

There are 1 best solutions below

0
On

This function is neither even nor odd! But if you subtract the mean, which is essentially the term with $A_0$, then you are left with an odd function.

Your Fourier series should then be

$$f(t) \sim \frac{1}{2} + \sum_n b_n \sin n \pi t $$

$$ b_n = \int_{-1}^{1} f(t) \sin n \pi t \, dt = \left\{ \begin{array} c \frac{2}{n \pi} , & n \text{ odd}\\ 0, & n\text{ even} \end{array} \right. $$

$$ f(t) \sim \frac{1}{2} + \sum_{k=1}^\infty \frac{2}{(2k-1)\pi} \sin \,(2k-1) \pi t$$

UPDATE

By convention, the Fourier series is written as:

$$f(t) \sim \frac{a_0}{2} + \sum_{n=1}^\infty a_n \cos n \pi t + \sum_{n=1}^\infty b_n \sin n \pi t $$

The coefficients can also be computed explicitly: \begin{aligned} a_0 &= \int_{-1}^{1} f(t) \, dt =1\\ a_n &= \int_{-1}^{1} f(t) \cos n \pi t \, dt=0\\ b_n &= \int_{-1}^{1} f(t) \sin n \pi t \, dt= \left\{ \begin{array} c \frac{2}{n \pi} , & n \text{ odd}\\ 0, & n\text{ even} \end{array} \right. \end{aligned}

This is consistent with the above "quick" analysis.