The solution of the differential equation \(\displaystyle\frac{dy}{dx} + y = e^{-x}\) that satisfies \(y(0) = 2\) is
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → \(y = (x + 2)e^{-x}\)
This is a linear equation with \(P = 1\) and \(Q = e^{-x}\). The integrating factor is \(e^{x}\). So
\( \displaystyle y\,e^{x} = \int e^{-x}\cdot e^{x}\,dx = \int 1\,dx \)
\( y\,e^{x} = x + C \)
Using \(y(0) = 2\):
\( 2 = 0 + C \Rightarrow C = 2 \)
\( y = (x + 2)e^{-x} \)
Why the other options are incorrect
Option (1) \(y = 2e^{-x}\) — Incorrect. It gives \(y' + y = -2e^{-x} + 2e^{-x} = 0\), not \(e^{-x}\); the term from \(\int 1\,dx = x\) is missing.
Option (3) \(y = (2 - x)e^{-x}\) — Incorrect. It gives \(y' + y = -e^{-x}\), the wrong sign.
Option (4) \(y = (x + 2)e^{x}\) — Incorrect. It multiplies by the integrating factor instead of dividing; \(y' + y = (2x + 5)e^{x}\), not \(e^{-x}\).