The solution of the differential equation \( \displaystyle\frac{dy}{dx}+y=1,y(1)=0 \) is
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → \( 1-x=\log_e|1-y| \)
The variables separate:
\( \displaystyle \frac{dy}{dx}=1-y \)
\( \displaystyle \frac{dy}{1-y}=dx \)
On integrating, a minus sign appears, since the derivative of 1 − y is −1:
\( \displaystyle -\log_e|1-y|=x+c \)
The initial condition x = 1, y = 0 gives
\( \displaystyle -\log_e 1=1+c \)
\( \displaystyle c=-1 \)
\( \displaystyle -\log_e|1-y|=x-1 \)
\( \displaystyle \log_e|1-y|=1-x \)
So the solution is \( 1-x=\log_e|1-y| \).
Why the other options are incorrect
Option (1) \( 1+x=\log_e|1-y| \) — Incorrect. Here the minus sign from \( \int\frac{dy}{1-y} \) is lost; at x = 1, y = 0 it gives 2 = 0, so it fails the initial condition.
Option (2) \( 1-x=\log_e|1+y| \) — Incorrect. It satisfies y(1) = 0, but differentiating gives \( -1=\frac{y'}{1+y} \), that is \( y'+y=-1 \), not 1.
Option (3) \( 1+x=\log_e|1+y| \) — Incorrect. At x = 1, y = 0 it gives 2 = 0, so it fails the initial condition.