G Zill, Dennis, Differential Equations with Boundary-Value Problems, 7th edition, p. 46:
Example 1:
Solve $(1+x)\mathrm dy-y\mathrm dx=0.$
$$\frac{\mathrm dy}{\mathrm dx}=\frac{y}{1+x}\\\cdots\\\cdots$$
From $$\ln|y|=\ln|c(1+x)| \tag{1}$$ we immediately get
$$y=c(1+x)\tag{2}$$
Given that $x,y\in\mathbb{R}$ and $|x|=|y|,$ I don't think we can say that $x=y.$ Why did the author go from $(1)$ to $(2)$ ? Is that step mathematically rigorous?
EDIT
Follow-up question: How to solve for $y$ in $(1+x)dy-ydx=0$?
$y=\pm c(1+x)$. But, as solution of the DE, $y$ is a differentiable function. This forces $y$ to be $ c(1+x)$ for all $x$ or $- c(1+x)$ for all $x$. In the second case, the minus sign can be absorbed inside the constant $c$.