Solve a differential equation $(x+y^2)dy=ydx$

calculusderivativesordinary differential equations

Find a solution to the differential equation:
$$
(x+y^2)dy=ydx
$$

I tried to express $y'$ in terms of $x$ and $y$ to see what type of the differential equation it is.
$$
y'=\frac{y}{x+y^2}
$$

It became clear that I can't represent $y'$ as a product of $p(x)$ and $q(x)$.
And it doesn't seem to be homogeneous. Then I checked whether it is exact:
$$
(x+y^2)'_x=1\ne(-y)'_y=-1
$$

And it tuned out that the differential equation is not exact either.

I do not know all the types of differential equations yet, so I would appreciate if someone showed me how to solve this one.

Best Answer

$$ydx-xdy=y^2dy\Rightarrow \frac{ydx-xdy}{y^2}=dy$$

$$\Longrightarrow d\bigg(\frac{x}{y}\bigg)=d(y)$$

Integrate both Side, Getting $$\frac{x}{y}=y+C\Rightarrow x=y^2+Cy$$

Related Question