Question: $$ \frac{d^2x}{dt^2} + \omega^2 x = 2\sin \Omega t . $$ Determine the motion of the object, given that $x (0)= -4$ and $x'(0)=0$.
Answer: $$ x (t) = -4\cos\omega t - \frac {\Omega}{\omega}\frac{2}{\omega^2-\Omega^2}\sin \omega t + \frac{2}{\omega^2-\Omega^2}\sin \Omega t . $$
My Attempt:
I was able to find that homogeneous equation is
$h=-4\cos(\omega t)$
and a particular solution is given by
$p=\dfrac{2\sin(\Omega t)}{\omega^2-\Omega^2} $
Working for $p$:
$p$ is in the form:
$p=a\cos(\Omega t)+b\sin(\Omega t)$
$p' = -a\Omega \sin(\Omega t) +b\Omega \cos(\Omega t)$
$p'' = -\Omega^2 p$
Substituting into our original second-order ODE, we get
$p=\dfrac{2\sin(\Omega t)}{\omega^2-\Omega^2} $
My solution
Now,
$x(t) = h+p$
Therefore,
$x(t) =-4\cos(\omega t) +\dfrac{2\sin(\Omega t)}{\omega^2-\Omega^2} $
But as you can see, the Answer at the top of this post is different (there is a middle term). I think I've missed something fundamental. Help appreciated, thanks!
The homogeneous solutions are $$ h (t) = a\cos \omega t + b\sin \omega t , $$ where $a$ and $b$ are reals. The proposed particular solution is correct: $$ p (t) = \frac{2}{\omega^2 - \Omega^2} \sin \Omega t . $$ Now, form $x = h+p$ and apply the initial conditions to determine $a$ and $b$.