2.2.7 Problem 7

Solved as second order ode using Kovacic algorithm
Maple
Mathematica
Sympy

Internal problem ID [10000]
Book : Collection of Kovacic problems
Section : section 2. Solution found using all possible Kovacic cases
Problem number : 7
Date solved : Sunday, March 30, 2025 at 02:51:18 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solved as second order ode using Kovacic algorithm

Time used: 0.825 (sec)

Writing the ode as

(1)(x2+1)y+y+y=0(2)Ay+By+Cy=0

Comparing (1) and (2) shows that

A=x2+1(3)B=1C=1

Applying the Liouville transformation on the dependent variable gives

z(x)=yeB2Adx

Then (2) becomes

(4)z(x)=rz(x)

Where r is given by

(5)r=st=2AB2BA+B24AC4A2

Substituting the values of A,B,C from (3) in the above and simplifying gives

(6)r=4x2+4x34(x21)2

Comparing the above to (5) shows that

s=4x2+4x3t=4(x21)2

Therefore eq. (4) becomes

(7)z(x)=(4x2+4x34(x21)2)z(x)

Equation (7) is now solved. After finding z(x) then y is found using the inverse transformation

y=z(x)eB2Adx

The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3 cases depending on the order of poles of r and the order of r at . The following table summarizes these cases.

Case

Allowed pole order for r

Allowed value for O()

1

{0,1,2,4,6,8,}

{,6,4,2,0,2,3,4,5,6,}

2

Need to have at least one pole that is either order 2 or odd order greater than 2. Any other pole order is allowed as long as the above condition is satisfied. Hence the following set of pole orders are all allowed. {1,2},{1,3},{2},{3},{3,4},{1,2,5}.

no condition

3

{1,2}

{2,3,4,5,6,7,}

Table 2.828: Necessary conditions for each Kovacic case

The order of r at is the degree of t minus the degree of s. Therefore

O()=deg(t)deg(s)=42=2

The poles of r in eq. (7) and the order of each pole are determined by solving for the roots of t=4(x21)2. There is a pole at x=1 of order 2. There is a pole at x=1 of order 2. Since there is no odd order pole larger than 2 and the order at is 2 then the necessary conditions for case one are met. Since there is a pole of order 2 then necessary conditions for case two are met. Since pole order is not larger than 2 and the order at is 2 then the necessary conditions for case three are met. Therefore

L=[1,2,4,6,12]

Attempting to find a solution using case n=1.

Unable to find solution using case one

Attempting to find a solution using case n=2.

Looking at poles of order 2. The partial fractions decomposition of r is

r=516(x1)2316(x+1)2+716(x1)716(x+1)

For the pole at x=1 let b be the coefficient of 1(x1)2 in the partial fractions decomposition of r given above. Therefore b=516. Hence

Ec={2,2+21+4b,221+4b}={1,2,5}

For the pole at x=1 let b be the coefficient of 1(x+1)2 in the partial fractions decomposition of r given above. Therefore b=316. Hence

Ec={2,2+21+4b,221+4b}={1,2,3}

Since the order of r at is 2 then let b be the coefficient of 1x2 in the Laurent series expansion of r at . which can be found by dividing the leading coefficient of s by the leading coefficient of t from

r=st=4x2+4x34(x21)2

Since the gcd(s,t)=1. This gives b=1. Hence

E={2,2+21+4b,221+4b}={2}

The following table summarizes the findings so far for poles and for the order of r at for case 2 of Kovacic algorithm.

pole c location pole order Ec
1 2 {1,2,5}
1 2 {1,2,3}

Order of r at E
2 {2}

Using the family {e1,e2,,e} given by

e1=1,e2=1,e=2

Gives a non negative integer d (the degree of the polynomial p(x)), which is generated using

d=12(ecΓec)=12(2(1+(1)))=1

We now form the following rational function

θ=12cΓecxc=12(1(x(1))+1(x(1)))=12(x1)+12x+2

Now we search for a monic polynomial p(x) of degree d=1 such that

(1A)p+3θp+(3θ2+3θ4r)p+(θ+3θθ+θ34rθ2r)p=0

Since d=1, then letting

(2A)p=x+a0

Substituting p and θ into Eq. (1A) gives

4a0+6(x1)2(x+1)=0

And solving for p gives

p=x32

Now that p(x) is found let

ϕ=θ+pp=1x3212(x1)+12x+2

Let ω be the solution of

ω2ϕω+(12ϕ+12ϕ2r)=0

Substituting the values for ϕ and r into the above equation gives

w2(1x3212(x1)+12x+2)w+8x3+4x2+10x74(x21)2(2x3)=0

Solving for ω gives

ω=25(x1)(x+1)x25(x1)(x+1)+2x22x+12(2x3)(x1)(x+1)

Therefore the first solution to the ode z=rz is

z1(x)=eωdx=e25(x1)(x+1)x25(x1)(x+1)+2x22x+12(2x3)(x1)(x+1)dx=(x+1)1/42x3(x+x21)5251/4(x1)1/45x21+(2+3x)5x21(2x3)2x21

The first solution to the original ode in y is found from

y1=z1e12BAdx=z1e121x2+1dx=z1earctanh(x)2=z1(1x+1x2+1)

Which simplifies to

y1=(x+x21)522x3(5x+5)1/4x+1x2+1i(35x+5x2125)2x3(x1)1/4

The second solution y2 to the original ode is found using reduction of order

y2=y1eBAdxy12dx

Substituting gives

y2=y1e1x2+1dx(y1)2dx=y1earctanh(x)(y1)2dx=y1(i(x+x21)5(35x+5x2125)x1(2x3)25x+5dx)

Therefore the solution is

y=c1y1+c2y2=c1((x+x21)522x3(5x+5)1/4x+1x2+1i(35x+5x2125)2x3(x1)1/4)+c2((x+x21)522x3(5x+5)1/4x+1x2+1i(35x+5x2125)2x3(x1)1/4(i(x+x21)5(35x+5x2125)x1(2x3)25x+5dx))

Will add steps showing solving for IC soon.

Maple. Time used: 0.026 (sec). Leaf size: 58
ode:=(-x^2+1)*diff(diff(y(x),x),x)+diff(y(x),x)+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=c1hypergeom([1252,5212],[12],x2+12)+c22x+2hypergeom([52,52],[32],x2+12)

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 
   A Liouvillian solution exists 
   Group is reducible or imprimitive 
<- Kovacics algorithm successful
 

Maple step by step

Let’s solve(x2+1)(ddxddxy(x))+ddxy(x)+y(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Isolate 2nd derivativeddxddxy(x)=y(x)x21+ddxy(x)x21Group terms withy(x)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddxddxy(x)ddxy(x)x21y(x)x21=0Check to see ifx0is a regular singular pointDefine functions[P2(x)=1x21,P3(x)=1x21](x+1)P2(x)is analytic atx=1((x+1)P2(x))|x=1=12(x+1)2P3(x)is analytic atx=1((x+1)2P3(x))|x=1=0x=1is a regular singular pointCheck to see ifx0is a regular singular pointx0=1Multiply by denominators(x21)(ddxddxy(x))ddxy(x)y(x)=0Change variables usingx=u1so that the regular singular point is atu=0(u22u)(ddudduy(u))dduy(u)y(u)=0Assume series solution fory(u)y(u)=k=0akuk+rRewrite ODE with series expansionsConvertdduy(u)to series expansiondduy(u)=k=0ak(k+r)uk+r1Shift index usingk>k+1dduy(u)=k=1ak+1(k+1+r)uk+rConvertum(ddudduy(u))to series expansion form=1..2um(ddudduy(u))=k=0ak(k+r)(k+r1)uk+r2+mShift index usingk>k+2mum(ddudduy(u))=k=2+mak+2m(k+2m+r)(k+1m+r)uk+rRewrite ODE with series expansionsa0r(2r1)u1+r+(k=0(ak+1(k+1+r)(2k+1+2r)+ak(k2+2kr+r2kr1))uk+r)=0a0cannot be 0 by assumption, giving the indicial equationr(2r1)=0Values of r that satisfy the indicial equationr{0,12}Each term in the series must be 0, giving the recursion relation2(k+12+r)(k+1+r)ak+1+ak(k2+(2r1)k+r2r1)=0Recursion relation that defines series solution to ODEak+1=ak(k2+2kr+r2kr1)(2k+1+2r)(k+1+r)Recursion relation forr=0ak+1=ak(k2k1)(2k+1)(k+1)Solution forr=0[y(u)=k=0akuk,ak+1=ak(k2k1)(2k+1)(k+1)]Revert the change of variablesu=x+1[y(x)=k=0ak(x+1)k,ak+1=ak(k2k1)(2k+1)(k+1)]Recursion relation forr=12ak+1=ak(k254)(2k+2)(k+32)Solution forr=12[y(u)=k=0akuk+12,ak+1=ak(k254)(2k+2)(k+32)]Revert the change of variablesu=x+1[y(x)=k=0ak(x+1)k+12,ak+1=ak(k254)(2k+2)(k+32)]Combine solutions and rename parameters[y(x)=(k=0ak(x+1)k)+(k=0bk(x+1)k+12),ak+1=ak(k2k1)(2k+1)(k+1),bk+1=bk(k254)(2k+2)(k+32)]
Mathematica. Time used: 5.189 (sec). Leaf size: 215
ode=(1-x^2)*D[y[x],{x,2}]+D[y[x],x]+y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)(x1x+1)12(15)(x1+x+1)12(51)(5x15x+1)(c21x2earctanh(K[2])(K[2]1K[2]+1)5(K[2]1+K[2]+1)5(5K[2]+15K[2]1)2dK[2]+c1)exp(12(arctanh(x)1x11K[1]2dK[1]))
Sympy. Time used: 0.566 (sec). Leaf size: 121
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - x**2)*Derivative(y(x), (x, 2)) + y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=x14x214(x21)54(C1x+1x12F1(52,325232|x+1x1)+C22F1(152,521212|x+1x1))e5(log(x1)log(x+1))4x+14