How to obtain solution to constants "c_n" from Fourier's trick?

335 Views Asked by At

how is the answer for c_n in the red box obtained from the line above?

Going through the example problem in the image, I don't understand how the answer in the red box was obtained. Mathematica does not return anything similar. How can I obtain the answer that is shown in the image? Further, how could I do this on Mathematica?