Why am I allowed to set a fixed point in a fourier series? I'm working with $f(t)=\cos(at)$, for $a\in (0,1)$, on the interval $(-\pi,\pi)$.
I've calculated the fourier series on this interval. what I would want to do next is to fix $t=\pi$ and get a nice trigonometric identity.
My questions is why am I allowed to do it.
What I did:
I believe it has something with $f$ being absolutely continuous (which suggests that the series if uniformally convergence). But my problem is that $f$ is not quite defined on $t=\pi$.
What I thought to do next is extend $f$ to be preiodic and use the localization principle. But I didn't know how to quite do it.
Your help would be appreciated. Thanks!
Generally:
It doesn't metter if i'm working on $[-\pi,\pi]$ or $(-\pi,\pi)$, or does it?
P.S:
While I'm at understaing why elementary things work on fourier series, lemme ask this: why can I also integrate a fourier series (say the fourier series of the above function)
 A: Pointwise convergence of the Fourier series is an issue because changing $f$ at any given point (or even a countable number of points) does not change the Fourier Series. So pointwise convergence of the Fourier series has to be addressed carefully.
To consider the pointwise convergence, define $f$ to be anything at $t=\pi$ and extend $f$ from $(\pi,\pi]$ periodically to $\mathbb{R}$. The simplest classical result I know states that if $f$ is of bounded variation on $[a,b]\subset \mathbb{R}$, then the left and right limits, $f(x-0)$ and $f(x+0)$, exist for all $x \in (a,b)$ and the Fourier series converges pointwise for all $a < x < b$ to the mean of the left and right limits. If $f$ is of bounded variation and continuous on $[a,b]$, then the Fourier series converges uniformly on any closed interval $[a',b'] \subset (a,b)$.
Your function $f$ after being defined at $t=\pi$ to be $\cos(a\pi)$ is of bounded variation and continuous on $\mathbb{R}$. That's enough to guarantee that the Fourier series series for $f$ converges uniformly on every interval $[a,b]\subset\mathbb{R}$ and, hence, everywhere on $[-\pi,\pi]$. The uniform convergence is enough to allow you to integrate $f$ by integrating the Fourier series term by term.
Added: Because your $f$ has a continuous periodic extension $f_{e}$ to $\mathbb{R}$ (because $\cos(a\pi)=\cos(-a\pi)$,) and because $f$ is of bounded variation on every closed interval $[r,s]\subset\mathbb{R}$, then you can integrate the Fourier series term by term over an interval:
$$
          \int_{r}^{s}f_{e}(t)\,dt = \int_{r}^{s}\left[\frac{a_{0}}{2}+a_1\cos(t)+a_2\cos(2t)+a_3\cos(3t)+\cdots\right]\,dt \\
     = \frac{a_{0}}{2}(s-r)+a_1(\sin(s)-\sin(r))+\frac{a_2}{2}(\sin(2s)-\sin(2r))+\cdots
$$
It is important to note, however, that the integral on the left is of the periodic extension $f_{e}$ of $f$; there is another natural extension of $\cos(at)$ beyond $[-\pi,\pi]$, but that's not what you use on the left side once you get outside the interval $[-\pi,\pi]$. Note: To simplify the notation, I have eliminated the $\sin(nx)$ terms from the Fourier series, which is okay here because $\cos(at)$ is an even function on $[-\pi,\pi]$ and, so, the coefficients of the $\sin(nx)$ terms are $0$ anyway. It is okay to interchange infinite sum and the integral over $[r,s]$ because of the uniform convergence of the Fourier series on any interval $[r,s]$. But again, once $r$ or $s$ wanders outside $[-\pi,\pi]$, then you have to use the periodic extension of $\cos(at)$, and not the natural extension.
Rearranging the terms in this series would require considering absolute convergence of the final series, or further properties of the Fourier Series. However, for example, if you let $r=0$ and $s=x$, you do get
$$
          \int_{0}^{x}f_{e}(t)\,dt = \frac{a_{0}}{2}x+a_1\sin(x)+\frac{a_2}{2}\sin(2x)+\frac{a_3}{3}\sin(3x) + \cdots.
$$
The above holds for all $x \in \mathbb{R}$. But, keep in mind that the periodic extension $f_{e}$ of $f$ only equals $\cos(at)$ on $(-\pi,\pi)$, which is still enough to give you an identity such as
$$
          \frac{1}{a}\sin(ax)= \frac{a_{0}}{2}x+a_1\sin(x)+\frac{a_2}{2}\sin(2x)+\frac{a_3}{3}\sin(3x) + \cdots,\;\;\; -\pi \le x \le \pi.
$$
I think that's probably enough to answer the questions in you had in mind concerning the interval over which you integrate.
A: Since $f(t)=\cos(a t)$ is an even function, then the (full) Fourier series $F$ of $f$ on $(-\pi,\pi)$ will correspond to the even periodic extension of $f$, say $\tilde{f}(t)$ about $t=0$. Strictly speaking, if you leave $f$ undefined at $t=\pm \pi$, then the series will converge to $\tilde{f}$ which will have holes at $t=\pm\pi,\pm3\pi,\dots$ whereas if you define $f(t)=\cos(at)$ on $[-\pi,\pi]$ then those removable discontinuities in $\tilde{f}$ are "filled in". 
Either way, the Pointwise Convergence Theorem for Fourier series applies and this is the key result that allows you to evaluate the Fourier series point-wise (hence the name!) and get the numerical value of $F$ at $t=t_0$ from $f$ itself (as the average of the left and right hand limits of $f$ at $t_0$). In the latter case, you have $$F(\pi)=\tilde{f}(\pi)=f(\pi)=\cos(a\pi),$$ whereas in the former, $$F(\pi)=\lim_{t\to\pi^-}f(\pi)=\cos(a\pi).$$
You can integrate the series term by term since the underlying $f$ is continuous (in fact, piecewise continuity will do). Of course, you need much more to differentiate term-by-term.
