For the case of $a_n$ I am confused how my notes say we have 1 for the case n = 0. When calculating this integral for sin(nx) when n=0, we should also get zero as at x=0, sin(x) is 0. I must be missing something obvious here. Could anyone explain please?
Additionally, I am fine with $b_n$ but the final solution. How is it achieved? I am guessing that it is some trig identity?