$\displaystyle \begin{align*}(1+x^2)\frac{dy}{dx}&=x(1-y)\\\int \frac{dy}{1-y}&=\int \frac{xdx}{1+x^2}\\-ln(1-y)&=\frac{1}{2}\ln(1+x^2)+c\end{align*}$

I saw this working recently and I was hoping someone might be able to help me to understand/accept it better.

It is the integrating that is upsetting me because one side is integrated with respect to x and the other with respect to y.

why is this allowed?

Please help me to understand.