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?
 A: i don't think you made a mistake. continuing from where you stopped,
if $(y+1)(x+1)>0$ , then $y+1=\frac{c_1}{x+1}$.
otherwise if $(y+1)(x+1)<0$ , then $y+1=-\frac{c_1}{x+1}$.
A: $(y+1)dx+(x+1)dy=0$
$M(x, y) =y+1$
$N(x, y) =x+1$
Then, $\frac {\partial M}{\partial y}=1=\frac {\partial N}{\partial x}$
Hence, the differential equation is exact.
Choose, $u(x, y) $ be such that
$u_x =M $ and $u_y =N$
Then, $u(x, y) =\int {M {dx}}=x(y+1)+h(y) $
$u_y (x, y)=x+h'(y) $
$x+h'(y)=x+1 $
$h(y) =y$
Hence, $u(x, y) =x(y+1)+y $
Solution : $u(x, y) =C$
$\implies x(y+1)+y =C$
$\implies x(y+1)+y+1 =C+1$
$ (y+1)(x+1 )=c \space \space  [c=C+1]$
Hence, $(y+1)=\frac{c}{(x+1)}$
Note:
\begin{align} \frac {d}{dx}{u(x, y(x))} &=u_x + u_y \frac {dy}{dx}\\&=M+N \frac {dy}{dx} =0 \end{align}
Hence,$ u(x, y) =C$
A: Simpler:
$(y+1)dx + (x+1)dy = 0$
$ydx + xdy = -(dx+dy)$
$d(xy) = d(-(x+y))$
$xy = -(x+y) + c$
$xy + x + y = c$, which is equivalent to your given answer.
A: 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.$
