I'm trying to calculate the Fourier series for:
$g(t) =$ t if $-\pi/2 ≤ t ≤ \pi/2 $
$g(t) =$ π - t if $ π/2 ≤ t ≤ 3π/2$
The function is odd, so its Fourier Series should contain only sin terms. However, if you consider $g(t)$ as the integral of square wave function ie. sq(t+π/2), where
$ sq(t) = -1$ if $-π ≤ t ≤ 0 $
$ sq(t) = 1$ if $ 0 ≤ t ≤ π $
The Fourier series would contain only cosine terms. How is this possible?
My guess is that I can't consider g(t) as the integral of sq(t+π/2) because we would have -t instead of π - t. I have two questions:
Why exactly can't I use this method?
Can I use sq(t) at all for this question?
I referred to this question and everything seems fine.
Note: If $f$ is defined on an interval $I$ then speaking literally it makes no sense to say that $f$ is odd or even unless $I$ is centered at the origin. Here when I say such a function is odd or even I mean that the $2\pi$-periodic extension of $f$ to $\Bbb R$ is odd or even.
Yes, $sq$ is odd. But the function $sq(t+\pi/2)$ is even.