ODE analysis problem Given an IVP
$$y''(t)+(1+t^2)y=0 \quad y(0)=1, y'(0)=0$$
(a) Show that it is equivalent to
$$y(t)=\cos(t)+\int_{0}^{t} s^2\sin(s-t)y(s) ds$$
My methods:
For the reverse part, I am able to deduce that the given integral equation is the solution of the IVP by direct differentiation.
However, for the front part, I am not able to finish it. First, characteristic equation $r^2=-(1+t^2)$ gives me two complex roots. Hence,
$$y(t)=A\cos(\sqrt{1+t^2}t) +B\sin(\sqrt{1+t^2}t)$$
Use the IVP $y(0)=1$, $A=1$ and $B=0$. Hence,
$$y(t)=\cos(\sqrt{1+t^2}t)$$
Then, how can I continue??
 A: Apply the formula for the variation of constants to the equation
$$
y''(t)+y(t)=f(t)~~\text{ where }~~ f(t)=-t^2y(t).
$$
There
$$
y(t)=c_1(t)\cos(t)+c_2(t)\sin(t)\\
y'(t)=-c_1(t)\sin(t)+c_2(t)\cos(t)
$$
with the conditions
$$
\left.\begin{aligned}
c_1'(t)\cos(t)+c_2'(t)\sin(t)&=0\\
-c_1'(t)\sin(t)+c_2'(t)\cos(t)&=f(t)
\end{aligned}\right\}
\implies
\left\{\begin{aligned}
c_1'(t)&=-\sin(t)f(t)\\
c_2'(t)&=\cos(t)f(t)
\end{aligned}\right.
$$
so that
$$
\left.\begin{aligned}
c_1(t)&=c_1(0)-\int_0^t\sin(s)f(s)\,ds\\
c_2(t)&=c_2(0)+\int_0^t\cos(s)f(s)\,ds
\end{aligned}\right\}
$$
Combining these formulas, inserting the initial condition at $t=0$ and applying trigonometric identities leads then to the given formula.
\begin{align}
y(t)&=\left(1-\int_0^t\sin(s)f(s)\,ds\right)\cos(t)+\left(\int_0^t\cos(s)f(s)\,ds\right)\sin(t)\\
&=\cos(t)+\int_0^t[-\sin(s)\cos(t)+\cos(s)\sin(t)]f(s)\,ds\\
&=\cos(t)-\int_0^t\sin(t-s)\,s^2\,y(s)\,ds.
\end{align}

In a similar way, if you take any other frequency $\omega$ and consider the function
$$
g_t(s)=ω\cos(ω(t-s))y(s)+\sin(ω(t-s))y'(s)
$$
you get the derivative
$$
g_t'(s)=\sin(ω(t-s))(ω^2y(s)+y''(s))=\sin(ω(t-s))(ω^2-1-s^2)y(s)
$$
Now integrating both sides from $0$ to $t$ gives
$$
ωy(t)-\bigl[ω\cos(ωt)y(0)+\sin(ωt)y'(0)\bigr]=g_t(t)-g_t(0)=\int_0^t\sin(ω(t-s))(ω^2-1-s^2)y(s)\,ds.
$$
With for example $ω=\frac54$ the factor $(ω^2-1-s^2)=(\frac9{16}-s^2)$ is balanced in value for $s\in[0,1]$.
