I have attempted the question several times so far, and I have always reached the same answer that differs from the solution, any advice would help greatly!
My attempt
$$\frac{dy}{e^y} = e^x dx$$
Taking the integral, I got $$-e^{-y} = e^x + C.$$
Solving for $y$, I got $$y=-\ln(C-e^x).$$
After subbing in $y(0)=0$, I got $$0=-\ln(C-1)$$ and solving for $C$, I got $$C=2.$$
Thus, I got $$y=-\ln(2-e^x).$$ However, the solutions have $y=-\ln(1-e^x)$ as the answer. Have I done something wrong? Thanks in advance!
You are correct, and their solution is wrong. Their solution indeed satisfies the differential equation - however, ${y(0)}$ for their solution ${\neq 0}$. In fact, ${y(x=0)}$ doesn't even exist for their solution, since the function blows up to infinity