Solution (source code)

= Solution

For this <homogeneous tangent differential equation>, set $u=y/x$ on an interval not containing $x=0$. Since $y'=u+xu'$, cancellation gives $xu'=2\tan u$. Away from zeros of $\tan u$, separation and <integration> give
$$
\int\cot u\,du=2\int\frac{dx}{x},\qquad
\log|\sin u|=2\log|x|+C_0.
$$
Restoring a signed constant yields the compact implicit solution
$$
\boxed{\sin(y/x)=Cx^2.}
$$
A complete real branch description is
$$
\boxed{y=x\left[k\pi+(-1)^k\arcsin(Cx^2)\right],\qquad k\in\mathbb Z.}
$$
Here $C$ is real and the interval must satisfy $x\ne0$ and $|Cx^2|<1$. The strict inequality excludes points with $\cos(y/x)=0$, where the original <tangent function> is undefined. Separating divided by $\tan u$, so its zeros must be checked separately: $u=k\pi$ gives $y=k\pi x$. These are exactly the $C=0$ branches already included. The branch integer is fixed on each connected solution interval; it cannot be changed arbitrarily at a regular point.