31-01-2025

Problem: Solve the initial value problem \[ \frac{dy}{dx} + 2y = e^{-x}, \quad y(0)=1. \]
Solution: We start with the differential equation \[ \frac{dy}{dx} + 2y = e^{-x}. \] This is a first-order linear equation, so we first compute the integrating factor: \[ \mu(x) = e^{\int 2\,dx} = e^{2x}. \] Multiplying through by \(\mu(x)\) gives \[ e^{2x}\frac{dy}{dx} + 2e^{2x}y = e^{2x}e^{-x} = e^{x}. \] Notice that the left-hand side is the derivative of \(e^{2x}y\): \[ \frac{d}{dx}\Bigl(e^{2x}y\Bigr) = e^{x}. \] Integrate both sides with respect to \(x\): \[ e^{2x}y = \int e^{x}\,dx = e^{x} + C. \] Thus, \[ y(x) = e^{-2x}\Bigl(e^{x} + C\Bigr) = e^{-x} + C e^{-2x}. \] Applying the initial condition \(y(0)=1\) we obtain: \[ 1 = e^0 + C e^0 = 1 + C, \] so that \(C = 0\). Hence, the solution is: \[ \textcolor{blue}{\boxed{y(x) = e^{-x}.}} \]