Step 1: Understanding the Concept:
To find the integrating factor, we must first write the differential equation in the standard linear form: \(\frac{dy}{dx} + P(x)y = Q(x)\).
Step 2: Key Formula or Approach:
The integrating factor (I.F.) is given by \(e^{\int P(x) dx}\).
Step 3: Detailed Explanation:
Given equation:
\[ 2dy = (y + \cos x)dx \]
Divide both sides by \(2dx\):
\[ \frac{dy}{dx} = \frac{y + \cos x}{2} \]
\[ \frac{dy}{dx} = \frac{1}{2}y + \frac{1}{2}\cos x \]
Rearrange to standard form \(\frac{dy}{dx} + P(x)y = Q(x)\):
\[ \frac{dy}{dx} - \frac{1}{2}y = \frac{1}{2}\cos x \]
Identify \(P(x)\):
\[ P(x) = -\frac{1}{2} \]
Calculate the integrating factor:
\[ \text{I.F.} = e^{\int P(x) dx} = e^{\int -\frac{1}{2} dx} \]
\[ \text{I.F.} = e^{-\frac{1}{2}x} = e^{-x/2} \]
Step 4: Final Answer:
The integrating factor is \(e^{-x / 2}\).