Step 1: Rearrange the equation: \[ \frac{dy}{dx} = 1 - y \]
Step 2: Separate variables: \[ \frac{dy}{1 - y} = dx \]
Step 3: Integrate both sides: \[ \int \frac{dy}{1 - y} = \int dx \] The left-hand side is \( -\ln|1 - y| \), and the right-hand side is \( x + C \).
Step 4: Solve for \( y \): \[ -\ln|1 - y| = x + C \quad \Rightarrow \quad |1 - y| = e^{-(x + C)} = Ae^{-x} \] Thus: \[ 1 - y = Ce^{-x} \] \[ y = Ce^{-x} + 1 \]