Concept:
For a linear differential equation in standard form \( \frac{dy}{dx} + P(x)y = Q(x) \), the integrating factor (I.F.) is given by \( e^{\int P(x) dx} \).
Step 1: Convert to standard form.
Divide the entire equation by \( \sin x \):
\[ \frac{dy}{dx} + \frac{2 \cos x}{\sin x} y = \frac{1}{\sin x} \]
\[ \frac{dy}{dx} + (2 \cot x)y = \csc x \]
Step 2: Identify \( P(x) \).
Here, \( P(x) = 2 \cot x \).
Step 3: Calculate the Integrating Factor.
\[ \text{I.F.} = e^{\int 2 \cot x \, dx} \]
We know that \( \int \cot x \, dx = \log|\sin x| \):
\[ \text{I.F.} = e^{2 \log|\sin x|} = e^{\log(\sin^2 x)} \]
Using the property \( e^{\log z} = z \):
\[ \text{I.F.} = \sin^2 x \]