2.2.29 Problem 28

Solved as second order Airy ode
Solved as second order ode adjoint method
Maple
Mathematica
Sympy

Internal problem ID [8833]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 28
Date solved : Wednesday, March 05, 2025 at 06:52:31 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

Solve

yxyx3+2=0

Solved as second order Airy ode

Time used: 0.055 (sec)

This is Airy ODE. It has the general form

ay+by+cxy=F(x)

Where in this case

a=1b=0c=1F=x32

Therefore the solution to the homogeneous Airy ODE becomes

y=c1AiryAi(x(1)1/3)+c2AiryBi(x(1)1/3)

Since this is inhomogeneous Airy ODE, then we need to find the particular solution. The particular solution is now found using the method of undetermined coefficients. Looking at the RHS of the ode, which is

x3+1

Shows that the corresponding undetermined set of the basis functions (UC_set) for the trial solution is

[{1,x,x2,x3}]

While the set of the basis functions for the homogeneous solution found earlier is

{AiryAi(x(1)1/3),AiryBi(x(1)1/3)}

Since there is no duplication between the basis function in the UC_set and the basis functions of the homogeneous solution, the trial solution is a linear combination of all the basis in the UC_set.

yp=A4x3+A3x2+A2x+A1

The unknowns {A1,A2,A3,A4} are found by substituting the above trial solution yp into the ODE and comparing coefficients. Substituting the trial solution into the ODE and simplifying gives

6xA4+2A3x(A4x3+A3x2+A2x+A1)x3+2=0

Solving for the unknowns by comparing coefficients results in

[A1=0,A2=0,A3=1,A4=0]

Substituting the above back in the above trial solution yp, gives the particular solution

yp=x2

Therefore the general solution is

y=yh+yp=(c1AiryAi(x(1)1/3)+c2AiryBi(x(1)1/3))+(x2)=c1AiryAi(x(1)1/3)+c2AiryBi(x(1)1/3)x2

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1AiryAi(x(1)1/3)+c2AiryBi(x(1)1/3)x2

Solved as second order ode adjoint method

Time used: 0.827 (sec)

In normal form the ode

(1)yxyx3+2=0

Becomes

(2)y+p(x)y+q(x)y=r(x)

Where

p(x)=0q(x)=xr(x)=x32

The Lagrange adjoint ode is given by

ξ(ξp)+ξq=0ξ(0)+(xξ(x))=0ξ(x)xξ(x)=0

Which is solved for ξ(x). This is Airy ODE. It has the general form

aξ+bξ+cxξ=F(x)

Where in this case

a=1b=0c=1F=0

Therefore the solution to the homogeneous Airy ODE becomes

ξ=c5AiryAi(x(1)1/3)+c6AiryBi(x(1)1/3)

Will add steps showing solving for IC soon.

The original ode now reduces to first order ode

ξ(x)yyξ(x)+ξ(x)p(x)y=ξ(x)r(x)dxy+y(p(x)ξ(x)ξ(x))=ξ(x)r(x)dxξ(x)

Or

yy(c5(1)1/3AiryAi(1,x(1)1/3)c6(1)1/3AiryBi(1,x(1)1/3))c5AiryAi(x(1)1/3)+c6AiryBi(x(1)1/3)=c6AiryBi(1,x(1)1/3)x232c6AiryBi(1,x(1)1/3)x222c5xAiryAi(x(1)1/3)2c6xAiryBi(x(1)1/3)c5AiryAi(1,x(1)1/3)x232c5AiryAi(1,x(1)1/3)x22c5AiryAi(x(1)1/3)+c6AiryBi(x(1)1/3)

Which is now a first order ode. This is now solved for y. In canonical form a linear first order is

y+q(x)y=p(x)

Comparing the above to the given ode shows that

q(x)=(1+i3)(AiryBi(1,x(1+i3)2)c6+AiryAi(1,x(1+i3)2)c5)2c5AiryAi(x(1+i3)2)+2c6AiryBi(x(1+i3)2)p(x)=(c5(1+i3)xAiryAi(1,x(1+i3)2)+(1+i3)xc6AiryBi(1,x(1+i3)2)+4c5AiryAi(x(1+i3)2)+4c6AiryBi(x(1+i3)2))x2c5AiryAi(x(1+i3)2)+2c6AiryBi(x(1+i3)2)

The integrating factor μ is

μ=eqdx=e(1+i3)(AiryBi(1,x(1+i3)2)c6+AiryAi(1,x(1+i3)2)c5)2c5AiryAi(x(1+i3)2)+2c6AiryBi(x(1+i3)2)dx=1c5AiryAi(x(1+i3)2)+c6AiryBi(x(1+i3)2)

The ode becomes

ddx(μy)=μpddx(μy)=(μ)((c5(1+i3)xAiryAi(1,x(1+i3)2)+(1+i3)xc6AiryBi(1,x(1+i3)2)+4c5AiryAi(x(1+i3)2)+4c6AiryBi(x(1+i3)2))x2c5AiryAi(x(1+i3)2)+2c6AiryBi(x(1+i3)2))ddx(yc5AiryAi(x(1+i3)2)+c6AiryBi(x(1+i3)2))=(1c5AiryAi(x(1+i3)2)+c6AiryBi(x(1+i3)2))((c5(1+i3)xAiryAi(1,x(1+i3)2)+(1+i3)xc6AiryBi(1,x(1+i3)2)+4c5AiryAi(x(1+i3)2)+4c6AiryBi(x(1+i3)2))x2c5AiryAi(x(1+i3)2)+2c6AiryBi(x(1+i3)2))d(yc5AiryAi(x(1+i3)2)+c6AiryBi(x(1+i3)2))=((c5(1+i3)xAiryAi(1,x(1+i3)2)+(1+i3)xc6AiryBi(1,x(1+i3)2)+4c5AiryAi(x(1+i3)2)+4c6AiryBi(x(1+i3)2))x(c5AiryAi(x(1+i3)2)+c6AiryBi(x(1+i3)2))(2c5AiryAi(x(1+i3)2)+2c6AiryBi(x(1+i3)2)))dx

Integrating gives

yc5AiryAi(x(1+i3)2)+c6AiryBi(x(1+i3)2)=(c5(1+i3)xAiryAi(1,x(1+i3)2)+(1+i3)xc6AiryBi(1,x(1+i3)2)+4c5AiryAi(x(1+i3)2)+4c6AiryBi(x(1+i3)2))x(c5AiryAi(x(1+i3)2)+c6AiryBi(x(1+i3)2))(2c5AiryAi(x(1+i3)2)+2c6AiryBi(x(1+i3)2))dx=x2c5AiryAi(x(1+i3)2)c6AiryBi(x(1+i3)2)+c7

Dividing throughout by the integrating factor 1c5AiryAi(x(1+i3)2)+c6AiryBi(x(1+i3)2) gives the final solution

y=AiryBi(x(1+i3)2)c6c7+AiryAi(x(1+i3)2)c5c7x2

Hence, the solution found using Lagrange adjoint equation method is

y=AiryBi(x(1+i3)2)c6c7+AiryAi(x(1+i3)2)c5c7x2

The constants can be merged to give

y=c6AiryBi(x(1+i3)2)+c5AiryAi(x(1+i3)2)x2

Will add steps showing solving for IC soon.

Summary of solutions found

y=c6AiryBi(x(1+i3)2)+c5AiryAi(x(1+i3)2)x2

Maple. Time used: 0.004 (sec). Leaf size: 18
ode:=diff(diff(y(x),x),x)-x*y(x)-x^3+2 = 0; 
dsolve(ode,y(x), singsol=all);
 
y=AiryAi(x)c2+AiryBi(x)c1x2

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: 0.428 (sec). Leaf size: 290
ode=D[y[x],{x,2}]-x*y[x]-x^3+2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)633πxGamma(13)Gamma(53)Gamma(73)Gamma(83)(3AiryAi(x)AiryBi(x))1F2(13;23,43;x39)+236πx2Gamma(23)2Gamma(73)Gamma(83)(3AiryAi(x)+3AiryBi(x))1F2(23;43,53;x39)+Gamma(53)(333πx4Gamma(43)2Gamma(83)(AiryBi(x)3AiryAi(x))1F2(43;23,73;x39)+Gamma(23)Gamma(73)(36πx5Gamma(53)(3AiryAi(x)+3AiryBi(x))1F2(53;43,83;x39)+27Gamma(43)Gamma(83)(c1AiryAi(x)+c2AiryBi(x))))27Gamma(23)Gamma(43)Gamma(53)Gamma(73)Gamma(83)
Sympy. Time used: 0.065 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - x*y(x) + Derivative(y(x), (x, 2)) + 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1Ai(x)+C2Bi(x)