Fourier series - if it’s not an odd function, how does shifting affects my calculation?

574 Views Asked by At

The function $f(t)$ given in the graph for $-4 \le t < 4 $ enter image description here

this is the function of - $$f(t) = \begin{cases} -1, 0< t \le 1 \\ 0 , -1 < t \le 0 \end{cases} $$

I am told to determine the Fourier series for $f(t)$ and state the first three non-zero terms.

I assumed this function to be odd, however, read on to find out why I feel that I might be wrong.

Since $f(t)$ is odd , $a_0 = 0 , a_n = 0$

The period of the function- $-1$ to $1$

Therefore $L = 2/2 = 1$

since it’s odd, I used this formula-

$$b_n =\frac{1}{L} \int_{-L}^{L} {f(t) \sin {\frac{\pi n t}{L}} } dt $$

And I got $$b_n = \frac{1}{n\pi} (\cos (n\pi) -1)$$

I calculated $b_1$ to $b_5$ to determine the first 3 non zero terms.

$b_1 = \frac{-2}{\pi} $

$b_2, b_4= 0$

$b_3 = \frac{-2}{3\pi} $

$b_5 = \frac{-2}{5 \pi} $

Here’s a sample calculation:

$b_1 = \frac{1}{\pi} ( \cos (\pi) -1) = \frac{1}{\pi} (-1-1) = \frac{-2}{\pi}

Therefore $f(t) = \frac{-2}{\pi} \sin (\pi t) - \frac{2}{3 \pi} \sin (3\pi t) - \frac{2}{5\pi} \sin (5\pi t) ...... $

Now, after finding out that this function is an odd function as the ‘middle’ of an odd function needs to be $0$ , I performed a shift. - here’s a picture of it as I am not too sure on how to put it in words... enter image description here

Basically I performed a shift to make the original function to be centred at 0 by shifting up by $\frac{1}{2} $

Now, how would this affect my calculation for $b_n$ ? Would it affect it ?

For the $b_n$ value ? Must I subtract $\frac{1}{2} $ ? meaning the new value of $b_n$ is -

$$\frac{1}{n\pi} (\cos (n\pi) -1) - \frac{1}{2} $$ Which also means that from $b_1$ to $b_5$, my answer has to be all deducted by $\frac{1}{2} $ which means I will have no non zero terms from $b_1$ to $b_3$ . How would my $f(t)$ function change ?

Also, how do I plot the discrete amplitude spectrum of f(t) up to the third harmonic ?

Thanks..

1

There are 1 best solutions below

1
On

There is a lot out of order here.

The function is not odd, and the period is not $1$.

I suggest you start again from square one and compute the $a_n$ and $b_n$, using the formulas in your textbook.

Concerning shifts: Vertical shifts of $f$ only affect $a_0$. The effect of horizontal shifts on the Fourier coefficients is described by a simple formula, but this formula involves the so called complex Fourier coefficients $\ c_k$ $(k\in{\mathbb Z})$.