Help needed for solving differential equation I need help with solving this differential equation taken from Ordinary Differential Equations by Tenenbaum and Pollard.
$$ xy'-y-x\sin(y/x)=0 $$
I used the subsitution, $u=y/x$ to obtain,
$$x^2\,du-x\sin(u)\,dx=0$$
$$\csc(u)\,du-\frac{1}{x}\,dx=0$$
Then by integrating,
$$\ln|\csc(u)+\cot(u)|+\ln|x|=C$$
$$|\csc u+\cot u||x|=D$$
and rewriting $u$,
$$\left|\frac{1+\cos (y/x)}{\sin (y/x)}\right||x|=D\quad (x\neq0\,,\frac{y}{x}\neq \pm n\pi)$$
However, the provided solution is $y=2x\arctan cx$.  How do I transform the solution I obtained, and how do I deal with the absolute values?

The next step is
$$\frac{1+\cos(u)}{\sin(u)}=\frac{2\cos^2(\frac u2)}{2\sin(\frac u2)\cos(\frac u2)}=\cot(\frac u2).$$
