2.101   ODE No. 101

  1. Problem in Latex
  2. Mathematica input
  3. Maple input

xy(x)+xy(x)2y(x)=0 Mathematica : cpu = 0.0719045 (sec), leaf count = 18

{{y(x)2xx2+2c1}} Maple : cpu = 0.01 (sec), leaf count = 16

{y(x)=2xx2+2_C1}

Hand solution

xy+xy2y=0(1)y=1xyy2

This is of the form y=f0+f1y+f2y2 with f0=0,f1=1x,f2=1. Since f0=0 this is Bernoulli differential equation. We always start by dividing by y2yy2=1x1y1 Then u=1y or y=1u, therefore y=uu2. Equating this to RHS of (1) givesuu2u2=1xu1u=ux1u+ux=1

Integrating factor is e1xdx=x and the above becomesd(xu)=x Integratingxu=x22+Cu=x2+Cx=x2+2C2x

Hence y=1u=2xx2+2C

Verification

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