Why solutions of $y''+(w^2+b(t))y=0$ behave like solutions of $y''+w^2y=0$ at infinity Assume $w&gt;0$ and $b(t)$ be continuous on $[0,+\infty)$ and $\int_0^\infty |b(t)| dt &lt;\infty$
show that $y''+(w^2+b(t))y=0$ has solution $\phi(t)$ such that $$\lim_{t\to\infty} [(\phi(t)-\sin(wt))^2+(\phi'(t)-w\cos(wt))^2]=0$$

thanks
Here is an outline of an approach that almost gets there (with some pieces left to be filled in). I will show that we can find solutions $\phi(t)$ that are arbitrarily close to $\sin wt$ for all sufficiently large $t$ under the assumption that $\lim_{t\to\infty}b(t) = 0$.

Write the solution to the ODE as $\phi(t) = \sin w t + \delta y$ and impose the initial conditions $\delta y(t_*) = \delta y'(t_*) = 0$ for some $t_*$ to be fixed later on. Then

$$\delta y'' + (w^2+b)\delta y = -b\sin w t$$

This system is equivalent to a ball rolling without friction attached to a spring with varying spring-constant and we have some driving force $b(t)\sin wt$.

This physics-analogy motivates us to try to find an 'energy equation' for this system. Multiply by $\delta y'$ to find

$$\frac{d}{dt}(\delta y'^2 + w^2\delta y^2) = -b(t)\left(2\sin w t\frac{d\delta y}{dt} + \frac{d\delta y^2}{dt}\right)$$

Integrating over $[t_*,t]$ yields

$$(\delta y'^2 + w^2\delta y^2) \leq \max_{t'\in [t_*,t]}|b(t')|\left(2|\delta y| + \delta y^2\right)$$

Now since $y$ is bounded (I will just assume this here, see the other answer for the proof. Physically this is because the energy is bounded.) and $b\to 0$ (Edit: $b\to 0$ does not follow from continuity, but I will need to assume this here) we get that for any $\epsilon &gt; 0$ there exist a $t_*$ s.t. for $t&gt;t_*$ we have

$$\delta y'^2 + w^2\delta y^2 &lt; \epsilon$$

and since $w$ is a constant it also follows that we can find a $t_*$ s.t.

$$\delta y'^2 + \delta y^2 &lt; \epsilon$$

for all $t&gt;t_*$. Writing out this equation we get

$$(\phi(t)-\sin wt)^2 + (\phi'(t)-w\cos wt)^2 &lt; \epsilon$$

for $t&gt;t_*$. Thus there exists solutions that are arbitrarely close to $y=\sin w t$ for all sufficiently large $t$, however I have not yet found a way to show that we can find one particular solution where the difference goes to zero at infinity.
i think you need integral representation of the solution $y$ and an application of the gronwall's inequality.

rewrite the $y^{''} + \omega^2 y = -by$ a particular solution is $$y(t) = {1 \over \omega} \cos (\omega t)\int_0^t \sin( \omega s) b(s) y(s) ds- \sin(\omega t) \int_0^t \cos(\omega s) b(s) y(s) ds$$ 

taking the absolute value $|y(t)| \le K\int_0^t |b(s)||y(s)| ds.$  here i am not too sure but the gronwall inequality now should give $|y| &lt; |y(0)|exp(\int_0^t |b(s)|ds$
which is bounded above by $$|y(t)| \le |y(0)|exp\left(\int_0^\infty |b(t)|dt\right).$$