56.2.39 problem 38

Internal problem ID [8843]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 38
Date solved : Sunday, March 30, 2025 at 01:41:51 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-2 x^{2} y-x^{4}+1&=0 \end{align*}

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 = \sqrt {x}\, \operatorname {BesselI}\left (\frac {1}{4}, \frac {\sqrt {2}\, x^{2}}{2}\right ) c_2 +\sqrt {x}\, \operatorname {BesselK}\left (\frac {1}{4}, \frac {\sqrt {2}\, x^{2}}{2}\right ) c_1 -\frac {x^{2}}{2} \]
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)\to \operatorname {ParabolicCylinderD}\left (-\frac {1}{2},2^{3/4} x\right ) \left (\int _1^x\frac {\left (K[1]^4-1\right ) \operatorname {ParabolicCylinderD}\left (-\frac {1}{2},i 2^{3/4} K[1]\right )}{i 2^{3/4} \operatorname {HermiteH}\left (-\frac {1}{2},\sqrt [4]{2} K[1]\right ) \operatorname {HermiteH}\left (\frac {1}{2},i \sqrt [4]{2} K[1]\right )+\operatorname {ParabolicCylinderD}\left (-\frac {1}{2},i 2^{3/4} K[1]\right ) \left (2 \sqrt {2} K[1] \operatorname {ParabolicCylinderD}\left (-\frac {1}{2},2^{3/4} K[1]\right )-2^{3/4} \operatorname {ParabolicCylinderD}\left (\frac {1}{2},2^{3/4} K[1]\right )\right )}dK[1]+c_1\right )+\operatorname {ParabolicCylinderD}\left (-\frac {1}{2},i 2^{3/4} x\right ) \left (\int _1^x\frac {i \left (K[2]^4-1\right ) \operatorname {ParabolicCylinderD}\left (-\frac {1}{2},2^{3/4} K[2]\right )}{2^{3/4} \operatorname {HermiteH}\left (-\frac {1}{2},\sqrt [4]{2} K[2]\right ) \operatorname {HermiteH}\left (\frac {1}{2},i \sqrt [4]{2} K[2]\right )+i \operatorname {ParabolicCylinderD}\left (-\frac {1}{2},i 2^{3/4} K[2]\right ) \left (2^{3/4} \operatorname {ParabolicCylinderD}\left (\frac {1}{2},2^{3/4} K[2]\right )-2 \sqrt {2} K[2] \operatorname {ParabolicCylinderD}\left (-\frac {1}{2},2^{3/4} K[2]\right )\right )}dK[2]+c_2\right ) \]
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