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?

You properly arrived to $$x \frac{du}{dx}=\sin(u)$$ which is effectively separable and gives $$\frac{dx}x=\frac{du}{\sin(u)}$$ So  $$\int\frac{dx}x=\int\frac{du}{\sin(u)}$$ The lhs does not make any problem; for the rhs, use the tangent half-angle substitution $t=\tan(\frac u 2)$ to get $$\int\frac{du}{\sin(u)}=\int\frac{dt}{t}$$ So, $$\log(x)+a=\log(t)=\log(cx)$$ $$t=cx=\tan(\frac u 2)$$ $$u=2 \tan^{-1}(cx)$$ $$y=ux=2\, x\,\tan^{-1}(cx)$$
