2.2.37 Problem 37

Solved as second order ode using change of variable on y method 1
Solved as second order Bessel ode
Solved as second order ode using Kovacic algorithm
Maple
Mathematica
Sympy

Internal problem ID [9159]
Book : Second order enumerated odes
Section : section 2
Problem number : 37
Date solved : Friday, April 25, 2025 at 05:58:31 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solved as second order ode using change of variable on y method 1

Time used: 0.147 (sec)

Solve

xy+2yxy=0

In normal form the given ode is written as

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

Where

p(x)=2xq(x)=1

Calculating the Liouville ode invariant Q given by

Q=qp2p24=1(2x)2(2x)24=1(2x2)2(4x2)4=1(1x2)1x2=1

Since the Liouville ode invariant does not depend on the independent variable x then the transformation

(3)y=v(x)z(x)

is used to change the original ode to a constant coefficients ode in v. In (3) the term z(x) is given by

z(x)=ep(x)2dx=e2x2(5)=1x

Hence (3) becomes

(4)y=v(x)x

Applying this change of variable to the original ode results in

v(x)v(x)=0

Which is now solved for v(x).

This is second order with constant coefficients homogeneous ODE. In standard form the ODE is

Av(x)+Bv(x)+Cv(x)=0

Where in the above A=1,B=0,C=1. Let the solution be v=eλx. Substituting this into the ODE gives

(1)λ2exλexλ=0

Since exponential function is never zero, then dividing Eq(2) throughout by eλx gives

(2)λ21=0

Equation (2) is the characteristic equation of the ODE. Its roots determine the general solution form.Using the quadratic formula

λ1,2=B2A±12AB24AC

Substituting A=1,B=0,C=1 into the above gives

λ1,2=0(2)(1)±1(2)(1)02(4)(1)(1)=±1

Hence

λ1=+1λ2=1

Which simplifies to

λ1=1λ2=1

Since roots are real and distinct, then the solution is

v=c1eλ1x+c2eλ2xv=c1e(1)x+c2e(1)x

Or

v=c1ex+c2ex

Will add steps showing solving for IC soon.

Now that v is known, then

y(x)=vz(x)(7)=(c1ex+c2ex)(z(x))

But from (5)

z(x)=1x

Hence (7) becomes

y(x)=c1ex+c2exx

Will add steps showing solving for IC soon.

Summary of solutions found

y(x)=c1ex+c2exx

Solved as second order Bessel ode

Time used: 0.106 (sec)

Solve

xy+2yxy=0

Writing the ode as

(1)x2y+2yxx2y=0

Bessel ode has the form

(2)x2y+yx+(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β=in=12γ=1

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

y=ic12sinh(x)xπixc22cosh(x)xπix

Will add steps showing solving for IC soon.

Summary of solutions found

y=ic12sinh(x)xπixc22cosh(x)xπix

Solved as second order ode using Kovacic algorithm

Time used: 0.076 (sec)

Solve

xy+2yxy=0

Writing the ode as

(1)xy+2yxy=0(2)Ay+By+Cy=0

Comparing (1) and (2) shows that

A=x(3)B=2C=x

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

Comparing the above to (5) shows that

s=1t=1

Therefore eq. (4) becomes

(7)z(x)=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.46: 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=1 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)=ex

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=z1e122xdx=z1eln(x)=z1(1x)

Which simplifies to

y1=exx

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

y2=y1eBAdxy12dx

Substituting gives

y2=y1e2xdx(y1)2dx=y1e2ln(x)(y1)2dx=y1(e2x2)

Therefore the solution is

y=c1y1+c2y2=c1(exx)+c2(exx(e2x2))

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1exx+c2ex2x
Maple. Time used: 0.005 (sec). Leaf size: 17
ode:=x*diff(diff(y(x),x),x)+2*diff(y(x),x)-x*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=c1sinh(x)+c2cosh(x)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 
   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 solvex(ddxddxy(x))+2ddxy(x)xy(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Isolate 2nd derivativeddxddxy(x)=y(x)2(ddxy(x))xGroup terms withy(x)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddxddxy(x)+2(ddxy(x))xy(x)=0Check to see ifx0=0is a regular singular pointDefine functions[P2(x)=2x,P3(x)=1]xP2(x)is analytic atx=0(xP2(x))|x=0=2x2P3(x)is analytic atx=0(x2P3(x))|x=0=0x=0is a regular singular pointCheck to see ifx0=0is a regular singular pointx0=0Multiply by denominatorsx(ddxddxy(x))+2ddxy(x)xy(x)=0Assume series solution fory(x)y(x)=k=0akxk+rRewrite ODE with series expansionsConvertxy(x)to series expansionxy(x)=k=0akxk+r+1Shift index usingk>k1xy(x)=k=1ak1xk+rConvertddxy(x)to series expansionddxy(x)=k=0ak(k+r)xk+r1Shift index usingk>k+1ddxy(x)=k=1ak+1(k+r+1)xk+rConvertx(ddxddxy(x))to series expansionx(ddxddxy(x))=k=0ak(k+r)(k+r1)xk+r1Shift index usingk>k+1x(ddxddxy(x))=k=1ak+1(k+r+1)(k+r)xk+rRewrite ODE with series expansionsa0r(1+r)x1+r+a1(1+r)(2+r)xr+(k=1(ak+1(k+r+1)(k+2+r)ak1)xk+r)=0a0cannot be 0 by assumption, giving the indicial equationr(1+r)=0Values of r that satisfy the indicial equationr{1,0}Each term must be 0a1(1+r)(2+r)=0Each term in the series must be 0, giving the recursion relationak+1(k+r+1)(k+2+r)ak1=0Shift index usingk>k+1ak+2(k+2+r)(k+3+r)ak=0Recursion relation that defines series solution to ODEak+2=ak(k+2+r)(k+3+r)Recursion relation forr=1ak+2=ak(k+1)(k+2)Solution forr=1[y(x)=k=0akxk1,ak+2=ak(k+1)(k+2),0=0]Recursion relation forr=0ak+2=ak(k+2)(k+3)Solution forr=0[y(x)=k=0akxk,ak+2=ak(k+2)(k+3),2a1=0]Combine solutions and rename parameters[y(x)=(k=0akxk1)+(k=0bkxk),ak+2=ak(k+1)(k+2),0=0,bk+2=bk(k+2)(k+3),2b1=0]
Mathematica. Time used: 0.03 (sec). Leaf size: 28
ode=x*D[y[x],{x,2}]+2*D[y[x],x]-x*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)2c1ex+c2ex2x
Sympy. Time used: 0.210 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x) + x*Derivative(y(x), (x, 2)) + 2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)=C1J12(ix)+C2Y12(ix)x