2.4.40 Problem 37

Maple
Mathematica
Sympy

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

Solve

x2(x22x+1)yx(3+x)y+(4+x)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.

(x42x3+x2)y+(x23x)y+(4+x)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)=3+xx(x1)2q(x)=4+xx2(x1)2
Table 2.93: Table p(x),q(x) singularites.
p(x)=3+xx(x1)2
singularity type
x=0 “regular”
x=1 “irregular”
q(x)=4+xx2(x1)2
singularity type
x=0 “regular”
x=1 “regular”

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

Regular singular points : [0,]

Irregular singular points : [1]

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

x2(x22x+1)y+(x23x)y+(4+x)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(x22x+1)(n=0(n+r)(n+r1)anxn+r2)+(x23x)(n=0(n+r)anxn+r1)+(4+x)(n=0anxn+r)=0

Which simplifies to

(2A)(n=0xn+r+2an(n+r)(n+r1))+n=0(2x1+n+ran(n+r)(n+r1))+(n=0xn+ran(n+r)(n+r1))+n=0(x1+n+ran(n+r))+n=0(3xn+ran(n+r))+(n=04anxn+r)+(n=0x1+n+ran)=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+r)(n+r1)=n=2an2(n+r2)(n3+r)xn+rn=0(2x1+n+ran(n+r)(n+r1))=n=1(2an1(n+r1)(n+r2)xn+r)n=0(x1+n+ran(n+r))=n=1(an1(n+r1)xn+r)n=0x1+n+ran=n=1an1xn+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=2an2(n+r2)(n3+r)xn+r)+n=1(2an1(n+r1)(n+r2)xn+r)+(n=0xn+ran(n+r)(n+r1))+n=1(an1(n+r1)xn+r)+n=0(3xn+ran(n+r))+(n=04anxn+r)+(n=1an1xn+r)=0

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

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

When n=0 the above becomes

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

Or

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

Since a00 then the above simplifies to

(r2)2xr=0

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

(r2)2=0

Solving for r gives the roots of the indicial equation as

r1=2r2=2

Since a00 then the indicial equation becomes

(r2)2xr=0

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

Since the root of the indicial equation is repeated, then we can construct two linearly independent solutions. The first solution has the form

(1A)y1(x)=n=0anxn+r

Now the second solution y2 is found using

(1B)y2(x)=y1(x)ln(x)+(n=1bnxn+r)

Then the general solution will be

y=c1y1(x)+c2y2(x)

In Eq (1B) the sum starts from 1 and not zero. In Eq (1A), a0 is never zero, and is arbitrary and is typically taken as a0=1, and {c1,c2} are two arbitray constants of integration which can be found from initial conditions. Using the value of the indicial root found earlier, r=2, Eqs (1A,1B) become

y1(x)=n=0anxn+2y2(x)=y1(x)ln(x)+(n=1bnxn+2)

We start by finding the first solution y1(x). 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=2r+11+r

For 2n the recursive equation is

(3)an2(n+r2)(n3+r)2an1(n+r1)(n+r2)+an(n+r)(n+r1)an1(n+r1)3an(n+r)+4an+an1=0

Solving for an from recursive equation (4) gives

(4)an=nan22nan1+ran22ran13an2+an1n+r2

Which for the root r=2 becomes

(5)an=(an2+2an1)n+an2+3an1n

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

n an,r an
a0 1 1
a1 2r+11+r 5

For n=2, using the above recursive equation gives

a2=3r2+10r+2r(1+r)

Which for the root r=2 becomes

a2=17

And the table now becomes

n an,r an
a0 1 1
a1 2r+11+r 5
a2 3r2+10r+2r(1+r) 17

For n=3, using the above recursive equation gives

a3=4r3+34r2+54r+10r3r

Which for the root r=2 becomes

a3=1433

And the table now becomes

n an,r an
a0 1 1
a1 2r+11+r 5
a2 3r2+10r+2r(1+r) 17
a3 4r3+34r2+54r+10r3r 1433

For n=4, using the above recursive equation gives

a4=5r4+80r3+321r2+384r+68(2+r)r(r21)

Which for the root r=2 becomes

a4=3553

And the table now becomes

n an,r an
a0 1 1
a1 2r+11+r 5
a2 3r2+10r+2r(1+r) 17
a3 4r3+34r2+54r+10r3r 1433
a4 5r4+80r3+321r2+384r+68(2+r)r(r21) 3553

For n=5, using the above recursive equation gives

a5=6r5+155r4+1156r3+3295r2+3336r+572r5+5r4+5r35r26r

Which for the root r=2 becomes

a5=404315

And the table now becomes

n an,r an
a0 1 1
a1 2r+11+r 5
a2 3r2+10r+2r(1+r) 17
a3 4r3+34r2+54r+10r3r 1433
a4 5r4+80r3+321r2+384r+68(2+r)r(r21) 3553
a5 6r5+155r4+1156r3+3295r2+3336r+572r5+5r4+5r35r26r 404315

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

y1(x)=x2(a0+a1x+a2x2+a3x3+a4x4+a5x5+a6x6)=x2(17x2+5x+1+143x33+355x43+4043x515+O(x6))

Now the second solution is found. The second solution is given by

y2(x)=y1(x)ln(x)+(n=1bnxn+r)

Where bn is found using

bn=ddran,r

And the above is then evaluated at r=2. The above table for an,r is used for this purpose. Computing the derivatives gives the following table

n bn,r an bn,r=ddran,r bn(r=2)
b0 1 1 N/A since bn starts from 1 N/A
b1 2r+11+r 5 3(1+r)2 3
b2 3r2+10r+2r(1+r) 17 13r24r+2r2(1+r)2 292
b3 4r3+34r2+54r+10r3r 1433 34r4116r364r2+10r2(r21)2 85918
b4 5r4+80r3+321r2+384r+68(2+r)r(r21) 3553 70r6652r51904r42128r3666r2+136r+136(2+r)2r2(r21)2 469336
b5 6r5+155r4+1156r3+3295r2+3336r+572r5+5r4+5r35r26r 404315 125r82252r714980r647988r577945r458672r311670r2+5720r+3432r2(r4+5r3+5r25r6)2 285181900

The above table gives all values of bn needed. Hence the second solution is

y2(x)=y1(x)ln(x)+b0+b1x+b2x2+b3x3+b4x4+b5x5+b6x6=x2(17x2+5x+1+143x33+355x43+4043x515+O(x6))ln(x)+x2(3x29x22859x3184693x436285181x5900+O(x6))

Therefore the homogeneous solution is

yh(x)=c1y1(x)+c2y2(x)=c1x2(17x2+5x+1+143x33+355x43+4043x515+O(x6))+c2(x2(17x2+5x+1+143x33+355x43+4043x515+O(x6))ln(x)+x2(3x29x22859x3184693x436285181x5900+O(x6)))

Hence the final solution is

y=yh=c1x2(17x2+5x+1+143x33+355x43+4043x515+O(x6))+c2(x2(17x2+5x+1+143x33+355x43+4043x515+O(x6))ln(x)+x2(3x29x22859x3184693x436285181x5900+O(x6)))
Maple. Time used: 0.026 (sec). Leaf size: 48
Order:=6; 
ode:=x^2*(x^2-2*x+1)*diff(diff(y(x),x),x)-(3+x)*x*diff(y(x),x)+(x+4)*y(x) = 0; 
dsolve(ode,y(x),type='series',x=0);
 
y=x2((c2ln(x)+c1)(1+5x+17x2+1433x3+3553x4+404315x5+O(x6))+((3)x292x285918x3469336x4285181900x5+O(x6))c2)

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) 
   Group is reducible, not completely reducible 
<- Kovacics algorithm successful
 

Maple step by step

Let’s solvex2(x22x+1)(ddxddxy(x))x(3+x)(ddxy(x))+(4+x)y(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Isolate 2nd derivativeddxddxy(x)=(4+x)y(x)x2(x22x+1)+(3+x)(ddxy(x))x(x22x+1)Group terms withy(x)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddxddxy(x)(3+x)(ddxy(x))x(x22x+1)+(4+x)y(x)x2(x22x+1)=0Check to see ifx0is a regular singular pointDefine functions[P2(x)=3+xx(x22x+1),P3(x)=4+xx2(x22x+1)]xP2(x)is analytic atx=0(xP2(x))|x=0=3x2P3(x)is analytic atx=0(x2P3(x))|x=0=4x=0is a regular singular pointCheck to see ifx0is a regular singular pointx0=0Multiply by denominatorsx2(x22x+1)(ddxddxy(x))x(3+x)(ddxy(x))+(4+x)y(x)=0Assume series solution fory(x)y(x)=k=0akxk+rRewrite ODE with series expansionsConvertxmy(x)to series expansion form=0..1xmy(x)=k=0akxk+r+mShift index usingk>kmxmy(x)=k=makmxk+rConvertxm(ddxy(x))to series expansion form=1..2xm(ddxy(x))=k=0ak(k+r)xk+r1+mShift index usingk>k+1mxm(ddxy(x))=k=1+mak+1m(k+1m+r)xk+rConvertxm(ddxddxy(x))to series expansion form=2..4xm(ddxddxy(x))=k=0ak(k+r)(k+r1)xk+r2+mShift index usingk>k+2mxm(ddxddxy(x))=k=2+mak+2m(k+2m+r)(k+1m+r)xk+rRewrite ODE with series expansionsa0(2+r)2xr+(a1(1+r)2a0(1+2r)(1+r))x1+r+(k=2(ak(k+r2)2ak1(2k1+2r)(k+r2)+ak2(k+r2)(k3+r))xk+r)=0a0cannot be 0 by assumption, giving the indicial equation(2+r)2=0Values of r that satisfy the indicial equationr=2Each term must be 0a1(1+r)2a0(1+2r)(1+r)=0Solve for the dependent coefficient(s)a1=a0(1+2r)1+rEach term in the series must be 0, giving the recursion relation(k+r2)((ak+ak22ak1)k+(ak+ak22ak1)r2ak3ak2+ak1)=0Shift index usingk>k+2(k+r)((ak+2+ak2ak+1)(k+2)+(ak+2+ak2ak+1)r2ak+23ak+ak+1)=0Recursion relation that defines series solution to ODEak+2=kak2kak+1+rak2rak+1ak3ak+1k+rRecursion relation forr=2ak+2=kak2kak+1+ak7ak+1k+2Solution forr=2[y(x)=k=0akxk+2,ak+2=kak2kak+1+ak7ak+1k+2,a1=5a0]
Mathematica. Time used: 0.023 (sec). Leaf size: 118
ode=x^2*(1-2*x+x^2)*D[y[x],{x,2}] -x*(3+x)*D[y[x],x]+(4+x)*y[x] == 0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,5}]
 
y(x)c1(4043x515+355x43+143x33+17x2+5x+1)x2+c2((285181x59004693x436859x31829x223x)x2+(4043x515+355x43+143x33+17x2+5x+1)x2log(x))
Sympy. Time used: 1.133 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*(x**2 - 2*x + 1)*Derivative(y(x), (x, 2)) - x*(x + 3)*Derivative(y(x), x) + (x + 4)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
y(x)=C1x2+O(x6)