2.28   ODE No. 28

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

x3(y(x))+y(x)+xy(x)22x=0 Mathematica : cpu = 0.102271 (sec), leaf count = 96

{{y(x)c1ex44x3+12πex44x3erf(x22)+xx(c1ex44+12πex44erf(x22))}} Maple : cpu = 0.073 (sec), leaf count = 51

{y(x)=1π(Erf(x22)π_C1x2+x2π+2e1/4x4_C1)(Erf(x22)_C1+1)1}

Hand solution

yyx3+xy22x=0y=2x+yx3xy2(1)=P(x)+Q(x)y+R(x)y2

This is Riccati first order non-linear ODE with P(x)=2x,Q(x)=x3,R(x)=x. We can convert Riccati to Bernoulli which is easier to solve using the substitution u=x2y or y=x2uu=2xy=2x(2x+yx3xy2)=2x(2x+(x2u)x3x(x2u)2)=2x(2x+(x5ux3)x(x4+u22x2u))u=2x(2x+(x5ux3)(x5+xu22x3u))=2x2x(x5ux3)+(x5+xu22x3u)=x5+ux3+x5+xu22x3u=ux3+xu2

This is of the form u=P(x)+Q(x)u+R(x)u2 and since P(x)=0 then it is Bernoulli differential equation. (when P(x)0 and R(x)0 it is Riccati). To solve Bernoulli we always start by dividing by u2uu2=1ux3+x Then we let ζ=1u, hence ζ=uu2, therefore the above becomesζ=x3ζ+xζx3ζ=x

Integrating factor is ex3dx=ex44, hence d(ex44ζ)=xex44 Integrating both sides givesex44ζ=xex44dx+C xex44dx=π2erf(x22), hence from aboveex44ζ=π2erf(x22)+Cζ=ex44(π2erf(x22)+C)

Since ζ=1u thenu=ex44(π2erf(x22)+C)1

And since y=x2u theny=x2+ex44(π2erf(x22)+C)1=x2+ex44π2erf(x22)+C

Verification

eq:=diff(y(x),x)+x*y(x)^2-x^3*y(x)-2*x = 0; 
sol:=x^2+ exp(-x^4/4)/(_C1+ sqrt(Pi)/2*erf(x^2/2)); 
odetest(y(x)=sol,eq); 
0