Differential equation - $xy'=\sqrt{1-y^2}$ If $x\neq 0$ and $|y(x)|\neq 1$ then $$xy'=\sqrt{1-y^2}\iff \frac{y'}{\sqrt{1-y^2}}=\frac{1}{x}\iff \arcsin y=\ln |x|+C\iff y=\sin (\ln |x|+C)$$
what I am having trouble with is how to find the domains of the solutions.
Replacing on the initial equation I get $$xy'=\sqrt{1-y^2}\iff x\cos (\ln |x|+C)\frac{1}{x}=\sqrt {1-\sin^2(\ln |x|+C)}\iff \\\cos(\ln |x|+C)=\sqrt {\cos^2(\ln |x|+C)}$$
So I suppose I need $-\frac{\pi}{2}+2k\pi\leq \ln |x|+C\leq \frac{\pi}{2}+2k\pi$ for integers $k$ different from $0$.
But now I don't know which intervals I should choose for the solutions.
Are these the intervals $]-\frac{\pi}{2}+2k\pi-C, \frac{\pi}{2}+2k\pi +C[$ and $]-\frac{\pi}{2}, 0[$ and $]0, \frac{\pi}{2}[$?
Is everything else correct?
What about solutions that might be $1$ or $-1$ sometimes, but not all the time?
How can I deal with this?
Thank you
 A: In my opinion it's easier to solve this for $x$ in terms of $y$. At the integration step, put the constant on the other side, so $\ln |x|=\arcsin(y)+c$. Exponentiate each side to get $|x|=e^{\arcsin(y)+c}$. Note that we may exclude $x=0$ which in the original differential equation just leads to the two isolated points $(0,\pm 1)$. For $x>0$ we then get $x=e^{\arcsin(y)+c}$ while for $x<0$ we have $x=-e^{\arcsin(y)+c}.$ 
In terms of a graph giving a sketch of the various solutions, if we place the $y$ axis horizontally, because of the $\arcsin(y)$ the whole region containing solutions will be between the vertical lines $y=-1$ and $y=1$, since we have $-1 \le y \le 1.$  The solutions will then be curves defined over (or under) the $y$ interval $[-1,1]$, and for various $c$ each curve begins (for $x>0$) above the left end $y=-1$ and increases to another greater value above the right end $y=1$. For $x<0$ the symmetric curves occur below the horizontal $x=0$ axis, decreasing as $y$ increases.
When I tried to do this in the standard way by solving for $y$ in terms of $x$, I was led to the same difficulty mentioned in the posted question about the fact that one needed a certain oscillating term to be nonnegative, making one think of restrictions to various subintervals. But looking at the sketch using $y$ as the independent variable makes me think there is not really such restriction involved.
ADDED: The OP has in a comment wished for $y$ in terms of $x$. There are the two constant solutions $y=1$ and $y=-1$. (Note there are none with $y$ sometimes $1$, sometimes $-1$, since these are not differentiable.)
At the step where the equation is divided by $x$ we must exclude $x=0$, so any domain intervals of solutions must be subsets of $(0,\infty)$ or of $(-\infty,0)$. Suppose first that $x>0$. At the step $\arcsin y= \ln x + C$ we need to restrict $x$ so that $\ln x+C$ is in the range of $\arcsin(y)$. This means we have
$$-\pi/2 \le \ln x + C \le \pi/2,\\ e^{-\pi/2}-C \le x \le e^{\pi/2}+C.$$
Note that any particular solution is associated to some fixed $C$, and the above inequality gives a single closed interval in which $x$ must lie, for that solution. Also note that the quantity $\cos(\ln x+C)$ is nonnegative as required by the OP's stage of the solution check, since $-\pi/2 \le \ln x+C \le \pi/2$ for the particular solution, and cosine is nonnegative on this interval.
Only minor modifications are needed to treat the case of $x<0$, in which $|x|=-x$ and inequalities get reeversed when things are described in terms of $x$.
