Step 1: Understanding the Concept:
The problem asks for the integrating factor of a first-order linear differential equation. To find it, we must first rearrange the equation into the standard form: \(\frac{dy}{dx} + P(x)y = Q(x)\).
Step 2: Key Formula or Approach:
1. Rearrange the given differential equation into the standard linear form.
2. Identify the function \(P(x)\).
3. The integrating factor (I.F.) is given by the formula: \(I.F. = e^{\int P(x) dx}\).
Step 3: Detailed Explanation:
The given equation is:
\[ \sin x \, dy = \frac{1}{2}(\sin 2x + 2y \cos x)dx \]
First, divide both sides by `dx` to get the derivative form:
\[ \sin x \frac{dy}{dx} = \frac{1}{2}(\sin 2x + 2y \cos x) \]
Distribute the \(\frac{1}{2}\) on the right side:
\[ \sin x \frac{dy}{dx} = \frac{1}{2}\sin 2x + y \cos x \]
Now, rearrange to get the standard form \(\frac{dy}{dx} + P(x)y = Q(x)\). Move the y-term to the left side:
\[ \sin x \frac{dy}{dx} - y \cos x = \frac{1}{2}\sin 2x \]
Divide the entire equation by \(\sin x\) to isolate \(\frac{dy}{dx}\):
\[ \frac{dy}{dx} - y \frac{\cos x}{\sin x} = \frac{\sin 2x}{2\sin x} \]
Simplify the terms:
\[ \frac{dy}{dx} - y (\cot x) = \frac{2\sin x \cos x}{2\sin x} = \cos x \]
Now the equation is in standard form. We can identify \(P(x)\):
\[ P(x) = -\cot x \]
Next, we calculate the integrating factor:
\[ I.F. = e^{\int P(x) dx} = e^{\int -\cot x dx} \]
The integral of \(\cot x\) is \(\ln|\sin x|\).
\[ \int -\cot x dx = -\ln|\sin x| = \ln(|\sin x|^{-1}) = \ln|\csc x| \]
So, the integrating factor is:
\[ I.F. = e^{\ln|\csc x|} = |\csc x| \]
Since the integrating factor is generally taken to be positive, we have \(I.F. = \csc x\).
Step 4: Final Answer:
The integrating factor is cosec x.