# solve the differential equation : $(x^2+xy)\frac{dy}{dx}-(3xy+y^2)=0$

$(x^2+xy)\displaystyle\frac{dy}{dx}-(3xy+y^2)=0$

Here is my idea , $\displaystyle\frac{dy}{dx}=\displaystyle\frac{y}{x}-\displaystyle\frac{2x}{x+y}+2$

Let $t=\displaystyle\frac{y}{x}$ , then

$RHS=t-\displaystyle\frac{2}{1+t}+2$

But I don't know how to do the LHS

Is that a right way to solve this question??

If the idea is wrong , please teach me.

Thanks a lot

-

Let $t=\frac{y}{x}$. This implies that $y=tx$ and $\frac{dy}{dx}=t+x\frac{dt}{dx}$. Substitute these into the differential equation, we have $$(x^2+tx^2)\left(t+x\frac{dt}{dx}\right)-(3tx^2+t^2x^2)=0.$$ Divide the whole equation by $x^2$, we have $$(1+t)\left(t+x\frac{dt}{dx}\right)-(3t+t^2)=0$$ or $$x\frac{dt}{dx}=\frac{3t+t^2}{1+t}-t$$ which can be solved by separation of variables.

-
thanks for your help!! I get the answer now^^ –  cwk709394 Dec 21 '12 at 2:09
To finish, $\log{x^2} = t + \log{t} + C$, so you have to solve a transcendental equation to compute the function $y(x)$. –  Ron Gordon Dec 21 '12 at 2:12
yes , I apply the Lambert W function^^ –  cwk709394 Dec 21 '12 at 3:12

A related problem. Your approach is correct. Here is how to find LHS

$$y = tx \implies \frac{dy}{dx} = x \frac{dt}{dx}+t.$$

-
thanks for your help!! I get the answer now^^ –  cwk709394 Dec 21 '12 at 2:10
@cwk709394: You are welcome. –  Mhenni Benghorbal Dec 21 '12 at 2:28