Key idea: Take out the common factors of each bracket. When the equation has the form f(x)g(y)dy+p(x)q(y)dx=0, dividing by a suitable product separates the variables.
Step 1 — Factorise each bracket.
We take x2 out of the first bracket and y2 out of the second.
x2(1−y)dy+y2(1+x)dx=0
Step 2 — Separate the variables.
We divide every term by x2y2 (taking x=0 and y=0).
y21−ydy+x21+xdx=0
We split each fraction into two simple terms.
(y21−y1)dy+(x21+x1)dx=0
Step 3 — Integrate term by term.
We use ∫t21dt=−t1 and ∫t1dt=ln∣t∣.
−y1−ln∣y∣−x1+ln∣x∣=C
Step 4 — Write the answer neatly.
We combine the logarithms with ln∣x∣−ln∣y∣=lnyx and move the other terms to the right.
lnyx=x1+y1+C
Note: The function y=0 also satisfies the given equation; it was set aside when we divided by y2.
Therefore, the general solution is lnyx=x1+y1+C, where C is an arbitrary constant.