<s>[INST] Exact Diff. Equation $ \frac{d y}{d x}=\frac{x y^{2}-\cos x \sin x}{y\left(1-x^{2}\right)} $ Solve:$$
\frac{d y}{d x}=\frac{x y^{2}-\cos x \sin x}{y\left(1-x^{2}\right)}.$$
$${(xy^2 -\cos x\sin x)dx+y(1-x^2)dy=0}.$$
So the first term, $(xy^2 -\cos x\sin x)dx$ is $=M(x,y)$  and the second, $ y(1-x^{2} )dy$ term is $=N(x,y)$.
If $
\frac {\partial {M}}{\partial y}=-2xy$ ;   $\frac {\partial N}{\partial x}=-2xy$ there is an exact solution
$$ f(x,y)=\int M(x,y)dx +g(x) = \frac{x^2y^2}{2}+\frac{cos^2x}{2}+g(x)$$
$$\frac{\partial f}{\partial y}=N(x,y)=y(1-x^2)$$
$$f(x,y)=\frac{y^2}{2}(1-x^2)+g(x)$$
$$\frac{\partial f}{\partial x}=-xy^2+g'(x)=-xy^2-\cos x\sin x; g'(x)=-\cos x \sin x$$
$$g(x)= \int -\cos x\sin x dx =-\frac{cos^2x}{2} $$
$$f(x,y) = -\frac{cos^2x}{2} + \frac{y^2(1-x^2)}{2}$$
Am I using the terms properly and is my solution correct?
 [/INST] $$\frac{d y}{d x}=\frac{x y^{2}-\cos x \sin x}{y\left(1-x^{2}\right)}.$$
$$y(1-x^2){d y}=x y^{2}dx-\cos x \sin xdx$$
$$dy^2-2x^2yd y-2xy^2dx=2\cos x d\cos x$$
$$dy^2-(x^2d y^2+y^2dx^2)=2\cos x d\cos x$$
$$y^2-x^2 y^2-\cos^2 x =C$$
Your solution looks correct to me.
</s>