2.2.31 Problem 30

Solved as second order Airy ode
Solved as second order Bessel ode
Maple
Mathematica
Sympy

Internal problem ID [8835]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 30
Date solved : Sunday, March 30, 2025 at 01:41:18 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solved as second order Airy ode

Time used: 0.077 (sec)

Solve

yxyx=0

This is Airy ODE. It has the general form

ay+by+cxy=F(x)

Where in this case

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

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

x

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

[{1,x}]

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=A2x+A1

The unknowns {A1,A2} 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

x(A2x+A1)x=0

Solving for the unknowns by comparing coefficients results in

[A1=1,A2=0]

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

yp=1

Therefore the general solution is

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

Will add steps showing solving for IC soon.

Summary of solutions found

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

Solved as second order Bessel ode

Time used: 0.463 (sec)

Solve

yxyx=0

Writing the ode as

(1)x2yx3y=x3

Let the solution be

y=yh+yp

Where yh is the solution to the homogeneous ODE and yp is a particular solution to the non-homogeneous ODE. Bessel ode has the form

(2)x2y+xy+(n2+x2)y=0

The generalized form of Bessel ode is given by Bowman (1958) as the following

(3)x2y+(12α)xy+(β2γ2x2γn2γ2+α2)y=0

With the standard solution

(4)y=xα(c1BesselJ(n,βxγ)+c2BesselY(n,βxγ))

Comparing (3) to (1) and solving for α,β,n,γ gives

α=12β=2i3n=13γ=32

Substituting all the above into (4) gives the solution as

y=c1xBesselJ(13,2ix3/23)+c2xBesselY(13,2ix3/23)

Therefore the homogeneous solution yh is

yh=c1xBesselJ(13,2ix3/23)+c2xBesselY(13,2ix3/23)

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=xBesselJ(13,2ix3/23)y2=xBesselY(13,2ix3/23)

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=|xBesselJ(13,2ix3/23)xBesselY(13,2ix3/23)ddx(xBesselJ(13,2ix3/23))ddx(xBesselY(13,2ix3/23))|

Which gives

W=|xBesselJ(13,2ix3/23)xBesselY(13,2ix3/23)BesselJ(13,2ix3/23)2x+ix(BesselJ(43,2ix3/23)iBesselJ(13,2ix3/23)2x3/2)BesselY(13,2ix3/23)2x+ix(BesselY(43,2ix3/23)iBesselY(13,2ix3/23)2x3/2)|

Therefore

W=(xBesselJ(13,2ix3/23))(BesselY(13,2ix3/23)2x+ix(BesselY(43,2ix3/23)iBesselY(13,2ix3/23)2x3/2))(xBesselY(13,2ix3/23))(BesselJ(13,2ix3/23)2x+ix(BesselJ(43,2ix3/23)iBesselJ(13,2ix3/23)2x3/2))

Which simplifies to

W=ix3/2(BesselJ(13,2ix3/23)BesselY(43,2ix3/23)BesselY(13,2ix3/23)BesselJ(43,2ix3/23))

Which simplifies to

W=3π

Therefore Eq. (2) becomes

u1=x7/2BesselY(13,2ix3/23)3x2πdx

Which simplifies to

u1=x3/2BesselY(13,2ix3/23)π3dx

Hence

u1=0xα3/2BesselY(13,2iα3/23)π3dα

And Eq. (3) becomes

u2=x7/2BesselJ(13,2ix3/23)3x2πdx

Which simplifies to

u2=x3/2BesselJ(13,2ix3/23)π3dx

Hence

u2=0xα3/2BesselJ(13,2iα3/23)π3dα

Therefore the particular solution, from equation (1) is

yp(x)=0xα3/2BesselY(13,2iα3/23)π3dαxBesselJ(13,2ix3/23)+xBesselY(13,2ix3/23)0xα3/2BesselJ(13,2iα3/23)π3dα

Which simplifies to

yp(x)=πx(BesselJ(13,2ix3/23)0xα3/2BesselY(13,2iα3/23)dα+BesselY(13,2ix3/23)0xα3/2BesselJ(13,2iα3/23)dα)3

Therefore the general solution is

y=yh+yp=(c1xBesselJ(13,2ix3/23)+c2xBesselY(13,2ix3/23))+(πx(BesselJ(13,2ix3/23)0xα3/2BesselY(13,2iα3/23)dα+BesselY(13,2ix3/23)0xα3/2BesselJ(13,2iα3/23)dα)3)

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1xBesselJ(13,2ix3/23)+c2xBesselY(13,2ix3/23)+πx(BesselJ(13,2ix3/23)0xα3/2BesselY(13,2iα3/23)dα+BesselY(13,2ix3/23)0xα3/2BesselJ(13,2iα3/23)dα)3

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

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.04 (sec). Leaf size: 28
ode=D[y[x],{x,2}]-x*y[x]-x==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)πAiryAiPrime(x)AiryBi(x)+c2AiryBi(x)+AiryAi(x)(πAiryBiPrime(x)+c1)
Sympy. Time used: 0.071 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x) - x + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1Ai(x)+C2Bi(x)