I've been given the following ODE and have to solve for the general solution: $$ \displaystyle \frac{dy}{dx} = y\cot x $$
I've looked at the solution, and it does the following:
$$ \int \frac{1}{y} \ dy = \int \cot x \ dx $$ $$ \ln y = \ln|\sin x| + c $$ $$\ln y = \ln|\sin x| + \ln c $$ $$ \ln y = \ln |c\sin x| $$ $$ y = c\sin x$$
I don't quite understand how they were able to convert $c$ into $\ln c $. Since $c$ is just a constant, it can very well be negative and the $\ln -ve$ is undefined.
I also don't understand why they were able to remove the absolute value sign?
When integration constants appear, their value remains undefined until you bring an extra condition. Until then, silently replacing the constant by a function of itself is harmless.
Like for instance
$$\log y=\log x+c$$ is often transformed into
$$y=cx$$
instead of
$$y=e^cx.$$