an=\frac{2}{b-a}\int_{a}^{b}f(t)cos\frac{2n\pi  t}{b-a}dt