2.2.20 Problem 19

Solved as second order Airy ode
Maple
Mathematica
Sympy

Internal problem ID [8823]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 19
Date solved : Friday, April 25, 2025 at 05:12:29 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

Solved as second order Airy ode

Time used: 1.212 (sec)

Solve

yyxyx3+1=0

This is Airy ODE. It has the general form

ay+by+cxy=F(x)

Where in this case

a=1b=1c=1F=x31

Therefore the solution to the homogeneous Airy ODE becomes

y=c1ex2AiryAi((x14)(1)1/3)+c2ex2AiryBi((x14)(1)1/3)

Since this is inhomogeneous Airy ODE, then we need to find the particular solution. The particular solution yp can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on x as well. Let

(1)yp(x)=u1y1+u2y2

Where u1,u2 to be determined, and y1,y2 are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as

y1=ex2AiryAi((x14)(1)1/3)y2=ex2AiryBi((x14)(1)1/3)

In the Variation of parameters u1,u2 are found using

(2)u1=y2f(x)aW(x)(3)u2=y1f(x)aW(x)

Where W(x) is the Wronskian and a is the coefficient in front of y in the given ODE. The Wronskian is given by W=|y1y2y1y2|. Hence

W=|ex2AiryAi((x14)(1)1/3)ex2AiryBi((x14)(1)1/3)ddx(ex2AiryAi((x14)(1)1/3))ddx(ex2AiryBi((x14)(1)1/3))|

Which gives

W=|ex2AiryAi((x14)(1)1/3)ex2AiryBi((x14)(1)1/3)ex2AiryAi((x14)(1)1/3)2ex2(1)1/3AiryAi(1,(x14)(1)1/3)ex2AiryBi((x14)(1)1/3)2ex2(1)1/3AiryBi(1,(x14)(1)1/3)|

Therefore

W=(ex2AiryAi((x14)(1)1/3))(ex2AiryBi((x14)(1)1/3)2ex2(1)1/3AiryBi(1,(x14)(1)1/3))(ex2AiryBi((x14)(1)1/3))(ex2AiryAi((x14)(1)1/3)2ex2(1)1/3AiryAi(1,(x14)(1)1/3))

Which simplifies to

W=exAiryAi((4x+1)(1)1/34)(1)1/3AiryBi(1,(4x+1)(1)1/34)+exAiryBi((4x+1)(1)1/34)(1)1/3AiryAi(1,(4x+1)(1)1/34)

Which simplifies to

W=ex(1+i3)2π

Therefore Eq. (2) becomes

u1=ex2AiryBi((x14)(1)1/3)(x31)ex(1+i3)2πdx

Which simplifies to

u1=(2x3+2)πex2AiryBi((x+14)(1+i3)2)1+i3dx

Hence

u1=0x(2α3+2)πeα2AiryBi((α+14)(1+i3)2)1+i3dα

And Eq. (3) becomes

u2=ex2AiryAi((x14)(1)1/3)(x31)ex(1+i3)2πdx

Which simplifies to

u2=(2x3+2)πex2AiryAi((x+14)(1+i3)2)1+i3dx

Hence

u2=0x(2α3+2)πeα2AiryAi((α+14)(1+i3)2)1+i3dα

Therefore the particular solution, from equation (1) is

yp(x)=0x(2α3+2)πeα2AiryBi((α+14)(1+i3)2)1+i3dαex2AiryAi((x14)(1)1/3)+ex2AiryBi((x14)(1)1/3)0x(2α3+2)πeα2AiryAi((α+14)(1+i3)2)1+i3dα

Which simplifies to

yp(x)=2ex2π(0x(α31)eα2AiryBi((α+14)(1+i3)2)dαAiryAi((x+14)(1+i3)2)AiryBi((x+14)(1+i3)2)0x(α31)eα2AiryAi((α+14)(1+i3)2)dα)1+i3

Therefore the general solution is

y=yh+yp=(c1ex2AiryAi((x14)(1)1/3)+c2ex2AiryBi((x14)(1)1/3))+(2ex2π(0x(α31)eα2AiryBi((α+14)(1+i3)2)dαAiryAi((x+14)(1+i3)2)AiryBi((x+14)(1+i3)2)0x(α31)eα2AiryAi((α+14)(1+i3)2)dα)1+i3)=c1ex2AiryAi((x14)(1)1/3)+c2ex2AiryBi((x14)(1)1/3)+2ex2π(0x(α31)eα2AiryBi((α+14)(1+i3)2)dαAiryAi((x+14)(1+i3)2)AiryBi((x+14)(1+i3)2)0x(α31)eα2AiryAi((α+14)(1+i3)2)dα)1+i3

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1ex2AiryAi((x14)(1)1/3)+c2ex2AiryBi((x14)(1)1/3)+2ex2π(0x(α31)eα2AiryBi((α+14)(1+i3)2)dαAiryAi((x+14)(1+i3)2)AiryBi((x+14)(1+i3)2)0x(α31)eα2AiryAi((α+14)(1+i3)2)dα)1+i3

Maple. Time used: 0.025 (sec). Leaf size: 67
ode:=diff(diff(y(x),x),x)-diff(y(x),x)-x*y(x)-x^3+1 = 0; 
dsolve(ode,y(x), singsol=all);
 
y=ex2(πex2AiryBi(14+x)(x31)dxAiryAi(14+x)+πex2AiryAi(14+x)(x31)dxAiryBi(14+x)+AiryBi(14+x)c1+AiryAi(14+x)c2)

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
trying differential order: 2; linear nonhomogeneous with symmetry [0,1] 
trying a double symmetry of the form [xi=0, eta=F(x)] 
-> Try solving first the homogeneous part of the ODE 
   checking if the LODE has constant coefficients 
   checking if the LODE is of Euler type 
   trying a symmetry of the form [xi=0, eta=F(x)] 
   checking if the LODE is missing y 
   -> Trying a Liouvillian solution using Kovacics algorithm 
   <- No Liouvillian solutions exists 
   -> Trying a solution in terms of special functions: 
      -> Bessel 
      <- Bessel successful 
   <- special function solution successful 
<- solving first the homogeneous part of the ODE successful
 

Mathematica. Time used: 3.812 (sec). Leaf size: 107
ode=D[y[x],{x,2}]-D[y[x],x]-x*y[x]-x^3+1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)ex/2(AiryAi(x+14)1xeK[1]2πAiryBi(K[1]+14)(K[1]31)dK[1]+AiryBi(x+14)1xeK[2]2πAiryAi(K[2]+14)(K[2]31)dK[2]+c1AiryAi(x+14)+c2AiryBi(x+14))
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - x*y(x) - Derivative(y(x), x) + Derivative(y(x), (x, 2)) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE x**3 + x*y(x) + Derivative(y(x), x) - Derivative(y(x), (x, 2)) - 1 cannot be solved by the factorable group method