(a)
Given, $\frac{dy}{dx} = 2\cos x - y\cos x\ cosec\ x$
$\Rightarrow$ $\frac{dy}{dx} + y\cot x = 2\cos x$
$\therefore$ $IF = e^{\int_{}^{}{\cot x\ dx}} = e^{\log\left( \sin x \right)} = \sin x$
$\therefore$ Solution is $y\sin x = \int_{}^{}{2\cos x}\sin x\ dx + c$
$\Rightarrow$ $y\sin x = \int_{}^{}{\sin{2x}}\ dx + c$
$\Rightarrow \ \$ $y\sin x = \frac{- \cos{2x}}{2} + c$
At $x = \frac{\pi}{4},y = \sqrt{2}$
$\therefore$ $\sqrt{2}\sin\frac{\pi}{4} = \frac{- \cos{2(\frac{\pi}{4})}}{2} + c$
$\Rightarrow$ $c = 1$
$\therefore$ $y\sin x = - \frac{1}{2}\cos{2x} + 1$
$\Rightarrow$ $y = - \frac{1}{2}.\ \frac{\cos{2x}}{\sin x} + cosec\ x$
$\Rightarrow$ $y = - \frac{1}{2\sin x}\left( 1 - 2\sin^{2}x \right) + cosec\ x$
$\Rightarrow$ $y = \frac{1}{2}\ cosec\ x + \sin x$