2.3.1 Problem 1

Solved as second order ode using Kovacic algorithm
Maple
Mathematica
Sympy

Internal problem ID [8859]
Book : Own collection of miscellaneous problems
Section : section 3.0
Problem number : 1
Date solved : Sunday, March 30, 2025 at 01:44:46 PM
CAS classification : [[_2nd_order, _missing_x]]

Solved as second order ode using Kovacic algorithm

Time used: 0.195 (sec)

Solve

y+cy+ky=0

Writing the ode as

(1)y+cy+ky=0(2)Ay+By+Cy=0

Comparing (1) and (2) shows that

A=1(3)B=cC=k

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

Comparing the above to (5) shows that

s=c24kt=4

Therefore eq. (4) becomes

(7)z(x)=(c24k)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.42: 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=c24k 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)=exc24k2

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

y1=z1e12BAdx=z1e12c1dx=z1exc2=z1(exc2)

Which simplifies to

y1=ex(c+c24k)2

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

y2=y1eBAdxy12dx

Substituting gives

y2=y1ec1dx(y1)2dx=y1exc(y1)2dx=y1(excex(c+c24k)c24k)

Therefore the solution is

y=c3y1+c4y2=c3(ex(c+c24k)2)+c4(ex(c+c24k)2(excex(c+c24k)c24k))

Will add steps showing solving for IC soon.

Summary of solutions found

y=c3ex(c+c24k)2c4ex(c+c24k)2c24k
Maple. Time used: 0.003 (sec). Leaf size: 36
ode:=diff(diff(y(x),x),x)+c*diff(y(x),x)+k*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=(c1exc24k+c2)e(c+c24k)x2

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
<- constant coefficients successful
 

Maple step by step

Let’s solveddxddxy(x)+c(ddxy(x))+ky(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Characteristic polynomial of ODEcr+r2+k=0Use quadratic formula to solve forrr=(c)±(c24k)2Roots of the characteristic polynomialr=(c2c24k2,c2+c24k2)1st solution of the ODEy1(x)=e(c2c24k2)x2nd solution of the ODEy2(x)=e(c2+c24k2)xGeneral solution of the ODEy(x)=C1y1(x)+C2y2(x)Substitute in solutionsy(x)=C1e(c2c24k2)x+C2e(c2+c24k2)x
Mathematica. Time used: 7.017 (sec). Leaf size: 2548
ode=D[y[x],{x,3}]-x^3*D[y[x],x]-x^2*y[x]-x^3==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Too large to display

Sympy. Time used: 0.228 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
c = symbols("c") 
k = symbols("k") 
y = Function("y") 
ode = Eq(c*Derivative(y(x), x) + k*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1ex(c+c24k)2+C2ex(c+c24k)2