Question:

Solve the differential equation \( \frac{dy}{dx} + y = 1 \) (\( y \neq 1 \)).

Show Hint

When solving linear first-order differential equations, separate variables, integrate, and then solve for the dependent variable.
Updated On: Feb 27, 2025
Hide Solution
collegedunia
Verified By Collegedunia

Solution and Explanation

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 \]

Was this answer helpful?
0
0