I want to find the nth order Fourier approximation for . Since this function is odd, the projections on all cosines will be zero, hence it will be expressed through the sines only. So I just need to find the sine coefficients.

The problem is that I checked the answer to this problem in two different textbooks, the solutions in the books are totally different from each other.

- The first book calculates the coefficients like this:

- The second book calculates the coefficients this way:

So which one is correct? I mean, they both are probably correct but I don't understand why they use different methods and end up with different answers. Any explanation is very appreciated.