# Find the general integral of the ODE $xy'^2+2xy'-y=0$

I have to find the general integral of the following ODE $$xy'^2+2xy'-y=0$$ The book says that, integrating w.r.t. $$y'$$, we get two homogeneous equations $$y'=-1+\sqrt{1+\frac{y}{x}},\qquad y'=-1-\sqrt{1+\frac{y}{x}}$$ defined for $$x(x+y)>0$$. Until this point all is clear. Now it says that the general integrals of such homogeneous equations are $$\left(\sqrt{1+\frac{y}{x}}-1\right)^2=\frac{C}{x},\qquad \left(\sqrt{1+\frac{y}{x}}+1\right)^2=\frac{C}{x}.$$ I do not understand how the book deduces such general integrals. Can someone help me?

Thank You

• What book are you reading? – user587192 Dec 15 '18 at 14:44
• @user587192 Cecconi, Stampacchia - Mathematical Analysis 2 (it is an italian book) – Jeji Dec 15 '18 at 16:30

Hint. Let $$u(x):=\sqrt{1+\frac{y(x)}{x}}>0$$ then $$y(x)=xu^2(x)-x$$ and $$y'(x)=u^2(x)+2xu'(x)u(x)-1.$$ Hence $$y'(x)=-1\pm\sqrt{1+\frac{y(x)}{x}}$$ becomes $$u^2(x)+2xu'(x)u(x)-1=-1\pm u(x)$$ that is $$u^2(x)+2xu'(x)u(x)=\pm u(x)$$ or $$u(x)+2xu'(x)=\pm 1$$ which is a linear ODE of first order. Can you take it from here?
Substitute $$y(x)=xv(x)$$ then we get $$x\left(x\frac{dv(x)}{dx}+v(x)\right)^2+2x\left(x\frac{dv(x)}{dx}+v(x)\right)-xv(x)=0$$ and we get $$\frac{dv(x)}{dx}=\frac{-x-\sqrt{x^2+x^2v(x)}-xv(x)}{x^2}$$ $$\frac{dv(x)}{dx}=\frac{-x+\sqrt{x^2+x^2v(x)}-xv(x)}{x^2}$$ Can you finish?
Set $$y=u-x$$, then $$y'=u'-1$$ and $$u=y+x=x(y'^2+2y'+1)=xu'^2\tag1$$ which has a derivative $$u'=u'^2+2xu'u''\implies u'(2xu''+u'-1)=0$$ Thus you get linear pieces $$u=C$$ and solutions of the linear ODE $$2xu''+u'=1$$. They can switch from one to the other where both factors are zero at the same time.
For $$x>0$$ the second equation solves as $$(\sqrt xu')'=\frac{2xu''+u'}{2\sqrt x}=\frac1{2\sqrt x}\implies \sqrt xu'=\sqrt{x}+C$$ and the original equation in form (1) gives $$u(x)=xu'^2=x+2C\sqrt x+C^2$$