I can solve the differential equation, which is $y + y^{2}/2 = \ln(x) + C$.
But I cannot solve the IVP because I can't isolate for $y$ and find the value of $C.$
I can solve the differential equation, which is $y + y^{2}/2 = \ln(x) + C$.
But I cannot solve the IVP because I can't isolate for $y$ and find the value of $C.$
Copyright © 2021 JogjaFile Inc.
We have (just reproducing your work for completeness, and combining some of the comment ideas): \begin{align*} xyy'+xy'&=1\\ xy'(y+1)&=1\\ (y+1)\,dy&=\frac{dx}{x}\\ \frac{y^2}{2}+y&=\ln(x)+C\\ 0&=\ln(1)+C\\ 0&=C\\ \frac{y^2}{2}+y&=\ln(x)\\ y^2+2y&=2\ln(x)\\ y^2+2y+1&=2\ln(x)+1\\ (y+1)^2&=2\ln(x)+1\\ y+1&=\pm\sqrt{2\ln(x)+1}\\ y&=-1\pm\sqrt{2\ln(x)+1}. \end{align*} But notice that we can't allow the negative square root, because it doesn't actually satisfy the initial condition. Also notice that we threw out the $\ln|x|$ for $\ln(x),$ because we knew the initial condition would be for positive $x.$ So the final solution is $$y=-1+\sqrt{2\ln(x)+1}. $$