2.2.17 Problem 18

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

Internal problem ID [9140]
Book : Second order enumerated odes
Section : section 2
Problem number : 18
Date solved : Sunday, March 30, 2025 at 02:23:15 PM
CAS classification : [_Gegenbauer, [_2nd_order, _linear, `_with_symmetry_[0,F(x)]`]]

Solved as second order ode using change of variable on x method 2

Time used: 0.373 (sec)

Solve

(x2+1)yxyc2y=0

In normal form the ode

(1)(x2+1)yxyc2y=0

Becomes

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

Where

p(x)=xx21q(x)=c2x21

Applying change of variables τ=g(x) to (2) gives

(3)d2dτ2y(τ)+p1(ddτy(τ))+q1y(τ)=0

Where τ is the new independent variable, and

(4)p1(τ)=τ(x)+p(x)τ(x)τ(x)2(5)q1(τ)=q(x)τ(x)2

Let p1=0. Eq (4) simplifies to

τ(x)+p(x)τ(x)=0

This ode is solved resulting in

τ=ep(x)dxdx=exx21dxdx=eln(x1)2ln(x+1)2dx=1x1x+1dx(6)=(x1)(x+1)ln(x+x21)x1x+1

Using (6) to evaluate q1 from (5) gives

q1(τ)=q(x)τ(x)2=c2x211(x+1)(x1)(7)=c2

Substituting the above in (3) and noting that now p1=0 results in

d2dτ2y(τ)+q1y(τ)=0d2dτ2y(τ)+c2y(τ)=0

The above ode is now solved for y(τ).This is second order with constant coefficients homogeneous ODE. In standard form the ODE is

Ay(τ)+By(τ)+Cy(τ)=0

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

(1)λ2eτλ+c2eτλ=0

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

(2)c2+λ2=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=c2 into the above gives

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

Hence

λ1=+c2λ2=c2

Which simplifies to

λ1=icλ2=ic

Since roots are complex conjugate of each others, then let the roots be

λ1,2=α±iβ

Where α=0 and β=c. Therefore the final solution, when using Euler relation, can be written as

y=eατ(c1cos(βτ)+c2sin(βτ))

Which becomes

y=e0(c1cos(cτ)+c2sin(cτ))

Or

y=c1cos(cτ)+c2sin(cτ)

Will add steps showing solving for IC soon.

The above solution is now transformed back to y(x) using (6) which results in

y(x)=c1cos(c(x1)(x+1)ln(x+x21)x1x+1)+c2sin(c(x1)(x+1)ln(x+x21)x1x+1)

Will add steps showing solving for IC soon.

Summary of solutions found

y(x)=c1cos(c(x1)(x+1)ln(x+x21)x1x+1)+c2sin(c(x1)(x+1)ln(x+x21)x1x+1)

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

Time used: 0.173 (sec)

Solve

(x2+1)yxyc2y=0

In normal form the ode

(1)(x2+1)yxyc2y=0

Becomes

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

Where

p(x)=xx21q(x)=c2x21

Applying change of variables τ=g(x) to (2) results

(3)d2dτ2y(τ)+p1(ddτy(τ))+q1y(τ)=0

Where τ is the new independent variable, and

(4)p1(τ)=τ(x)+p(x)τ(x)τ(x)2(5)q1(τ)=q(x)τ(x)2

Let q1=c2 where c is some constant. Therefore from (5)

τ=1cq(6)=c2x21cτ=c2xcc2x21(x21)2

Substituting the above into (4) results in

p1(τ)=τ(x)+p(x)τ(x)τ(x)2=c2xcc2x21(x21)2+xx21c2x21c(c2x21c)2=0

Therefore ode (3) now becomes

y(τ)+p1y(τ)+q1y(τ)=0(7)d2dτ2y(τ)+c2y(τ)=0

The above ode is now solved for y(τ). Since the ode is now constant coefficients, it can be easily solved to give

y(τ)=c1cos(cτ)+c2sin(cτ)

Now from (6)

τ=1cqdx=c2x21dxc=c2x21x21ln(x+x21)c

Substituting the above into the solution obtained gives

y=c1cos(c2x21x21ln(x+x21))+c2sin(c2x21x21ln(x+x21))

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1cos(c2x21x21ln(x+x21))+c2sin(c2x21x21ln(x+x21))

Solved as second order ode using Kovacic algorithm

Time used: 0.526 (sec)

Solve

(x2+1)yxyc2y=0

Writing the ode as

(1)(x2+1)yxyc2y=0(2)Ay+By+Cy=0

Comparing (1) and (2) shows that

A=x2+1(3)B=xC=c2

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=4c2x2+4c2x224(x21)2

Comparing the above to (5) shows that

s=4c2x2+4c2x22t=4(x21)2

Therefore eq. (4) becomes

(7)z(x)=(4c2x2+4c2x224(x21)2)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.34: 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)=42=2

The poles of r in eq. (7) and the order of each pole are determined by solving for the roots of t=4(x21)2. There is a pole at x=1 of order 2. There is a pole at x=1 of order 2. Since there is no odd order pole larger than 2 and the order at is 2 then the necessary conditions for case one are met. Since there is a pole of order 2 then necessary conditions for case two are met. Since pole order is not larger than 2 and the order at is 2 then the necessary conditions for case three are met. Therefore

L=[1,2,4,6,12]

Attempting to find a solution using case n=1.

Unable to find solution using case one

Attempting to find a solution using case n=2.

Looking at poles of order 2. The partial fractions decomposition of r is

r=316(x+1)2+116+c22x+1316(x1)2+116c22x1

For the pole at x=1 let b be the coefficient of 1(x1)2 in the partial fractions decomposition of r given above. Therefore b=316. Hence

Ec={2,2+21+4b,221+4b}={1,2,3}

For the pole at x=1 let b be the coefficient of 1(x+1)2 in the partial fractions decomposition of r given above. Therefore b=316. Hence

Ec={2,2+21+4b,221+4b}={1,2,3}

Since the order of r at is 2 then let b be the coefficient of 1x2 in the Laurent series expansion of r at . which can be found by dividing the leading coefficient of s by the leading coefficient of t from

r=st=4c2x2+4c2x224(x21)2

Since the gcd(s,t)=1. This gives b=1. Hence

E={2,2+21+4b,221+4b}={2}

The following table summarizes the findings so far for poles and for the order of r at for case 2 of Kovacic algorithm.

pole c location pole order Ec
1 2 {1,2,3}
1 2 {1,2,3}

Order of r at E
2 {2}

Using the family {e1,e2,,e} given by

e1=1,e2=1,e=2

Gives a non negative integer d (the degree of the polynomial p(x)), which is generated using

d=12(ecΓec)=12(2(1+(1)))=0

We now form the following rational function

θ=12cΓecxc=12(1(x(1))+1(x(1)))=12x2+12x+2

Now we search for a monic polynomial p(x) of degree d=0 such that

(1A)p+3θp+(3θ2+3θ4r)p+(θ+3θθ+θ34rθ2r)p=0

Since d=0, then letting

(2A)p=1

Substituting p and θ into Eq. (1A) gives

0=0

And solving for p gives

p=1

Now that p(x) is found let

ϕ=θ+pp=12x2+12x+2

Let ω be the solution of

ω2ϕω+(12ϕ+12ϕ2r)=0

Substituting the values for ϕ and r into the above equation gives

w2(12x2+12x+2)w+4c2x24c2+x24(x21)2=0

Solving for ω gives

ω=x+2cx2+12(x1)(x+1)

Therefore the first solution to the ode z=rz is

z1(x)=eωdx=ex+2cx2+12(x1)(x+1)dx=(x21)1/4ecarcsin(x)

The first solution to the original ode in y is found from

y1=z1e12BAdx=z1e12xx2+1dx=z1eln(x1)4ln(x+1)4=z1(1(x1)1/4(x+1)1/4)

Which simplifies to

y1=(x21)1/4ecarcsin(x)(x1)1/4(x+1)1/4

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

y2=y1eBAdxy12dx

Substituting gives

y2=y1exx2+1dx(y1)2dx=y1eln(x1)2ln(x+1)2(y1)2dx=y1(eln(x1)2ln(x+1)2x1x+1e2carcsin(x)x21dx)

Therefore the solution is

y=c1y1+c2y2=c1((x21)1/4ecarcsin(x)(x1)1/4(x+1)1/4)+c2((x21)1/4ecarcsin(x)(x1)1/4(x+1)1/4(eln(x1)2ln(x+1)2x1x+1e2carcsin(x)x21dx))

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1(x21)1/4ecarcsin(x)(x1)1/4(x+1)1/4+c2(x21)1/4ecarcsin(x)e2carcsin(x)x21dx(x1)1/4(x+1)1/4
Maple. Time used: 0.002 (sec). Leaf size: 35
ode:=(-x^2+1)*diff(diff(y(x),x),x)-diff(y(x),x)*x-c^2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
y=c1(x+x21)ic+c2(x+x21)ic

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)] 
<- linear_1 successful
 

Maple step by step

Let’s solve(x2+1)(ddxddxy(x))x(ddxy(x))c2y(x)=0Highest derivative means the order of the ODE is2ddxddxy(x)Isolate 2nd derivativeddxddxy(x)=c2y(x)x21x(ddxy(x))x21Group terms withy(x)on the lhs of the ODE and the rest on the rhs of the ODE; ODE is linearddxddxy(x)+x(ddxy(x))x21+c2y(x)x21=0Check to see ifx0is a regular singular pointDefine functions[P2(x)=xx21,P3(x)=c2x21](x+1)P2(x)is analytic atx=1((x+1)P2(x))|x=1=12(x+1)2P3(x)is analytic atx=1((x+1)2P3(x))|x=1=0x=1is a regular singular pointCheck to see ifx0is a regular singular pointx0=1Multiply by denominators(x21)(ddxddxy(x))+x(ddxy(x))+c2y(x)=0Change variables usingx=u1so that the regular singular point is atu=0(u22u)(ddudduy(u))+(u1)(dduy(u))+c2y(u)=0Assume series solution fory(u)y(u)=k=0akuk+rRewrite ODE with series expansionsConvertum(dduy(u))to series expansion form=0..1um(dduy(u))=k=0ak(k+r)uk+r1+mShift index usingk>k+1mum(dduy(u))=k=1+mak+1m(k+1m+r)uk+rConvertum(ddudduy(u))to series expansion form=1..2um(ddudduy(u))=k=0ak(k+r)(k+r1)uk+r2+mShift index usingk>k+2mum(ddudduy(u))=k=2+mak+2m(k+2m+r)(k+1m+r)uk+rRewrite ODE with series expansionsa0r(1+2r)u1+r+(k=0(ak+1(k+1+r)(2k+1+2r)+ak(c2+k2+2kr+r2))uk+r)=0a0cannot be 0 by assumption, giving the indicial equationr(1+2r)=0Values of r that satisfy the indicial equationr{0,12}Each term in the series must be 0, giving the recursion relation2(k+1+r)(k+12+r)ak+1+ak(c2+k2+2kr+r2)=0Recursion relation that defines series solution to ODEak+1=ak(c2+k2+2kr+r2)(k+1+r)(2k+1+2r)Recursion relation forr=0ak+1=ak(c2+k2)(k+1)(2k+1)Solution forr=0[y(u)=k=0akuk,ak+1=ak(c2+k2)(k+1)(2k+1)]Revert the change of variablesu=x+1[y(x)=k=0ak(x+1)k,ak+1=ak(c2+k2)(k+1)(2k+1)]Recursion relation forr=12ak+1=ak(c2+k2+k+14)(k+32)(2k+2)Solution forr=12[y(u)=k=0akuk+12,ak+1=ak(c2+k2+k+14)(k+32)(2k+2)]Revert the change of variablesu=x+1[y(x)=k=0ak(x+1)k+12,ak+1=ak(c2+k2+k+14)(k+32)(2k+2)]Combine solutions and rename parameters[y(x)=(k=0ak(x+1)k)+(k=0bk(x+1)k+12),ak+1=ak(c2+k2)(k+1)(2k+1),bk+1=bk(c2+k2+k+14)(k+32)(2k+2)]
Mathematica. Time used: 0.045 (sec). Leaf size: 42
ode=(1-x^2)*D[y[x],{x,2}]-x*D[y[x],x]-c^2*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)c1cos(clog(x21+x))+c2sin(clog(x21+x))
Sympy
from sympy import * 
x = symbols("x") 
c = symbols("c") 
y = Function("y") 
ode = Eq(-c**2*y(x) - x*Derivative(y(x), x) + (1 - x**2)*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False