Answer
See below
Work Step by Step
Given $y''+y=\frac{1}{\sin x}$
In this case the substitution $y(x) = e^{rx}$ yields the indicial equation
$r^2+1=0$
It follows that two linearly independent solutions to the given differential equation are
$y_1(x)=\cos x\\
y_2(x)=\sin x$
so that the general solution is
$y(x)=u_1\cos x+u_2\sin x$
We first compute the appropriate derivatives
$y'=e^{rx}(u'+u)=u_1'(x)\cos x+u_2'(x)\sin x\\
y''=e^{rx}(u''+u)=u_1'(x)(\cos x)'+u_2'(x)(\sin x)'$
Substituting these expressions into the given equation, we find that $u$ must satisfy
$-u_1'(\sin x+\frac{\cos^2 x}{\sin x})=\frac{1}{\sin x}\\
\rightarrow u_1'(x)=-1\\
\rightarrow u_1(x)=-x$
and $u_2'(x)=\cot x\\
\rightarrow u_2(x)=\ln (\sin x)$
Hence, the general solution is:
$y(x)=C_1\cos x+C_2\sin x-x\cos x+[\ln(\sin x)]\sin x$