Concept:
A first-order linear differential equation is of the form:
\[
\frac{dy}{dx} + Py = Q
\]
Integrating Factor (I.F.) is:
\[
\text{I.F.} = e^{\int P dx}
\]
Step 1: Compare with standard form.
\[
P = 1, \quad Q = e^{-x}
\]
\[
\text{I.F.} = e^{\int 1\,dx} = e^x
\]
Step 2: Multiply the equation by I.F.
\[
e^x \frac{dy}{dx} + e^x y = 1
\]
\[
\frac{d}{dx}(ye^x) = 1
\]
Step 3: Integrate both sides.
\[
\int d(ye^x) = \int 1\,dx
\]
\[
ye^x = x + C
\]
Step 4: Find the general solution.
\[
y = e^{-x}(x + C)
\]