Step 1: Identify the Equation Type
This is a first-order linear differential equation of the form \( \frac{dy}{dx} + P(x)y = Q(x) \), with \( P(x) = 2 \), \( Q(x) = e^{-x} \).
Step 2: Find Integrating Factor (I.F.)
\[ \text{I.F.} = e^{\int 2 \, dx} = e^{2x} \]
Step 3: Multiply through by I.F. and Integrate
\[ e^{2x} \frac{dy}{dx} + 2e^{2x} y = e^{x} \Rightarrow \frac{d}{dx}(y e^{2x}) = e^{x} \] \[ \Rightarrow y e^{2x} = \int e^{x} dx = e^{x} + C \Rightarrow y = e^{-x} + C e^{-2x} \]
Alternate Method: Using Homogeneous + Particular Solution
Homogeneous: \( y_h = C e^{-2x} \)
Try particular solution \( y_p = a e^{-x} \)
Substitute: \( -a e^{-x} + 2a e^{-x} = e^{-x} \Rightarrow a = 1 \)
General solution: \( y = e^{-x} + C e^{-2x} \)