Solve $(y+1)dx+(x+1)dy=0$ Solve $(y+1)dx+(x+1)dy=0$
$$\frac{dy}{y+1}=-\frac{dx}{x+1}$$
then we get $\ln|y+1|=-\ln|x+1|+c$
$$\ln(|(y+1)(x+1)|)=c$$
$$|(y+1)(x+1)|=e^c=c_1$$
but answer is $y+1=\frac{c}{x+1}$ can you help to find where is my mistake?

The equation can be properly written as $y(x)+1+(x+1)y'(x)=0,$ which suggests the substitution $z(x)=(x+1)[y(x)+1].$ Hence $z'(x)=y(x)+1+(x+1)y'(x),$ implying $z'(x)=0.$ Since $y$ need not be differentiable at $-1$ to satisfy the equation everywhere else, we account for this, so we have that $(x+1)[y(x)+1]=A$ for every $x\lt-1,$ and $(x+1)[y(x)+1]=B$ for every $x\gt-1.$ $A$ and $B$ need not be equal. As such, $y(x)=\frac{A}{x+1}-1$ for every $x\lt-1$ and $y(x)=\frac{B}{x+1}-1$ for every $x\gt-1.$
In your case, you did this instead by writing the equation as $\frac{y'(x)}{y(x)+1}=-\frac{1}{x+1},$ which ignores the solution $y(x)=-1.$ Once you antidifferentiated, you wrote $\ln|y(x)+1|=-\ln|x+1|+c,$ but a more careful way to antidifferentiate is to use different constants of antidifferentiation in different intervals. In other words: $\ln(-(y(x)+1))=-\ln(-(x+1))+A$ for $y(x)\lt-1,x\lt-1,$ $\ln(-(y(x)+1))=-\ln(x+1)+B$ for $y(x)\lt-1,x\gt-1,$ $\ln(y(x)+1)=-\ln(-(x+1))+C$ for $y(x)\gt-1,x\lt-1,$ $\ln(y(x)+1)=-\ln(x+1)+D$ for $y(x)\gt-1,x\gt-1.$ Respectively, this simplifies to $$y(x)+1=\frac{\exp(A)}{x+1},$$ $$y(x)+1=-\frac{\exp(B)}{x+1},$$ $$y(x)+1=-\frac{\exp(C)}{x+1},$$ $$y(x)+1=\frac{\exp(D)}{x+1}.$$ This can be simplified to the answer I gave, provided that you include $y(x)=-1$ by allowing the constants to be $0.$
