Method of Undetermined Coefficients: Why don't the different types of solutions converge to each other? Consider the following differential equation:
$$y''(t)+\omega_0^2y(t)=\sin(\omega t).$$
If $\omega\ne\omega_0$ then
$$y(t)=A\cos(\omega_0 t)+B\sin(\omega_0 t)+\frac{1}{\omega_0^2-\omega^2}\sin(\omega t).$$
If $\omega=\omega_0$ then
$$y(t)=A\cos(\omega_0 t)+B\sin(\omega_0 t)-\frac{1}{2\omega_0}t\cos(\omega_0 t).$$
Shouldn't these two solutions be similar as $\omega\rightarrow\omega_0$?
But if you look at the graph (attached) they don't look very similar. In this graph $A=0, B=1, \omega_0=1$ and $\omega = o = 1.01$. Image of both solutions.
The reason I think the solutions should look similar is because the above ODE describes the motion of a driven harmonic oscillator. So shouldn't driving a harmonic oscillator close to it's natural frequency give a result that is similar to driving precisely at the natural frequency? Where $\omega_0$ is the natural frequency and $\omega$ is the driving frequency.
 A: What you will find is that if you fix the boundary conditions the solutions will converge. What you have done is fixed the coefficients, but this amounts to varying the problem.
A: You can make this happen if, not unreasonably, you allow the coefficients to depend on $\omega$ as well (since to satisfy boundary conditions, this would need to be the case anyway, as Mark Bennet's answer alludes to). In particular, we can use
$$ y_p(t) = \frac{\sin{\omega_0t}-\sin{\omega t}}{\omega_0^2-\omega^2} $$
as a particular solution equally as well as the one you give. This has the advantage that it does have a nice limit as $\omega \to \omega_0$: we have
$$ \sin{\omega_0t}-\sin{\omega t} = 2\sin{\left(\frac{\omega-\omega_0}{2}t\right)}\cos{\left(\frac{\omega+\omega_0}{2}t\right)}, $$
so
$$ \lim_{\omega \to \omega_0} y_p(t) = \lim_{\omega \to \omega_0} -\frac{2\sin{\left(\frac{1}{2}(\omega-\omega_0)t\right)}}{\omega-\omega_0}\frac{\cos{\left(\frac{1}{2}(\omega+\omega_0)t\right)}}{\omega_0+\omega} = \frac{-1}{2\omega_0}t\cos{\omega_0 t} $$
since the first fraction has limit $t$ as $\omega\to \omega_0$.
