2.2.39 Problem 38

Solved as second order Bessel ode
Maple
Mathematica
Sympy

Internal problem ID [8842]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 38
Date solved : Friday, April 25, 2025 at 05:13:31 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

Solved as second order Bessel ode

Time used: 0.631 (sec)

Solve

y2x2yx4+1=0

Writing the ode as

(1)x2y2x4y=x2(x41)

Let the solution be

y=yh+yp

Where yh is the solution to the homogeneous ODE and yp is a particular solution to the non-homogeneous ODE. 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β=i22n=14γ=2

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

y=c1xBesselJ(14,i2x22)+c2xBesselY(14,i2x22)

Therefore the homogeneous solution yh is

yh=c1xBesselJ(14,i2x22)+c2xBesselY(14,i2x22)

The particular solution yp can be found using either the method of undetermined coefficients, or the method of variation of parameters. The method of variation of parameters will be used as it is more general and can be used when the coefficients of the ODE depend on x as well. Let

(1)yp(x)=u1y1+u2y2

Where u1,u2 to be determined, and y1,y2 are the two basis solutions (the two linearly independent solutions of the homogeneous ODE) found earlier when solving the homogeneous ODE as

y1=xBesselJ(14,i2x22)y2=xBesselY(14,i2x22)

In the Variation of parameters u1,u2 are found using

(2)u1=y2f(x)aW(x)(3)u2=y1f(x)aW(x)

Where W(x) is the Wronskian and a is the coefficient in front of y in the given ODE. The Wronskian is given by W=|y1y2y1y2|. Hence

W=|xBesselJ(14,i2x22)xBesselY(14,i2x22)ddx(xBesselJ(14,i2x22))ddx(xBesselY(14,i2x22))|

Which gives

W=|xBesselJ(14,i2x22)xBesselY(14,i2x22)BesselJ(14,i2x22)2x+ix3/2(BesselJ(54,i2x22)i2BesselJ(14,i2x22)4x2)2BesselY(14,i2x22)2x+ix3/2(BesselY(54,i2x22)i2BesselY(14,i2x22)4x2)2|

Therefore

W=(xBesselJ(14,i2x22))(BesselY(14,i2x22)2x+ix3/2(BesselY(54,i2x22)i2BesselY(14,i2x22)4x2)2)(xBesselY(14,i2x22))(BesselJ(14,i2x22)2x+ix3/2(BesselJ(54,i2x22)i2BesselJ(14,i2x22)4x2)2)

Which simplifies to

W=ix22(BesselJ(14,i2x22)BesselY(54,i2x22)BesselY(14,i2x22)BesselJ(54,i2x22))

Which simplifies to

W=4π

Therefore Eq. (2) becomes

u1=x5/2BesselY(14,i2x22)(x41)4x2πdx

Which simplifies to

u1=xBesselY(14,i2x22)(x41)π4dx

Hence

u1=0xαBesselY(14,i2α22)(α41)π4dα

And Eq. (3) becomes

u2=x5/2BesselJ(14,i2x22)(x41)4x2πdx

Which simplifies to

u2=xBesselJ(14,i2x22)(x41)π4dx

Hence

u2=0xαBesselJ(14,i2α22)(α41)π4dα

Therefore the particular solution, from equation (1) is

yp(x)=0xαBesselY(14,i2α22)(α41)π4dαxBesselJ(14,i2x22)+xBesselY(14,i2x22)0xαBesselJ(14,i2α22)(α41)π4dα

Which simplifies to

yp(x)=xπ(BesselJ(14,i2x22)0xαBesselY(14,i2α22)(α41)dα+BesselY(14,i2x22)0xαBesselJ(14,i2α22)(α41)dα)4

Therefore the general solution is

y=yh+yp=(c1xBesselJ(14,i2x22)+c2xBesselY(14,i2x22))+(xπ(BesselJ(14,i2x22)0xαBesselY(14,i2α22)(α41)dα+BesselY(14,i2x22)0xαBesselJ(14,i2α22)(α41)dα)4)

Will add steps showing solving for IC soon.

Summary of solutions found

y=c1xBesselJ(14,i2x22)+c2xBesselY(14,i2x22)+xπ(BesselJ(14,i2x22)0xαBesselY(14,i2α22)(α41)dα+BesselY(14,i2x22)0xαBesselJ(14,i2α22)(α41)dα)4

Maple. Time used: 0.004 (sec). Leaf size: 40
ode:=diff(diff(y(x),x),x)-2*x^2*y(x)-x^4+1 = 0; 
dsolve(ode,y(x), singsol=all);
 
y=xBesselI(14,2x22)c2+xBesselK(14,2x22)c1x22

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying high order exact linear fully integrable 
trying differential order: 2; linear nonhomogeneous with symmetry [0,1] 
trying a double symmetry of the form [xi=0, eta=F(x)] 
-> Try solving first the homogeneous part of the ODE 
   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 
   <- No Liouvillian solutions exists 
   -> Trying a solution in terms of special functions: 
      -> Bessel 
      <- Bessel successful 
   <- special function solution successful 
<- solving first the homogeneous part of the ODE successful
 

Mathematica. Time used: 4.079 (sec). Leaf size: 288
ode=D[y[x],{x,2}]-2*x^2*y[x]-x^4+1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)ParabolicCylinderD(12,23/4x)(1x(K[1]41)ParabolicCylinderD(12,i23/4K[1])i23/4HermiteH(12,24K[1])HermiteH(12,i24K[1])+ParabolicCylinderD(12,i23/4K[1])(22K[1]ParabolicCylinderD(12,23/4K[1])23/4ParabolicCylinderD(12,23/4K[1]))dK[1]+c1)+ParabolicCylinderD(12,i23/4x)(1xi(K[2]41)ParabolicCylinderD(12,23/4K[2])23/4HermiteH(12,24K[2])HermiteH(12,i24K[2])+iParabolicCylinderD(12,i23/4K[2])(23/4ParabolicCylinderD(12,23/4K[2])22K[2]ParabolicCylinderD(12,23/4K[2]))dK[2]+c2)
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**4 - 2*x**2*y(x) + Derivative(y(x), (x, 2)) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : solve: Cannot solve -x**4 - 2*x**2*y(x) + Derivative(y(x), (x, 2)) + 1