2.4.65 Problem 62

Solved as second order ode adjoint method
Maple
Mathematica
Sympy

Internal problem ID [8954]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 62
Date solved : Sunday, March 30, 2025 at 01:56:21 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solved as second order ode adjoint method

Time used: 0.764 (sec)

Solve

xy1x+xy=0

In normal form the ode

(1)xy1x+xy=0

Becomes

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

Where

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

The Lagrange adjoint ode is given by

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

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

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

Where in this case

a=1b=0c=1xxF=0

Therefore the solution to the homogeneous Airy ODE becomes

ξ=c3AiryAi((1x)(1)1/3)+c4AiryBi((1x)(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(c3(1)1/3AiryAi(1,(1x)(1)1/3)c4(1)1/3AiryBi(1,(1x)(1)1/3))c3AiryAi((1x)(1)1/3)+c4AiryBi((1x)(1)1/3)=0

Which is now a first order ode. This is now solved for y. The ode

(1)y=y(1)1/3(AiryAi(1,(1x)(1)1/3)c3+AiryBi(1,(1x)(1)1/3)c4)c3AiryAi((1x)(1)1/3)+c4AiryBi((1x)(1)1/3)

is separable as it can be written as

y=y(1)1/3(AiryAi(1,(1x)(1)1/3)c3+AiryBi(1,(1x)(1)1/3)c4)c3AiryAi((1x)(1)1/3)+c4AiryBi((1x)(1)1/3)=f(x)g(y)

Where

f(x)=(AiryAi(1,(1x)(1)1/3)c3+AiryBi(1,(1x)(1)1/3)c4)(1)1/3c3AiryAi((1x)(1)1/3)+c4AiryBi((1x)(1)1/3)g(y)=y

Integrating gives

1g(y)dy=f(x)dx1ydy=(AiryAi(1,(1x)(1)1/3)c3+AiryBi(1,(1x)(1)1/3)c4)(1)1/3c3AiryAi((1x)(1)1/3)+c4AiryBi((1x)(1)1/3)dx
ln(y)=ln(c3AiryAi((x1)(1+i3)2)+c4AiryBi((x1)(1+i3)2))+c5

Taking the exponential of both sides the solution becomes

y=c5(c3AiryAi((x1)(1+i3)2)+c4AiryBi((x1)(1+i3)2))

We now need to find the singular solutions, these are found by finding for what values g(y) is zero, since we had to divide by this above. Solving g(y)=0 or

y=0

for y gives

y=0

Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.

Therefore the solutions found are

y=0y=c5(c3AiryAi((x1)(1+i3)2)+c4AiryBi((x1)(1+i3)2))

Hence, the solution found using Lagrange adjoint equation method is

y=0y=c5(c3AiryAi((x1)(1+i3)2)+c4AiryBi((x1)(1+i3)2))

Will add steps showing solving for IC soon.

Summary of solutions found

y=0y=c5(c3AiryAi((x1)(1+i3)2)+c4AiryBi((x1)(1+i3)2))

Maple. Time used: 0.005 (sec). Leaf size: 17
ode:=x/(1-x)*diff(diff(y(x),x),x)+x*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=c1AiryAi(1+x)+c2AiryBi(1+x)

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
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
 

Maple step by step

Let’s solvex(ddxddxy(x))1x+xy(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Isolate 2nd derivativeddxddxy(x)=(1+x)y(x)Group terms withy(x)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddxddxy(x)+y(x)(1x)=0Assume series solution fory(x)y(x)=k=0akxkRewrite ODE with series expansionsConvertxmy(x)to series expansion form=0..1xmy(x)=k=max(0,m)akxk+mShift index usingk>kmxmy(x)=k=max(0,m)+makmxkConvertddxddxy(x)to series expansionddxddxy(x)=k=2akk(k1)xk2Shift index usingk>k+2ddxddxy(x)=k=0ak+2(k+2)(k+1)xkRewrite ODE with series expansions2a2+a0+(k=1(ak+2(k+2)(k+1)+akak1)xk)=0Each term must be 02a2+a0=0Each term in the series must be 0, giving the recursion relation(k2+3k+2)ak+2+akak1=0Shift index usingk>k+1((k+1)2+3k+5)ak+3+ak+1ak=0Recursion relation that defines the series solution to the ODE[y(x)=k=0akxk,ak+3=ak+1+akk2+5k+6,2a2+a0=0]
Mathematica. Time used: 0.016 (sec). Leaf size: 20
ode=x/(1-x)*D[y[x],{x,2}]+x*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)c1AiryAi(x1)+c2AiryBi(x1)
Sympy. Time used: 0.078 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) + x*Derivative(y(x), (x, 2))/(1 - x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1Ai(x1)+C2Bi(x1)