So I am looking to find the solutions of : $$-u''+u=\cos(6x)$$ I did go through all the usual stages: Fourier transform, inversion theorem (since the resulting $\hat u \in L^1)$, then Jordan lemma + Residue theorem to calculate the inverse transform and as you would expect I end up with the solution in terms of a convolution.
The problem is that the answer I am provided is completely different, and the hint tells me to use the "method for researching periodic solutions through the Fourier series". I'm not sure what that entails, so I would really appreciate if someone could guide me through it.
Thank you.
The standard way is to try a solution in the form $$ u=A\sin(6x)+B\cos(6x). $$ Putting this into the equation you will get $$ 36A\sin(6x)+36B\cos(6x)+A\sin(6x)+B\cos(6x)=\cos(6x). $$ This will give you a system of two equations in two unknowns for $A$ and $B$.
For a Fourier series, one has to write $$ u(x)=\sum_{n=-\infty}^\infty a_ne^{i2\pi n x}. $$ By a direct substitution this gives $$ \sum_{n=-\infty}^\infty 2\pi n^2 a_ne^{i2\pi n x}+\sum_{n=-\infty}^\infty a_ne^{i2\pi n x}=\frac{1}{2}e^{-i6x}+\frac{1}{2}e^{i6x}. $$ We can invert this by multiplying with $e^{-i2\pi mx}$ and integrating between $0$ and $2\pi$ yielding $$ (2\pi m^2+1)a_m=\frac{1}{4\pi}\int_0^{2\pi}e^{-2i\pi mx}e^{6ix}+\frac{1}{4\pi}\int_0^{2\pi}e^{-2i\pi mx}e^{-6ix}. $$ This can be easily worked out to obtain $a_m$.