How to solve this equation by Fourier series? $$  y''+3y=\sin ^4 x ,\quad y=\frac{1}{8} +\frac{\cos2x}{2}-\frac{\cos4x}{104}.$$
Now the text book states the solution, but I don't know the process of solving this equation. I need  your help!

To go along with @RonGordon's solution, we can:


*

*Solve for the homogeneous solution

*Solve using Fourier Series for the particular solution

*Write $y = y_h + y_p$


For 1., we have:
$$m^2 + 3  = 0 \rightarrow m_{1,2} = \pm i \sqrt{3}$$
For 2., we can write the Fourier Series of $(\sin x)^4$ as:
$$\displaystyle (\sin x)^4 = \frac{3}{8} -\frac{1}{4} e^{-2 i x}-\frac{1}{4} e^{2 i x} +\frac{1}{16} e^{-4 i x}+ \frac{1}{16} e^{4 i x}$$
What you would do now, is to solve three particular solution problems (you just can easily see the forms of the exponentials):


*

*$\displaystyle y''+3y = \frac{3}{8}$

*$\displaystyle y''+3y = -\frac{1}{4} e^{-2 i x}-\frac{1}{4} e^{2 i x} = -\frac{1}{2} \cos 2x$

*$\displaystyle y''+3y = -\frac{1}{16} e^{-4 i x}-\frac{1}{16} e^{4 i x} = \frac{1}{8} \cos 4x$


Of course, this leads to Ron's solution for $y_p$.
For 3., we write:
$$y(x) = c_2 \sin \sqrt 3x + c_1 \cos \sqrt 3 x+\frac{1}{2} \cos 2 x - \frac{1}{104} \cos 4 x + \frac{1}{8}$$
