This is a first-order linear differential equation. It can be written as: \[ \frac{dy}{dx} + 2y = \cos x \] The integrating factor is \( e^{\int 2 \, dx} = e^{2x} \). Multiplying the equation by \( e^{2x} \) yields: \[ e^{2x} \frac{dy}{dx} + 2e^{2x} y = e^{2x} \cos x \] The left side is now the derivative of \( e^{2x} y \). Integrating both sides: \[ e^{2x} y = \int e^{2x} \cos x \, dx \] The integral \( \int e^{2x} \cos x \, dx \) is solved using integration by parts or standard integral tables. Its value is: \[ \int e^{2x} \cos x \, dx = \frac{e^{2x}}{5} (\cos x + 2 \sin x) \] Therefore, the differential equation's solution is: \[ e^{2x} y = \frac{e^{2x}}{5} (\cos x + 2 \sin x) + C \] Solving for \( y \): \[ y = \frac{1}{5} (\cos x + 2 \sin x) + Ce^{-2x} \] The general solution is: \[ y = \frac{1}{5} (\cos x + 2 \sin x) + Ce^{-2x} \]