Can't figure this out: $dy/dx = \cos(y)\sin(x)$ Problem: Find the solution and domain of validity for the following differential equation:
$\dfrac{dy}{dx} = \cos(y) \cdot \sin(x)$
What I tried: I noticed that this is a separable equation, so I wrote it in the form: $\dfrac{1}{\cos(y)} \cdot dy = \sin(x) \cdot dx$
Next, I found out that if $\cos(y) = 0$ then $\dfrac{1}{\cos(y)}$ is undefined. So I separate into two following cases;
Case1: $\cos(y) \neq 0$;
Then $\int\dfrac{dy}{\cos(y)} = \int\sin(x)dx$. By solving these integrals I get that $\tan(y) \cdot \sec(y)+ c_0 = -\cos(x)$ which implies that
$\arccos(-\tan(y) \cdot \sec(y)+ c) = x$,   for $c=-c_0$ which is an arbitrary constant.
I wonder if this is a general solution.
Case2: $\cos(y)=0$;
This implies that $y\in \{ \mathbb{R} -\dfrac{(2k+1)\pi}2:k\in \mathbb{Z}\}$
Pick an arbitrary $y_0\in \{ \mathbb{R} -\dfrac{(2k+1)\pi}2:k\in \mathbb{Z}\}$, substituting this into the differential equation gives that;
$\dfrac {dy_0}{dx} = \cos(y_0)\cdot \sin(x)$.
I am pretty sure that $\cos(y_0) = 0$. But I do not know how can I show that $\dfrac {dy_0}{dx} = 0$ to find out if there is a singular/lost solution or not.
Moreover, I have been taught that $dx$ means derivative, for instance $x^2\cdot dx = 2x$. Then why can't we solve a separable differential equation just by taking derivative of both sides for instance in $\dfrac{1}{\cos(y)} \cdot dy = \sin(x) \cdot dx$

$$\int \frac{dy}{\cos y}=\int \sin x \,dx=-\cos x +C $$
Then for the integral on the LHS:
$$I=\int \frac{dy}{\cos y}=\int \frac{d \sin y}{\cos^2 y}$$
$$I=\int \frac{d \sin y}{1-\sin^2 y}=\int \frac{d u}{1-u^2}$$
$$I=\dfrac 12 \left (\int \frac{du }{u+1}-\int \frac{du}{u-1}\right )$$
$$ I=\dfrac 12 \ln \left |\dfrac {u+1}{u-1}\right |+C= \dfrac 12\ln \left |\dfrac {(u+1)^2}{u^2-1}\right |+C$$
Where $u =\sin y$.
$$ I= \ln \left |\dfrac {1+\sin y}{\cos y}\right |+C$$
You can also use this result:
$$ I=\dfrac 12 \ln \left |\dfrac {u+1}{u-1}\right |+C=\tanh^{-1} u+C$$
$$ \implies I=\tanh^{-1} ( \sin y)+C$$
So that we have:
$$\tanh^{-1} ( \sin y)=(C-\cos x)$$
$$ y(x)=\arcsin (\tanh(C-\cos x))$$
