how to get coefficient in a Fourier series in an ODE

104 Views Asked by At

I am just wondering how to get the coefficient in the circle? is it by matching of coefficient? if so, could someone show how to get that $a_n$ coefficient?

enter image description here

I was taught the formula of the coefficient of $a_n$ is $\frac{2}{L} \int_{0}^{L} f(x) cos(\frac{n\pi x}{L}) \,dx$ where L is half of the period.

Could somehow show how to get that $a_n$ coefficient?