I was given the Following Fourier's coefficient and I was happy with it:
$$\left\{ \begin{array}{ll} a_n(f)=\frac{1}{\pi} \int_{0}^{2\pi} f(x) \cos\left(nx\right)\,\mathrm{d}x\\ b_n(f) = \frac{2}{\pi} \int_{0}^{2\pi} f(x) \sin\left(nx\right)\,\mathrm{d}x \end{array} \right.$$
but I had an exercise:
Let be the function $f$ with a period of $2\pi$ defined for all $x\in[-\infty,\infty[$ by $f(x)=x$. Find the Fourier's coefficient associated to $f$.
and the formulas used in the correction were:
$$\left\{ \begin{array}{ll} a_n(f)=\frac{1}{\pi} \int_{\pi}^{-\pi} f(x) \cos\left(nx\right)\,\mathrm{d}x\\ b_n(f) = \frac{2}{\pi} \int_{\pi}^{-\pi} f(x) \sin\left(nx\right)\,\mathrm{d}x \end{array} \right.$$
I feel that its the same formulas. But I can't see it...
Can you help me see why are they alike?
Okay, from Wikipedia it is:
$$\left\{ \begin{array}{ll} a_n(f)=\frac{2}{T} \int_{-T/2}^{T/2} f(t) \cos\left(nt\frac{2\pi}{T}\right)\,\mathrm{d}t\\ b_n(f) = \frac{2}{T} \int_{-T/2}^{T/2} f(t) \sin\left(nt\frac{2\pi}{T}\right)\,\mathrm{d}t \end{array} \right.$$
The functions are periodic, so the integral over an interval of period length does not depend on the choice of endpoints:
$$\int_a^{a+2\pi} f(t)dt = \int_0^{2\pi} f(t)dt $$
for any real $a$, in case the period is $2\pi$. To prove this look at the coordinate transformation $t\mapsto t+a$ and make use of $f(t)=f(t+2\pi).$