How does one solve the differential equation $y'=\frac {y} {3x-y} $ ? I need to find a solution to the differential following equation:
$y'=\frac {y} {3x-y} $.
I tried to use use some kind of substitution, but I didn't manage to solve it.
Any suggestion\help?
Thanks a lot!
 A: Hint: Try $y=zx$. That will let you separate variables.
A: We can transform this equation to linear differential equation.
$ \frac{dx}{dy}= \frac{3x}{y}-1 $ 
And integrating factor $\lambda=e^{{\int{\frac{-3}{y}dy}}}=y^{-3}$.
Then $ x=\frac{\int(-1)y^{-3}dy}{y^{-3}}$. Therefore $x=cy^{3}+\frac{y}{2}$.
A: I followed $y=z.x$ transform  and I got easily the general solution : $cy^3+y=2x$
$3cy^2y'+y'=2$
$(3cy^3+y)y'=2y$
$(3.(2x-y)+y)y'=2y$
$(6x-2y)y'=2y$
$(3x-y)y'=y$
$y'=\frac{y}{3x-y}$
If you cannot manage the y=z.x transform ,let me know.
A: $$ y' = \frac{y}{3x - y} = \frac{1}{\frac{3x}{y} - 1} $$
$$ \frac{y}{x} = v \Rightarrow y = vx \Rightarrow \frac{dy}{dx} = x \frac{dv}{dx} + v $$
$$ x \frac{dv}{dx} + v = \frac{1}{\frac{3}{v} - 1}  = \frac{v}{3 - v} $$
$$ x \frac{dv}{dx} = \frac{v}{3-v} - v = \frac{v(v-2)}{3-v} $$
$$ \frac{(3-v)dv}{v(v-2)} = \frac{dx}{x} $$
$$ \Rightarrow \int  \frac{(3-v)}{v(v-2)} \ dv = \int \frac{dx}{x}  = \ln x + c $$
$$ \frac{(3-v)}{v(v-2)} = \frac{A}{v} + \frac{B}{v-2} $$
$$ \Rightarrow A(v-2)  + Bv = 3 - v $$
$$ v = 2  \Rightarrow B = \frac{1}{2} $$
$$ v = 0 \Rightarrow A = -\frac{3}{2} $$
$$ \Rightarrow \int \frac{(3-v)}{v(v-2)} \ dv  = -\frac{3}{2} \int \frac{1}{v} \ dv + \frac{1}{2} \int \frac{1}{v-2} \ dv   = \frac{1}{2} \ln(v-2) - \frac{3}{2} \ln v = \ln x + c $$
$$ v = \frac{y}{x} \Rightarrow \frac{1}{2} \ln \left(\frac{y}{x}-2 \right) - \frac{3}{2} (\ln y - \ln x) = \ln x + c $$
