EDIT: fixed a stray negative sign. The problem as given:
$y'' + 2y' + 5y = 10\cos t$
We want to find the general solution and the steady-state solution. We're using $\mu y'' + c y' + k y = F(t)$ as our general form.
OK, so I first want the general solution to the 2nd order DE. That should be easy: the characteristic equation is $\lambda^2 + 2\lambda + 5$ and it has imaginary roots at $-1 \pm \sqrt{-4}$ which is $-1\pm 2i$.
So the general solution should be $y=C_1e^{-t} \cos 2t + C_2e^{-t}\sin2t$
The steady state solution is given by the Fourier series $y_p(t) = \alpha_0 + \sum_{n=0}^\infty \left( \alpha_n\cos \frac{n\pi}{p} t + \beta_n \sin \frac {n\pi}{p}t\right)$
We know the constants $c, \mu, k$ from the original equation, they are 1, 2, 5, respectively. So $\alpha_0 = a_0/k$ and $a_0 = \frac{1}{2\pi}\int_{-\pi}^\pi 10 \cos tdt$ and since $\cos t$ is an even function it goes to zero on any symmetric interval. so $\alpha_0=0$.
To get $\alpha_n$ and $\beta_n$: $$\alpha_n = \frac{A_n a_n - B_nb_n}{A_n^2+B_n^2},\ A_n = k-\mu\left(\frac{n\pi}{p}\right)^2, \beta_n = \frac{A_n b_n + B_na_n}{A_n^2+B_n^2},\ A_n = k-\mu\left(\frac{n\pi}{p}\right)^2$$ and the latter expression is $(5-1)(\frac{n\pi}{2\pi})^2$ which makes $A_n = n^2$. $B_n = c\frac{n\pi}{2\pi} = n$. That gets us $\alpha_n= \frac{n^2 a_n - nb_n}{n^4+n^2}$. Now to find $a_n$ and $b_n$.
From the other Fourier formulas $$a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \cos nx dx, \ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} f(x) \sin nx dx$$ or $$a_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 10 \cos t dt \cos nt, \ b_n = \frac{1}{\pi} \int_{-\pi}^{\pi} 10\cos t \sin nt dt$$
We can make the integration simpler using some trig identities because integration by parts gets you a bunch of repeating integrals. $\cos a \sin b = \frac{1}{2}[\sin (a+b) - \sin (a-b)$ and $\frac{1}{2}[\cos(a+b)+\cos(a-b)] = \cos a\cos b$. That gets us $$a_n = \frac{10}{\pi} \int_{-\pi}^{\pi} \frac{1}{2}[\cos ((1+n)t) +\cos ((1-n)t)]dt, \ b_n = \frac{10}{\pi} \int_{-\pi}^{\pi} \frac{1}{2}[\sin ((1+n)t) -\sin ((1-n)t)]dt$$ Integrating all this stuff I got: $$a_n=\frac{5}{\pi}\left[\frac{\sin (1+n)t}{1+n}+\frac{\sin (1-n)t}{1-n} \right]_ {-\pi}^{\pi}, \ b_n=\frac{5}{\pi}\left[\frac{-\cos (1+n)t}{1+n}+\frac{-\cos (1-n)t}{1-n} \right]_ {-\pi}^{\pi}$$ $a_n$ goes to zero since any integer multiple of $\sin \pi$ is zero. That leaves $b_n$, and leaves us with $b_n =\frac{5}{\pi} \left[\frac{2}{1-n^2}\right]$. We go all the way back to the equations for $\alpha_n$ and $\beta_n$ and when I plug the relevant values into the expression for $\alpha_n$ I got $\frac{-10}{\pi(n - n^5)}$. Meanwhile I got the value for $\beta_n = \frac{-10}{\pi - \pi n^4}$.
After all that I end up with: $$y_p(t) = \sum_{n=0}^\infty \left( \frac{-10}{\pi(n - n^5)}\cos \frac{n}{2} t + \frac{-10}{\pi - \pi n^4} \sin \frac {n}{2}t\right)$$
Is that my steady-state solution? Or did I really screw things up someplace? I am sorry for the long post but I like to make sure I work through all the steps.
And anyone brave enough to read this thanks a bunch for your time and patience.
Answering my own question and taking Artem's advice, I tried this....
$y'' + 2y' + 5y = 10\cos t$
We want to find the general solution and the steady-state solution. We're using $\mu y'' + c y' + k y = F(t)$ as our general form.
the characteristic equation is $\lambda^2 + 2\lambda + 5$ and it has imaginary roots at $-1 \pm \sqrt{-4}$ which is $-1\pm 2i$.
So the general solution should be $y=C_1e^{-t} \cos 2t + C_2e^{-t}\sin 2t$
The steady state solution is given by the Fourier series $y_p(t) = \alpha_0 + \sum_{n=0}^\infty \left( \alpha_n\cos \frac{n\pi}{p} t + \beta_n \sin \frac {n\pi}{p}t\right)$
But we needn't be that complicated, it seems to me, since could try looking for solutions in the form of $y_p = A \sin t + B \cos t$.
We differentiate and we get $y_p' = A \cos t - B \sin t$ and $y_p'' = -A \sin t - B \cos t$.
Substitute in $y_p$ to the original equation. We get $$-A \sin t - B \cos t + 2(A \cos t - B \sin t)+ 5(A \sin t + B \cos t) = 10 \cos t$$
And simplifying we have
$$(4A - 2B) \sin t - (4B+ 2A) \cos t = 10 \cos t$$
And that leaves us with $(4A - 2B) = 0$ and $(-4B - 2A) = 10$. Solving for both we get $B = -2$ and $A =-1$.
So the steady state solution is
$$y=C_1e^{-t} \cos 2t + C_2e^{-t}\sin 2t - \sin t - 2 \cos t $$
Now here's the part where everyone tells me I messed this up :-) I just feel I have done something way off here. But it seems ok...
Anyhow, thanks for bearing with me.