2.1.788 Problem 810

Solved as second order ode using Kovacic algorithm
Maple
Mathematica
Sympy

Internal problem ID [9960]
Book : Collection of Kovacic problems
Section : section 1
Problem number : 810
Date solved : Sunday, March 30, 2025 at 02:50:26 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solved as second order ode using Kovacic algorithm

Time used: 0.111 (sec)

Writing the ode as

(1)u+(2x1)u+(x2+x1)u=0(2)Au+Bu+Cu=0

Comparing (1) and (2) shows that

A=1(3)B=2x1C=x2+x1

Applying the Liouville transformation on the dependent variable gives

z(x)=ueB2Adx

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=14

Comparing the above to (5) shows that

s=1t=4

Therefore eq. (4) becomes

(7)z(x)=z(x)4

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

u=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.788: 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)=00=0

There are no poles in r. Therefore the set of poles Γ is empty. Since there is no odd order pole larger than 2 and the order at is 0 then the necessary conditions for case one are met. Therefore

L=[1]

Since r=14 is not a function of x, then there is no need run Kovacic algorithm to obtain a solution for transformed ode z=rz as one solution is

z1(x)=ex2

Using the above, the solution for the original ode can now be found. The first solution to the original ode in u is found from

u1=z1e12BAdx=z1e122x11dx=z1e12x2+12x=z1(ex(x+1)2)

Which simplifies to

u1=ex22

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

u2=u1eBAdxu12dx

Substituting gives

u2=u1e2x11dx(u1)2dx=u1ex2+x(u1)2dx=u1(ex2+xex2)

Therefore the solution is

u=c1u1+c2u2=c1(ex22)+c2(ex22(ex2+xex2))

Will add steps showing solving for IC soon.

Maple. Time used: 0.003 (sec). Leaf size: 17
ode:=diff(diff(u(x),x),x)-(2*x+1)*diff(u(x),x)+(x^2+x-1)*u(x) = 0; 
dsolve(ode,u(x), singsol=all);
 
u=ex22(c1+c2ex)

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 
   Reducible group (found an exponential solution) 
   Reducible group (found another exponential solution) 
<- Kovacics algorithm successful
 

Maple step by step

Let’s solveddxddxu(x)(2x+1)(ddxu(x))+(x2+x1)u(x)=0Highest derivative means the order of the ODE is2ddxddxu(x)Isolate 2nd derivativeddxddxu(x)=(x2x+1)u(x)+(2x+1)(ddxu(x))Group terms withu(x)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddxddxu(x)+(2x1)(ddxu(x))+(x2+x1)u(x)=0Assume series solution foru(x)u(x)=k=0akxkRewrite ODE with series expansionsConvertxmu(x)to series expansion form=0..2xmu(x)=k=max(0,m)akxk+mShift index usingk>kmxmu(x)=k=max(0,m)+makmxkConvertxm(ddxu(x))to series expansion form=0..1xm(ddxu(x))=k=max(0,1m)akkxk1+mShift index usingk>k+1mxm(ddxu(x))=k=max(0,1m)+m1ak+1m(k+1m)xkConvertddxddxu(x)to series expansionddxddxu(x)=k=2akk(k1)xk2Shift index usingk>k+2ddxddxu(x)=k=0ak+2(k+2)(k+1)xkRewrite ODE with series expansions2a2a1a0+(6a32a23a1+a0)x+(k=2(ak+2(k+2)(k+1)ak+1(k+1)ak(2k+1)+ak1+ak2)xk)=0The coefficients of each power ofxmust be 0[2a2a1a0=0,6a32a23a1+a0=0]Solve for the dependent coefficient(s){a2=a12+a02,a3=2a13}Each term in the series must be 0, giving the recursion relationk2ak+2+(2akak+1+3ak+2)kak+ak2+ak1ak+1+2ak+2=0Shift index usingk>k+2(k+2)2ak+4+(2ak+2ak+3+3ak+4)(k+2)ak+2+ak+ak+1ak+3+2ak+4=0Recursion relation that defines the series solution to the ODE[u(x)=k=0akxk,ak+4=2kak+2+kak+3akak+1+5ak+2+3ak+3k2+7k+12,a2=a12+a02,a3=2a13]
Mathematica. Time used: 0.026 (sec). Leaf size: 24
ode=D[u[x],{x,2}]-(2*x+1)*D[u[x],x]+(x^2+x-1)*u[x]==0; 
ic={}; 
DSolve[{ode,ic},u[x],x,IncludeSingularSolutions->True]
 
u(x)ex22(c2ex+c1)
Sympy
from sympy import * 
x = symbols("x") 
u = Function("u") 
ode = Eq((-2*x - 1)*Derivative(u(x), x) + (x**2 + x - 1)*u(x) + Derivative(u(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=u(x),ics=ics)
 
False