2.4.50 Problem 47

Maple
Mathematica
Sympy

Internal problem ID [8938]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 47
Date solved : Friday, April 25, 2025 at 05:25:13 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solve

x2y+xy+(x214)y=0

Using series expansion around x=0

The type of the expansion point is first determined. This is done on the homogeneous part of the ODE.

x2y+xy+(x214)y=0

The following is summary of singularities for the above ode. Writing the ode as

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

Where

p(x)=1xq(x)=4x214x2
Table 2.101: Table p(x),q(x) singularites.
p(x)=1x
singularity type
x=0 “regular”
q(x)=4x214x2
singularity type
x=0 “regular”

Combining everything together gives the following summary of singularities for the ode as

Regular singular points : [0]

Irregular singular points : []

Since x=0 is regular singular point, then Frobenius power series is used. The ode is normalized to be

x2y+xy+(x214)y=0

Let the solution be represented as Frobenius power series of the form

y=n=0anxn+r

Then

y=n=0(n+r)anxn+r1y=n=0(n+r)(n+r1)anxn+r2

Substituting the above back into the ode gives

(1)x2(n=0(n+r)(n+r1)anxn+r2)+x(n=0(n+r)anxn+r1)+(x214)(n=0anxn+r)=0

Which simplifies to

(2A)(n=0xn+ran(n+r)(n+r1))+(n=0xn+ran(n+r))+(n=0xn+r+2an)+n=0(anxn+r4)=0

The next step is to make all powers of x be n+r in each summation term. Going over each summation term above with power of x in it which is not already xn+r and adjusting the power and the corresponding index gives

n=0xn+r+2an=n=2an2xn+r

Substituting all the above in Eq (2A) gives the following equation where now all powers of x are the same and equal to n+r.

(2B)(n=0xn+ran(n+r)(n+r1))+(n=0xn+ran(n+r))+(n=2an2xn+r)+n=0(anxn+r4)=0

The indicial equation is obtained from n=0. From Eq (2B) this gives

xn+ran(n+r)(n+r1)+xn+ran(n+r)anxn+r4=0

When n=0 the above becomes

xra0r(1+r)+xra0ra0xr4=0

Or

(xrr(1+r)+xrrxr4)a0=0

Since a00 then the above simplifies to

(4r21)xr4=0

Since the above is true for all x then the indicial equation becomes

r214=0

Solving for r gives the roots of the indicial equation as

r1=12r2=12

Since a00 then the indicial equation becomes

(4r21)xr4=0

Solving for r gives the roots of the indicial equation as [12,12].

Since r1r2=1 is an integer, then we can construct two linearly independent solutions

y1(x)=xr1(n=0anxn)y2(x)=Cy1(x)ln(x)+xr2(n=0bnxn)

Or

y1(x)=x(n=0anxn)y2(x)=Cy1(x)ln(x)+n=0bnxnx

Or

y1(x)=n=0anxn+12y2(x)=Cy1(x)ln(x)+(n=0bnxn12)

Where C above can be zero. We start by finding y1. Eq (2B) derived above is now used to find all an coefficients. The case n=0 is skipped since it was used to find the roots of the indicial equation. a0 is arbitrary and taken as a0=1. Substituting n=1 in Eq. (2B) gives

a1=0

For 2n the recursive equation is

(3)an(n+r)(n+r1)+an(n+r)+an2an4=0

Solving for an from recursive equation (4) gives

(4)an=4an24n2+8nr+4r21

Which for the root r=12 becomes

(5)an=an2n(n+1)

At this point, it is a good idea to keep track of an in a table both before substituting r=12 and after as more terms are found using the above recursive equation.

n an,r an
a0 1 1
a1 0 0

For n=2, using the above recursive equation gives

a2=44r2+16r+15

Which for the root r=12 becomes

a2=16

And the table now becomes

n an,r an
a0 1 1
a1 0 0
a2 44r2+16r+15 16

For n=3, using the above recursive equation gives

a3=0

And the table now becomes

n an,r an
a0 1 1
a1 0 0
a2 44r2+16r+15 16
a3 0 0

For n=4, using the above recursive equation gives

a4=16(4r2+16r+15)(4r2+32r+63)

Which for the root r=12 becomes

a4=1120

And the table now becomes

n an,r an
a0 1 1
a1 0 0
a2 44r2+16r+15 16
a3 0 0
a4 16(4r2+16r+15)(4r2+32r+63) 1120

For n=5, using the above recursive equation gives

a5=0

And the table now becomes

n an,r an
a0 1 1
a1 0 0
a2 44r2+16r+15 16
a3 0 0
a4 16(4r2+16r+15)(4r2+32r+63) 1120
a5 0 0

Using the above table, then the solution y1(x) is

y1(x)=x(a0+a1x+a2x2+a3x3+a4x4+a5x5+a6x6)=x(1x26+x4120+O(x6))

Now the second solution y2(x) is found. Let

r1r2=N

Where N is positive integer which is the difference between the two roots. r1 is taken as the larger root. Hence for this problem we have N=1. Now we need to determine if C is zero or not. This is done by finding limrr2a1(r). If this limit exists, then C=0, else we need to keep the log term and C0. The above table shows that

aN=a1=0

Therefore

limrr20=limr120=0

The limit is 0. Since the limit exists then the log term is not needed and we can set C=0. Therefore the second solution has the form

y2(x)=n=0bnxn+r=n=0bnxn12

Eq (3) derived above is used to find all bn coefficients. The case n=0 is skipped since it was used to find the roots of the indicial equation. b0 is arbitrary and taken as b0=1. Substituting n=1 in Eq(3) gives

b1=0

For 2n the recursive equation is

(4)bn(n+r)(n+r1)+bn(n+r)+bn2bn4=0

Which for for the root r=12 becomes

(4A)bn(n12)(n32)+bn(n12)+bn2bn4=0

Solving for bn from the recursive equation (4) gives

(5)bn=4bn24n2+8nr+4r21

Which for the root r=12 becomes

(6)bn=4bn24n24n

At this point, it is a good idea to keep track of bn in a table both before substituting r=12 and after as more terms are found using the above recursive equation.

n bn,r bn
b0 1 1
b1 0 0

For n=2, using the above recursive equation gives

b2=44r2+16r+15

Which for the root r=12 becomes

b2=12

And the table now becomes

n bn,r bn
b0 1 1
b1 0 0
b2 44r2+16r+15 12

For n=3, using the above recursive equation gives

b3=0

And the table now becomes

n bn,r bn
b0 1 1
b1 0 0
b2 44r2+16r+15 12
b3 0 0

For n=4, using the above recursive equation gives

b4=16(4r2+16r+15)(4r2+32r+63)

Which for the root r=12 becomes

b4=124

And the table now becomes

n bn,r bn
b0 1 1
b1 0 0
b2 44r2+16r+15 12
b3 0 0
b4 16(4r2+16r+15)(4r2+32r+63) 124

For n=5, using the above recursive equation gives

b5=0

And the table now becomes

n bn,r bn
b0 1 1
b1 0 0
b2 44r2+16r+15 12
b3 0 0
b4 16(4r2+16r+15)(4r2+32r+63) 124
b5 0 0

Using the above table, then the solution y2(x) is

y2(x)=x(b0+b1x+b2x2+b3x3+b4x4+b5x5+b6x6)=1x22+x424+O(x6)x

Therefore the homogeneous solution is

yh(x)=c1y1(x)+c2y2(x)=c1x(1x26+x4120+O(x6))+c2(1x22+x424+O(x6))x

Hence the final solution is

y=yh=c1x(1x26+x4120+O(x6))+c2(1x22+x424+O(x6))x
Maple. Time used: 0.023 (sec). Leaf size: 34
Order:=6; 
ode:=x^2*diff(diff(y(x),x),x)+x*diff(y(x),x)+(x^2-1/4)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
y=c1x(116x2+1120x4+O(x6))+c2(112x2+124x4+O(x6))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 
   Group is reducible or imprimitive 
<- Kovacics algorithm successful
 

Maple step by step

Let’s solvex2(ddxddxy(x))+x(ddxy(x))+(x214)y(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Isolate 2nd derivativeddxddxy(x)=(4x21)y(x)4x2ddxy(x)xGroup terms withy(x)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddxddxy(x)+ddxy(x)x+(4x21)y(x)4x2=0Check to see ifx0=0is a regular singular pointDefine functions[P2(x)=1x,P3(x)=4x214x2]xP2(x)is analytic atx=0(xP2(x))|x=0=1x2P3(x)is analytic atx=0(x2P3(x))|x=0=14x=0is a regular singular pointCheck to see ifx0=0is a regular singular pointx0=0Multiply by denominators4x2(ddxddxy(x))+4x(ddxy(x))+(4x21)y(x)=0Assume series solution fory(x)y(x)=k=0akxk+rRewrite ODE with series expansionsConvertxmy(x)to series expansion form=0..2xmy(x)=k=0akxk+r+mShift index usingk>kmxmy(x)=k=makmxk+rConvertx(ddxy(x))to series expansionx(ddxy(x))=k=0ak(k+r)xk+rConvertx2(ddxddxy(x))to series expansionx2(ddxddxy(x))=k=0ak(k+r)(k+r1)xk+rRewrite ODE with series expansionsa0(1+2r)(1+2r)xr+a1(3+2r)(1+2r)x1+r+(k=2(ak(2k+2r+1)(2k+2r1)+4ak2)xk+r)=0a0cannot be 0 by assumption, giving the indicial equation(1+2r)(1+2r)=0Values of r that satisfy the indicial equationr{12,12}Each term must be 0a1(3+2r)(1+2r)=0Solve for the dependent coefficient(s)a1=0Each term in the series must be 0, giving the recursion relationak(4k2+8kr+4r21)+4ak2=0Shift index usingk>k+2ak+2(4(k+2)2+8(k+2)r+4r21)+4ak=0Recursion relation that defines series solution to ODEak+2=4ak4k2+8kr+4r2+16k+16r+15Recursion relation forr=12ak+2=4ak4k2+12k+8Solution forr=12[y(x)=k=0akxk12,ak+2=4ak4k2+12k+8,a1=0]Recursion relation forr=12ak+2=4ak4k2+20k+24Solution forr=12[y(x)=k=0akxk+12,ak+2=4ak4k2+20k+24,a1=0]Combine solutions and rename parameters[y(x)=(k=0akxk12)+(k=0bkxk+12),ak+2=4ak4k2+12k+8,a1=0,bk+2=4bk4k2+20k+24,b1=0]
Mathematica. Time used: 0.013 (sec). Leaf size: 58
ode=x^2*D[y[x],{x,2}]+x*D[y[x],x]+(x^2-1/4)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
y(x)c1(x7/224x3/22+1x)+c2(x9/2120x5/26+x)
Sympy. Time used: 0.928 (sec). Leaf size: 42
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + x*Derivative(y(x), x) + (x**2 - 1/4)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
y(x)=C2x(x4120x26+1)+C1(x424x22+1)x+O(x6)