Differential Equations — Medium JEE math MCQ
The solution of the differential equation $\frac{dy}{dx} + y = e^{-x}$, given $y(0) = 1$, is:
- A. $y = (x + 1)e^{-x}$
- B. $y = xe^{-x}$
- C. $y = (x - 1)e^{-x}$
- D. $y = (1 - x)e^{-x}$
Solution
This is a first-order linear ODE: $\frac{dy}{dx} + Py = Q$ where $P = 1$, $Q = e^{-x}$
Integrating factor: $IF = e^{\int P\,dx} = e^{\int 1\,dx} = e^x$
Multiplying both sides by IF:
$$e^x\frac{dy}{dx} + e^x y = e^x \cdot e^{-x} = 1$$
$$\frac{d}{dx}(ye^x) = 1$$
Integrating both sides:
$$ye^x = x + C$$
$$y = (x + C)e^{-x}$$
Using initial condition $y(0) = 1$:
$$1 = (0 + C)e^0 = C$$
Therefore: $y = (x + 1)e^{-x}$
