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| \).