Why solutions of $y''+(w^2+b(t))y=0$ behave like solutions of $y''+w^2y=0$ at infinity Assume $w>0$ and $b(t)$ be continuous on $[0,+\infty)$ and $\int_0^\infty |b(t)| dt <\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
 A: 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 > 0$ there exist a $t_*$ s.t. for $t>t_*$ we have
$$\delta y'^2 + w^2\delta y^2 < \epsilon$$
and since $w$ is a constant it also follows that we can find a $t_*$ s.t.
$$\delta y'^2 + \delta y^2 < \epsilon$$
for all $t>t_*$. Writing out this equation we get
$$(\phi(t)-\sin wt)^2 + (\phi'(t)-w\cos wt)^2 < \epsilon$$
for $t>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.
A: The following proof does not originate from me but the hint in Coddington and Levinson's ODE book. I write it out in full here for my own and perhaps others' benefit.

Let $y_0(t)=\sin(\omega t)$, and
$$y_{i+1}(t) = \sin(\omega t)+\frac{1}{\omega}\Big(\cos(\omega t)\int_t^\infty \sin( \omega s) b(s) y_i(s) ds- \sin(\omega t) \int_t^\infty \cos(\omega s) b(s) y_i(s) ds\Big).$$
For large $T$ such that 
$$\int_T^\infty |b|<\frac{1}{2},$$
we have $|y_1(t)|<\infty$ and a uniform Cauchy sequence $y_i(t)$ where 
\begin{align*}
&\big|y_{i+1}(t)-y_i(t)\big| \\
=& \frac{1}{\omega}\Big(\cos(\omega t)\int_t^\infty \sin( \omega s) b(s) (y_i(s)-y_{i-1}(s)) ds- \sin(\omega t)\int_t^\infty \cos(\omega s) b(s)(y_i(s)-y_{i-1}(s))ds\Big) \\
<& \frac{K}{2^i}
\end{align*}
for some positive constant $K$ and $\forall t \ge T$. So $y_i(t)$ approaches to a function $y_\infty$ uniformly where $|y_\infty|<K$ and
$$y_\infty(t) = \sin(\omega t)+\frac{1}{\omega}\Big(\cos(\omega t)\int_t^\infty \sin( \omega s) b(s) y_\infty(s) ds- \sin(\omega t) \int_t^\infty \cos(\omega s) b(s) y_\infty(s) ds\Big).$$
(I will finish the proof later.)
A: Here's another proof (apologies for any similarities, but I think it's different enough). Put $Y = y + i\dot y/w$ and write $\beta(t) = b(t)/w$. Then with initial conditions $Y(0) = Y_0$ the differential equation can be written
\begin{align*}
 \dot Y = -iwY - i\beta y,\qquad Y(0) = Y_0. \tag{1}
\end{align*}
Since
\begin{align*}
 {d\over dt}(Ye^{iwt}) &= (\dot Y + iw Y)e^{iwt} = -i\beta y e^{iwt},
\end{align*}
we can write
\begin{align*}
 Y(t)e^{iwt} - Y(s)e^{iws} &= -i\int_{s}^t \beta(r)y(r)e^{iwr}\,dr.
\end{align*}
Set $B = \int_0^\infty |\beta(r)|\,dr$. In a moment I will prove that
\begin{align*}
 |Y(t)|\leq e^B|Y(s)|, \qquad s,t\geq0. \tag{2}
\end{align*}
Suppose for now that this is proved. Then for any time $t_0$,
\begin{align*}
 |Y(t)e^{iwt} - Y(s)e^{iws}| \leq e^B|Y(t_0)| \int_s^t|\beta(r)|\,dr, \tag{3}
\end{align*}
which since the right side tends to $0$ as $s,t\to\infty$ implies that $Y(t)e^{iwt}$ has a limit $Y(\infty)$ as $t\to\infty$. If $z$ is an arbitrary point in the plane, I claim that we can make $Y(\infty) = z$. (This is enough to answer the question because $Y(t)$ converges to the curve $Y(\infty)e^{-iwt}$.) To prove the claim, define a map $\Lambda\colon\mathbb C\to \mathbb C$ by setting $\Lambda(\zeta) = Y_\zeta(\infty)$, where $Y_\zeta$ is the solution to the ODE $(1)$ with initial condition $Y_\zeta(0) = \zeta$. Observe that $\Lambda$ is a linear map (using $Y_\zeta(t) + cY_\xi(t) = Y_{\zeta + c\xi}(t)$, which is because the left side is a solution to $(1)$ passing through $\zeta + c\xi$ at time zero and because there is only one such solution), and that the inequality $(2)$ implies that $\Lambda$ is invertible: $e^{-B}|\zeta|\leq |\Lambda(\zeta)|$. An invertible linear map on the plane is surjective, so the claim is proved.
It remains to prove $(2)$. For this I'll use Gronwall's inequality twice. Gronwall's inequality says that if $u(t)$ is real-valued and satisfies $\dot u(t)\leq f(t)u(t)$ for $a\leq t\leq b$, then $u(t) \leq e^{\int_a^tf(s)\,ds}u(a)$ for $t\in [a,b]$. The proof involves writing $$u(t) = e^{\int_a^tf(s)\,ds}u(a) + e^{\int_a^tf(s)\,ds}\int_a^t(\dot u(s) - f(s)u(s))e^{-\int_a^sf(r)\,dr}\,ds$$
and observing that the integral is negative for $t\in[a,b]$. 
On now to the proof of $(2)$. Fix $s$. I'll first use Gronwall's inequality to show that $|Y(t)|\leq e^B|Y(s)|$ for $t\geq s$. From what we showed above,
\begin{align*}
 \left|{d\over dt} (Ye^{iwt})\right| = |-i\beta ye^{iwt}| \leq |\beta||Y|.
\end{align*}
Thus
\begin{align*}
 {d\over dt}|Y| &= {d\over dt}|Ye^{iwt}| = \operatorname{Re}\left({\bar{Y}e^{-iwt}\over |Y|}{d\over dt} (Ye^{iwt})\right)\leq \left|{d\over dt} (Ye^{iwt})\right|\leq |\beta||Y|,
\end{align*}
and applying Gronwall's inequality on the half-line $t\geq s$ gives the desired bound. All that's left is to show that $|Y(t)|\leq e^B|Y(s)|$ for $t\leq s$. To do this put $U(t) = Y(s-t)$ for $t\in[0,s]$, so that $U$ satisfies the reverse time equation
\begin{align*}
 \dot U(t) = iwU(t) + i\beta(s-t)\operatorname{Re}U(t)
\end{align*}
Thus differentiating $Ue^{-iwt}$ and running the same proof as before gives ${d\over dt}|U|\leq |\beta(s-t)||U|$, and then Gronwall's inequality gives $|Y(s - t)|\leq e^B |Y(s)|$ for $t\in[0,s]$, which is equivalent to $Y(t)\leq e^BY(s)$ for $0\leq t\leq s$. With that, $(2)$ is proved.
A: 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| < |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).$$
