Problem 21
By using a suitable substitution, bring the equation…
By using a suitable substitution, bring the equation $e^y(y'+1)=1$ to a form with separated variables, and then integrate it, given $y(0)=\ln2$.
Explanation of Method
Expand and rearrange to isolate $e^y\,dy$ on one side, separate variables, integrate with $u=1-e^y$, and apply the initial condition.
Step 1: Rearrange and separate
\[e^yy'+e^y=1 \ \Longrightarrow\ e^yy'=1-e^y \ \Longrightarrow\ \frac{e^y}{1-e^y}\,dy=dx.\]
Step 2: Integrate
With $u=1-e^y$, $du=-e^y\,dy$, so $\displaystyle\int\frac{e^y}{1-e^y}\,dy=-\ln|1-e^y|$. Hence $-\ln|1-e^y|=x+C$, which rearranges to
\[e^y=1-Ce^{-x}.\]
Step 3: Apply the initial condition
With $y(0)=\ln2$: $2=1-C$, so $C=-1$, giving $e^y=1+e^{-x}$, i.e.
\[\boxed{\,y=\ln(1+e^{-x}).}\]
Result
Final answer:
\[\boxed{\,y=\ln\!\left(1+e^{-x}\right),\qquad x\in\mathbb{R}.}\]