Basic Fourier Series properties question.e.5 On the interval $[-\pi,\pi]$ consider the function, $$ f(\theta) = \begin{cases}
0 & \texttt{if $|\theta|>\delta$}, \\
1-\frac{|\theta|}{\delta} & \texttt{if$|\theta| \le \delta$.}
\end{cases} $$
Show that $$f(\theta) = \frac{\delta}{2\pi} + 2 \sum_{n=1}^{\infty}\frac{1 - \cos n\delta}{n^{2}\pi \delta} \cos n\theta.$$
I know that I will use the following definition of the Fourier Series,$$f(\theta) = \sum_{n = -\infty}^{\infty} \hat{f}(n) e^{in\theta}$$
where the Fourier Coefficient is given by,$$\hat{f}(n) = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(\theta) e^{-in\theta} d\theta,$$
And I wrote the detailed definition of the function as follows:$$ f(\theta) = \begin{cases}
0 & \texttt{if $\theta<-\delta \ and \ \theta>\delta $}, \\
1-\frac{\theta}{\delta} & \texttt{if$-\delta \le \theta \le \delta$  and $\theta$  is +ve.},\\
1+\frac{\theta}{\delta} & \texttt{if$-\delta \le \theta \le \delta$  and $\theta$  is -ve..}
\end{cases}. $$
I am not sure if this detailed definition is right? And if there is a simpler one? I do not know exactly How to divide the interval of integration while calculating $\hat{f}(n)$? What is the relation between $\delta$ and the interval $[-\pi , \pi]?$ Is $\delta$ a very small positive quantity inside the interval as we know?
Could anyone tackle this with me?
thanks. 
 A: You could actually use the hilbert base {$cos(nx)$,$sin(nx)$} instead. While remembering that you could write: $f(x)=\sum a_n cos(nx) +\sum b_n sin(nx)$.
You should remember also that $a_n=\frac{<f,cos(nx)>}{<cos(nx),cos(nx)>}$ and $b_n=\frac{<f,sin(nx)>}{<sin(nx),sin(nx)>}$.
A: I'll clarify some things which might have been unclear:
(1) A hilbert space is a complete inner product space
(2) Integrating the product of two continuous functions over a segment gives you an inner product space
(3) Every inner product space can be completed such that the new inner product agrees with the original inner product on the original space (meaning the set)
(4) Every Hilbert space $H$ has a set of orthonormal vectors {$v_i$}$_{i\in I}$ such that for every $u \in H$ if $<u,v_i>=0$ for every $i\in I$, then $u=0$. That set is called a hilbert base of $H$.
(5) You can write $\sum \hat{f}(n) e^{inx}$ as $\sum a_n\frac{(e^{inx}+e^{-inx})}{2}+ \sum b_n\frac{(e^{inx}-e^{-inx})}{2i}$ 
and get a formula for $a_n$ and $b_n$ dependent on $\hat{f}(n)$ acoordingly:
 $a_n=\frac{\hat{f}(-n)+\hat{f}(n)}{2}$,  $b_n=\frac{\hat{f}(-n)-\hat{f}(n)}{2i}$
$a_n=\frac{1}{2\pi}\int_{-\delta}^{\delta}f(\theta) \cos(n\theta) d\theta=\frac{1}{2\pi}\int_{-\delta}^{\delta} \cos(n\theta) d\theta+\frac{1}{2\pi}\int_{-\delta}^{0} \frac{\theta}{\delta} \cos(n\theta) d\theta+\frac{1}{2\pi}\int_{0}^{\delta} -\frac{\theta}{\delta} \cos(n\theta) d\theta$ 
While $b_n=0$  for every $n \in \mathbb{N}$. But still can be expressed as:
$b_n=\frac{1}{2\pi}\int_{-\delta}^{\delta}f(\theta) \sin(n\theta) d\theta=\frac{1}{2\pi}\int_{-\delta}^{\delta} \sin(n\theta) d\theta+\frac{1}{2\pi}\int_{-\delta}^{0} \frac{\theta}{\delta} \sin(n\theta) d\theta+\frac{1}{2\pi}\int_{0}^{\delta} -\frac{\theta}{\delta} \sin(n\theta) d\theta$
(6) Given a hilbert base {$u_i$}$_{i \in I}$, you can write every $v \in H$ as $\sum_{i \in I} <v,u_i>u_i$. The set  {$\sin(nx)$}$_{n=1}^{\infty}$,{$\cos(nx)$}$_{n=1}^{\infty}$ is a Hilbert base for the space $L^2[-\pi,\pi]$ which contains the function $f$. 
I hope this is clearer.
A: I'll write why it's an inner product in a seperate answer:
Given $[a,b] ⊆ \mathbb{R}$ ,Define the vector space $V=C([a,b],\mathbb{C})$ over $\mathbb{C}$. 
I'll show that $<,>:V \times V\to \mathbb{C}$, $<f,g>:=\frac{1}{b-a} \int_{t=a}^b f(t) \overline {g(t)}dt$ is an inner product on $V$. I'll note that $C([a,b],\mathbb{C})$ are the continuous functions from $[a,b]$ to $\mathbb{C}$.
(i) Linearity in the first argument: This is immediate due to linearity of the integral.
(ii) Conjugate symmetry:
$\overline {<f,g>}= \overline{\frac{1}{b-a} \int_{t=a}^b f(t) \overline {g(t)}dt}= \frac{1}{b-a} \int_{t=a}^b \overline{f(t) \overline {g(t)}}dt=\frac{1}{b-a} \int_{t=a}^b \overline{f(t)} g(t)dt=<g,f>$
(iii) Positive-definiteness: 
$<f,f>=\frac{1}{b-a} \int_{t=a}^b f(t) \overline {f(t)}dt=\frac{1}{b-a} \int_{t=a}^b |f(t)|^2 dt$
$|f(t)|^2 $ is a positive integrable function and therefore $<f,f> \geq0$. Also from the fact that $f$ is continuous we get that $\int_{t=a}^b |f(t)|^2 dt=0$ if and only if $f(t)=0$ for every $t \in [a,b]$.
I hope this ansers the question about (2). 
