Steady state and transient state of a LRC circuit I am given a charge of $Q(t)$ on the capacitor of an LRC circuit with a differential equation
$Q''+2Q'+5Q=3\sin(\omega t)-4\cos(\omega t)$ with the initial conditions $Q(0)=Q'(0)=0$
$\omega >0$ which is constant and $t$ is time. I am then asked find the steady state and transient parts of the solution and the value of $\omega$ for which the amplitude of the steady state charge maximal.
I believe the transient part is just the homogeneous solution to the ODE and the steady state part of this solution is the complementary solution.
I solved the homogeneous and got
$Q_{tr}=c_1e^{-t}\sin(2t)+c_2e^{-t}\cos(2t)$ which I am pretty sure is right. 
The problem is that I am not given a value for $\omega$ so if I were to go ahead and solve it, I would get a mess because I use undetermined coefficients.
So if I go ahead and "guessed" a solution, I get $Q_{ss}=A\sin(\omega t)+B\cos(\omega t)$ but if I differentiated this and actually plugged this into the derivative I get a huge mess so I am not sure if that's entirely the right way to approach this problem...
I mean if I actually solved the steady state solution, I get:
$Q(t)= c_1e^{-t}sin(2t)+c_2e^{-t}cos(2t)+ \frac{-3\omega^2-8\omega+15}{\omega^4-6\omega^2+25} \sin( \omega t)+\frac{4\omega^2-6\omega-20}{\omega^4-6\omega^2+25} \cos( \omega t)$
Plugging the initial conditions into this would be terrible. Is this even the correct approach?
For the second part of the problem I guess that I would take the derivative of $Q(t)$ and then find the critical points for which there will be a maximum but I am not sure about that.
Any guidance would be much appreciated thanks :) .
 A: You're right so far! Your $Q(t)$ is correct.
Determining the values of $c_1$ and $c_2$ isn't too bad compared to what you've done so far. You should get:
$$c_1 = \dfrac{1}{2} \dfrac{3\omega^3 + 4 \omega^2 - 9\omega + 20}{\omega^4 - 6\omega^2 + 25}$$
$$c_2 = - \dfrac{2( 2\omega^2 - 3\omega -10)}{\omega^4 - 6\omega^2 + 25}$$
A: Another way of solving is to use Laplace transform, we have that:
$$\mathcal{Q}''\left(t\right)+2\cdot\mathcal{Q}'\left(t\right)+5\cdot\mathcal{Q}\left(t\right)=3\cdot\sin\left(\omega t\right)-4\cdot\cos\left(\omega t\right)\tag1$$
Now, in order to take the Laplace transform of both sides, use this:


*

*$$\mathscr{L}_t\left[\mathcal{Q}''\left(t\right)\right]_{\left(\text{s}\right)}=\text{s}^2\cdot\text{Q}\left(\text{s}\right)-\text{s}\cdot\mathcal{Q}\left(0\right)-\mathcal{Q}'\left(0\right)\tag2$$

*$$\mathscr{L}_t\left[\mathcal{Q}'\left(t\right)\right]_{\left(\text{s}\right)}=\text{s}\cdot\text{Q}\left(\text{s}\right)-\mathcal{Q}\left(0\right)\tag3$$

*$$\mathscr{L}_t\left[\mathcal{Q}\left(t\right)\right]_{\left(\text{s}\right)}=\text{Q}\left(\text{s}\right)\tag4$$

*$$\mathscr{L}_t\left[\sin\left(\omega t\right)\right]_{\left(\text{s}\right)}=\frac{\omega}{\text{s}^2+\omega^2}\tag5$$

*$$\mathscr{L}_t\left[\cos\left(\omega t\right)\right]_{\left(\text{s}\right)}=\frac{\text{s}}{\text{s}^2+\omega^2}\tag6$$


Now, using the initial conditions we get that:
$$\text{s}^2\cdot\text{Q}\left(\text{s}\right)+2\cdot\text{s}\cdot\text{Q}\left(\text{s}\right)+5\cdot\text{Q}\left(\text{s}\right)=3\cdot\frac{\omega}{\text{s}^2+\omega^2}-4\cdot\frac{\text{s}}{\text{s}^2+\omega^2}\tag7$$
Solving $\text{Q}\left(\text{s}\right)$ out of equation $(7)$:
$$\text{Q}\left(\text{s}\right)=\frac{3\omega-4\text{s}}{\left(5+\text{s}\left(2+\text{s}\right)\right)\left(\text{s}^2+\omega^2\right)}\tag8$$
A: your Q(t) is actually wrong, it should have come out to plus 8w not minus. Then use the formula R^2 = A^2 + B^2 to find R(w). Then solve for the value that makes R a maximal.
