TITLE: solving $x\,dx + xy^2\,dx + y\,dy + yx^2\,dy=0$
QUESTION [5 upvotes]: I have to solve $x\,dx + xy^2\,dx + y\,dy + yx^2\,dy=0$
Dividing by $dx$ we have
$x + xy^2 + yy' + yy'x^2=0$
From where,
$$\frac{yy'}{1+y^2}+\frac{x}{1+x^2}=\frac{y\,dy}{1+y^2}+\frac{x\,dx}{1+x^2}=\\ =\frac{d(y^2+1)}{1+y^2}+\frac{d(x^2+1)}{1+x^2}= \frac{1}{2}d\ln(1+y^2)+\frac{1}{2} d\ln(1+x^2)=\frac{1}{2}d\ln(1+y^2)(1+x^2)=0$$
Let $c=(1+y^2)(1+x^2)$, so our equation becomes:
$$
d\ln c=0
$$
So what should I do here, should I integrate, or should I divide by $dx$?
If I divide by dx I get the expression $2x+2yy'+2xy^2+2x^2yy'=0$ which has $x$, $y$ and $y'$ and doesn't help me get anywhere.
Thanks in advance.

REPLY [2 votes]: $$x\,dx + xy^2\,dx + y\,dy + yx^2\,dy=0$$
$$(1+x^2)y\,dy =-(1+y^2)x\,dx $$
If $x^2,y^2\ne-1$, above equation can be written as (after multiplying both side by $2$):
$$\frac{2y}{1+y^2}\,dy =-\frac{2x}{1+x^2}\,dx $$
$$\int \frac{2y}{1+y^2}\,dy =-\int \frac{2x}{1+x^2}\,dx $$
$$\ln (1+y^2)=-\ln (1+x^2)+\ln c=\ln \frac {c}{1+x^2}$$
where $c$ is a constant. Hence,
$$1+y^2= \frac {c}{1+x^2}$$
$$y^2= \frac {c}{1+x^2}-1$$ Or:
$$y^2+x^2+y^2x^2= C$$ where $C$ is also a constant.