This makes no sense. The coefficient can't be a function of x. Did you forget to evaluate at and ?

cos(ax) is an even function- it will haveno"sin(nx)" terms in it. The coefficient of cos(nx) will be

for n> 0.

The n= 0 term is .

As I said above, all coefficients of "sin(nx)" will be 0.