Given the equation:
$$- \frac{x + 3 y{\left(x \right)}}{3 x + y{\left(x \right)}} + \frac{d}{d x} y{\left(x \right)} = 0$$
Do replacement
$$u{\left(x \right)} = \frac{y{\left(x \right)}}{x}$$
and because
$$y{\left(x \right)} = x u{\left(x \right)}$$
then
$$\frac{d}{d x} y{\left(x \right)} = x \frac{d}{d x} u{\left(x \right)} + u{\left(x \right)}$$
substitute
$$- \frac{3 x u{\left(x \right)}}{x u{\left(x \right)} + 3 x} - \frac{x}{x u{\left(x \right)} + 3 x} + \frac{d}{d x} x u{\left(x \right)} = 0$$
or
$$x \frac{d}{d x} u{\left(x \right)} - \frac{3 x u{\left(x \right)}}{x u{\left(x \right)} + 3 x} - \frac{x}{x u{\left(x \right)} + 3 x} + u{\left(x \right)} = 0$$
This differential equation has the form:
f1(x)*g1(u)*u' = f2(x)*g2(u),
where
$$\operatorname{f_{1}}{\left(x \right)} = 1$$
$$\operatorname{g_{1}}{\left(u \right)} = 1$$
$$\operatorname{f_{2}}{\left(x \right)} = - \frac{1}{x}$$
$$\operatorname{g_{2}}{\left(u \right)} = - \frac{1 - u^{2}{\left(x \right)}}{u{\left(x \right)} + 3}$$
We give the equation to the form:
g1(u)/g2(u)*u'= f2(x)/f1(x).
Divide both parts of the equation by g2(u)
$$- \frac{1 - u^{2}{\left(x \right)}}{u{\left(x \right)} + 3}$$
we get
$$\frac{\left(u{\left(x \right)} + 3\right) \frac{d}{d x} u{\left(x \right)}}{u^{2}{\left(x \right)} - 1} = - \frac{1}{x}$$
We separated the variables x and u.
Now, multiply the both equation sides by dx,
then the equation will be the
$$\frac{dx \left(u{\left(x \right)} + 3\right) \frac{d}{d x} u{\left(x \right)}}{u^{2}{\left(x \right)} - 1} = - \frac{dx}{x}$$
or
$$\frac{du \left(u{\left(x \right)} + 3\right)}{u^{2}{\left(x \right)} - 1} = - \frac{dx}{x}$$
Take the integrals from the both equation sides:
- the integral of the left side by u,
- the integral of the right side by x.
$$\int \frac{u + 3}{u^{2} - 1}\, du = \int \left(- \frac{1}{x}\right)\, dx$$
Detailed solution of the integral with uDetailed solution of the integral with xTake this integrals
$$2 \log{\left(u - 1 \right)} - \log{\left(u + 1 \right)} = Const - \log{\left(x \right)}$$
Detailed solution of the equationWe get the simple equation with the unknown variable u.
(Const - it is a constant)
Solution is:
$$\operatorname{u_{1}} = u{\left(x \right)} = \frac{C_{1}}{2 x} + 1 - \frac{\sqrt{C_{1} \left(C_{1} + 8 x\right)}}{2 x}$$
$$\operatorname{u_{2}} = u{\left(x \right)} = \frac{C_{1}}{2 x} + 1 + \frac{\sqrt{C_{1} \left(C_{1} + 8 x\right)}}{2 x}$$
do backward replacement
$$y{\left(x \right)} = x u{\left(x \right)}$$
$$y1 = y(x) = x \left(\frac{C_{1}}{2 x} + 1 - \frac{\sqrt{C_{1} \left(C_{1} + 8 x\right)}}{2 x}\right)$$
$$y2 = y(x) = x \left(\frac{C_{1}}{2 x} + 1 + \frac{\sqrt{C_{1} \left(C_{1} + 8 x\right)}}{2 x}\right)$$