Answer
\[y(x)=1-Ce^{\cos x}\]
Work Step by Step
$y'+y\sin x=\sin x$ _____(1)
(1) is Linear Differential Equation
Integrating Factor:-
\[I(x)=e^{\int\sin x dx}=e^{-\cos x}\]
Multiply (1) by $e^{-\cos x}$
\[e^{-\cos x}\frac{dy}{dx}+y\sin x \;e^{-\cos x}=\sin x\;e^{-\cos x}\]
\[\frac{d}{dx}[ye^{-\cos x}]=\sin x \;e^{-\cos x}\]
Integrating,
\[C+ye^{-\cos x}=\int\sin x\;e^{-\cos x}dz\]
$C$ is constant of integration
Put $t=-\cos x$
$dt=\sin x dx$
\[C+ye^{-\cos x}=\int e^t dt=e^t\]
\[ye^{-\cos x}=e^{-\cos x}-C\]
\[y(x)=1-Ce^{\cos x}\]
Hence General Solution of (1) is $y(x)=1-Ce^{\cos x}$