Question:
$\left(x+3 y^{2}\right) \frac{d y}{d x}=y(y>0)$
Solution:
$\left(x+3 y^{2}\right) \frac{d y}{d x}=y$
$\Rightarrow \frac{d y}{d x}=\frac{y}{x+3 y^{2}}$
$\Rightarrow \frac{d x}{d y}=\frac{x+3 y^{2}}{y}=\frac{x}{y}+3 y$
$\Rightarrow \frac{d x}{d y}-\frac{x}{y}=3 y$
This is a linear differential equation of the form:
$\frac{d x}{d y}+p x=Q$ (where $p=-\frac{1}{y}$ and $Q=3 y$ )
The general solution of the given differential equation is given by the relation,
$x($ I.F. $)=\int($ Q $\times$ I.F. $) d y+\mathrm{C}$
$\Rightarrow x \times \frac{1}{y}=\int\left(3 y \times \frac{1}{y}\right) d y+\mathrm{C}$
$\Rightarrow \frac{x}{y}=3 y+\mathrm{C}$
$\Rightarrow x=3 y^{2}+\mathrm{C} y$