2.109   ODE No. 109

xy(x)y(x)(2y(x)log(x)1)=0

Mathematica : cpu = 0.0574562 (sec), leaf count = 17

DSolve[-(y[x]*(-1 + 2*Log[x]*y[x])) + x*Derivative[1][y][x] == 0,y[x],x]
 
{{y(x)12log(x)+c1x+2}}

Maple : cpu = 0.013 (sec), leaf count = 15

dsolve(x*diff(y(x),x)-y(x)*(2*y(x)*ln(x)-1) = 0,y(x))
 
y(x)=12+xc1+2ln(x)

Hand solution

xy+axy2+2y+bx=0This is Riccati non-linear first order. Converting it to standard form

xyy(2ylnx1)=0xy=y(2ylnx1)(1)y=1xy+y22xlnxy=f0+f1y+f2y2

This is Bernoulli non-linear first order ODE since f0=0. Dividing by y2 gives

yy2=1x1y+2xlnx

Putting u=1y, hence u=yy2, and the above becomes

u=1xu+2lnxxu+1xu=2lnxxu1xu=2lnxx

Integrating factor is μ=e1xdx=elnx=1x, hence

d(μu)=2μlnxxd(1xu)=2lnxx2

Integrating

1xu=21x2lnxdx+C=2(lnxx1x)+C

Therefore

u=2x(lnxx1x)+Cx=2(lnx+1)+Cx

Since u=1y then

y=12(lnx+1)+Cx

Verification

restart; 
ode:=x*diff(y(x),x)-y(x)*(2*y(x)*ln(x)-1)=0; 
my_solution:=1/(2*(ln(x)+1)+_C1*x); 
odetest(y(x)=my_solution,ode); 
0