2.4.48 Problem 45

Maple
Mathematica
Sympy

Internal problem ID [8937]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 45
Date solved : Sunday, March 30, 2025 at 01:55:50 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

Solve

x2y+4xy+(x2+2)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+4xy+(x2+2)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)=4xq(x)=x2+2x2
Table 2.100: Table p(x),q(x) singularites.
p(x)=4x
singularity type
x=0 “regular”
q(x)=x2+2x2
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+4xy+(x2+2)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)+4x(n=0(n+r)anxn+r1)+(x2+2)(n=0anxn+r)=0

Which simplifies to

(2A)(n=0xn+ran(n+r)(n+r1))+(n=04xn+ran(n+r))+(n=0xn+r+2an)+(n=02anxn+r)=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=04xn+ran(n+r))+(n=2an2xn+r)+(n=02anxn+r)=0

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

xn+ran(n+r)(n+r1)+4xn+ran(n+r)+2anxn+r=0

When n=0 the above becomes

xra0r(1+r)+4xra0r+2a0xr=0

Or

(xrr(1+r)+4xrr+2xr)a0=0

Since a00 then the above simplifies to

(r2+3r+2)xr=0

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

r2+3r+2=0

Solving for r gives the roots of the indicial equation as

r1=1r2=2

Since a00 then the indicial equation becomes

(r2+3r+2)xr=0

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

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)=n=0anxnxy2(x)=Cy1(x)ln(x)+n=0bnxnx2

Or

y1(x)=n=0anxn1y2(x)=Cy1(x)ln(x)+(n=0bnxn2)

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)+4an(n+r)+an2+2an=0

Solving for an from recursive equation (4) gives

(4)an=an2n2+2nr+r2+3n+3r+2

Which for the root r=1 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=1 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=1r2+7r+12

Which for the root r=1 becomes

a2=16

And the table now becomes

n an,r an
a0 1 1
a1 0 0
a2 1r2+7r+12 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 1r2+7r+12 16
a3 0 0

For n=4, using the above recursive equation gives

a4=1(r+4)(r+3)(r+6)(r+5)

Which for the root r=1 becomes

a4=1120

And the table now becomes

n an,r an
a0 1 1
a1 0 0
a2 1r2+7r+12 16
a3 0 0
a4 1(r+4)(r+3)(r+6)(r+5) 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 1r2+7r+12 16
a3 0 0
a4 1(r+4)(r+3)(r+6)(r+5) 1120
a5 0 0

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

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

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=limr20=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=0bnxn2

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)+4bn(n+r)+bn2+2bn=0

Which for for the root r=2 becomes

(4A)bn(n2)(n3)+4bn(n2)+bn2+2bn=0

Solving for bn from the recursive equation (4) gives

(5)bn=bn2n2+2nr+r2+3n+3r+2

Which for the root r=2 becomes

(6)bn=bn2n2n

At this point, it is a good idea to keep track of bn in a table both before substituting r=2 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=1r2+7r+12

Which for the root r=2 becomes

b2=12

And the table now becomes

n bn,r bn
b0 1 1
b1 0 0
b2 1r2+7r+12 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 1r2+7r+12 12
b3 0 0

For n=4, using the above recursive equation gives

b4=1(r2+7r+12)(r2+11r+30)

Which for the root r=2 becomes

b4=124

And the table now becomes

n bn,r bn
b0 1 1
b1 0 0
b2 1r2+7r+12 12
b3 0 0
b4 1(r+4)(r+3)(r+6)(r+5) 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 1r2+7r+12 12
b3 0 0
b4 1(r+4)(r+3)(r+6)(r+5) 124
b5 0 0

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

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

Therefore the homogeneous solution is

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

Hence the final solution is

y=yh=c1(1x26+x4120+O(x6))x+c2(1x22+x424+O(x6))x2
Maple. Time used: 0.025 (sec). Leaf size: 34
Order:=6; 
ode:=x^2*diff(diff(y(x),x),x)+4*diff(y(x),x)*x+(x^2+2)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
y=c1(116x2+1120x4+O(x6))x+c2(112x2+124x4+O(x6))x2

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))+4x(ddxy(x))+(x2+2)y(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Isolate 2nd derivativeddxddxy(x)=(x2+2)y(x)x24(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)+4(ddxy(x))x+(x2+2)y(x)x2=0Check to see ifx0=0is a regular singular pointDefine functions[P2(x)=4x,P3(x)=x2+2x2]xP2(x)is analytic atx=0(xP2(x))|x=0=4x2P3(x)is analytic atx=0(x2P3(x))|x=0=2x=0is a regular singular pointCheck to see ifx0=0is a regular singular pointx0=0Multiply by denominatorsx2(ddxddxy(x))+4x(ddxy(x))+(x2+2)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(2+r)(1+r)xr+a1(3+r)(2+r)x1+r+(k=2(ak(k+r+2)(k+r+1)+ak2)xk+r)=0a0cannot be 0 by assumption, giving the indicial equation(2+r)(1+r)=0Values of r that satisfy the indicial equationr{2,1}Each term must be 0a1(3+r)(2+r)=0Solve for the dependent coefficient(s)a1=0Each term in the series must be 0, giving the recursion relationak(k+r+2)(k+r+1)+ak2=0Shift index usingk>k+2ak+2(k+4+r)(k+3+r)+ak=0Recursion relation that defines series solution to ODEak+2=ak(k+4+r)(k+3+r)Recursion relation forr=2ak+2=ak(k+2)(k+1)Solution forr=2[y(x)=k=0akxk2,ak+2=ak(k+2)(k+1),a1=0]Recursion relation forr=1ak+2=ak(k+3)(k+2)Solution forr=1[y(x)=k=0akxk1,ak+2=ak(k+3)(k+2),a1=0]Combine solutions and rename parameters[y(x)=(k=0akxk2)+(k=0bkxk1),ak+2=ak(k+2)(k+1),a1=0,bk+2=bk(k+3)(k+2),b1=0]
Mathematica. Time used: 0.013 (sec). Leaf size: 40
ode=x^2*D[y[x],{x,2}]+4*x*D[y[x],x]+(x^2+2)*y[x]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
y(x)c2(x3120x6+1x)+c1(x224+1x212)
Sympy. Time used: 0.849 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + 4*x*Derivative(y(x), x) + (x**2 + 2)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
y(x)=C1(x65040+x4120x26+1)x+O(1)