I must find the Fourier serie of $$\phi(x)=x-\frac{1}{2}$$ on $[0,1]$, knowing that the Fourier series of $f(x)=x$ is : $$\sum_{k=1}^{\infty}\frac{2(-1)^{k+1}\sin(kx)}{k}$$ The solution of this problem is :
on $[0,1]$, the Fourier coefficient is : $$a_k=\int_{0}^{1}\phi(x)e^{-2ik\pi x}dx$$ and the functions $e^{-2ik\pi x}, k \in Z$ form a orthonormal basis of $L^1([0,1])$. We set $x=2\pi(y-1/2)$, and the Fourier transform of
$$\sum_{k=1}^{\infty}\frac{2(-1)^{k+1}\sin(k2\pi(y-1/2))}{k}$$ Hence the Fourier transform of $\phi$ is : $$-\sum_{k=1}^{\infty}\frac{\sin(2\pi k y)}{\pi k}$$
I don't understand this solution. First, how do we know that the Fourier coefficient $a_k$ is like this ? Then, why do we set a change of variable ? Thanks for your help !
I think it's better to write the solution in the following way, to lay out the logic more clearly. The Fourier series of $f(x)=x$ on $[-\pi,\pi]$ is given by $$\sum_{k\in\mathbb{Z}} b_ke^{-ikx}=\sum_{k=1}^\infty\frac{2(-1)^{k+1}\sin(kx)}{k},$$ with $$b_k=\frac{1}{2\pi}\int_{-\pi}^{\pi}xe^{-ikx}dx.$$ Now consider the Fourier series of $x-\frac{1}{2}$ on $[0,1]$, whose Fourier coefficients are $$\begin{aligned}c_k&=\int_0^1 (y-\frac{1}{2})e^{-2\pi i ky}dy\\ &=\frac{1}{(2\pi)^2}\int_{-\pi}^{\pi}xe^{-i k(x+\pi)}dx\quad (x=2\pi(y-1/2))\\ &=\frac{1}{2\pi} e^{-ik\pi}b_k. \end{aligned}$$ Thus the Fourier series of $x-\frac{1}{2}$ on $[0,1]$ is given by $$\sum_{k\in\mathbb{Z}}c_ke^{-2\pi ikx}=\frac{1}{2\pi}\sum_{k\in\mathbb{Z}}e^{-ik\pi}b_ke^{-2\pi ikx}.$$ Noting that $$e^{-ik\pi}=\cos(k\pi)+i\sin(k\pi)=\cos(k\pi)=(-1)^{k+1},$$ the series $\sum_{k\in\mathbb{Z}}c_ke^{-2\pi ikx}$ can be simplified to the form in the solution.