Answer
See below
Work Step by Step
The general solution for the given differential equation is: $y(x)=c_1\cos wt+c_2 \sin wt+A_0\cos wt+B_0\sin wt$
The trial solution for $y_p=A_0\cos x+B_0\sin x$ can be computed as by plugging back into the given differential equation.
So, we have: $(D^2+w^2)y_p(x)= \frac{F_0}{m}\cos wt \\
(D^2+w^2)(A_0\cos wt+B_0\sin wt)=\frac{F_0}{m}\cos wt \\2B_0w=\frac{F_0}{m}$
On comparing coefficients, we get: $B_0=\frac{F_0}{2mw}$
Therefore, the general solution for the given differential equation is: $y(x)=c_1\cos wt+c_2\sin wt+\frac{F_0}{2mw} \sin wt$
Given $y(0)=1\\y'(0)=0$
Substitute $c_1=1\\
wc_2=0$
Then we have $c_1=1\\
c_2=0$
Hence, $y=\cos wt+\frac{F_0}{2mw}\sin wt$