Step 1: Identify the form of differential equation
The given equation is:
\[
y \, dx + (x - y^2) \, dy = 0
\]
This can be written as:
\[
y \, dx + x \, dy - y^2 \, dy = 0
\]
Step 2: Rearrange terms
\[
y \, dx + x \, dy = y^2 \, dy
\]
Step 3: Recognize the left-hand side
The left-hand side \( y \, dx + x \, dy \) is the differential of \( xy \):
\[
d(xy) = x \, dy + y \, dx
\]
Therefore:
\[
d(xy) = y^2 \, dy
\]
Step 4: Integrate both sides
\[
\int d(xy) = \int y^2 \, dy
\]
\[
xy = \frac{y^3}{3} + C
\]
where \( C \) is an arbitrary constant.
Step 5: Write the general solution
\[
\boxed{xy = \frac{y^3}{3} + C}
\]
or equivalently:
\[
xy - \frac{y^3}{3} = C
\]
Alternative form:
\[
3xy - y^3 = 3C \quad \text{(multiplying both sides by 3)}
\]
Let \( K = 3C \), then:
\[
3xy - y^3 = K
\]