59.1.815 problem 838

Internal problem ID [9987]
Book : Collection of Kovacic problems
Section : section 1
Problem number : 838
Date solved : Wednesday, March 05, 2025 at 08:01:50 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }&=\left (x^{2}+3\right ) y \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 30
ode:=diff(diff(y(x),x),x) = (x^2+3)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (c_{2} \operatorname {erf}\left (x \right ) \sqrt {\pi }+c_{1} \right ) {\mathrm e}^{\frac {x^{2}}{2}}+{\mathrm e}^{-\frac {x^{2}}{2}} c_{2} \]
Mathematica. Time used: 0.062 (sec). Leaf size: 46
ode=D[y[x],{x,2}]==(x^2+3)*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-\frac {x^2}{2}} \left (-\sqrt {\pi } c_2 e^{x^2} x \text {erf}(x)+c_1 e^{x^2} x-c_2\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x**2 - 3)*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False