50.2.29 problem 28

Internal problem ID [10119]
Book : Own collection of miscellaneous problems
Section : section 2.0
Problem number : 28
Date solved : Tuesday, September 30, 2025 at 07:03:15 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-x y-x^{3}+2&=0 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 18
ode:=diff(diff(y(x),x),x)-x*y(x)-x^3+2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {AiryAi}\left (x \right ) c_2 +\operatorname {AiryBi}\left (x \right ) c_1 -x^{2} \]
Mathematica. Time used: 0.099 (sec). Leaf size: 59
ode=D[y[x],{x,2}]-x*y[x]-x^3+2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \operatorname {AiryAi}(x) \int _1^x-\pi \operatorname {AiryBi}(K[1]) \left (K[1]^3-2\right )dK[1]+\operatorname {AiryBi}(x) \int _1^x\pi \operatorname {AiryAi}(K[2]) \left (K[2]^3-2\right )dK[2]+c_1 \operatorname {AiryAi}(x)+c_2 \operatorname {AiryBi}(x) \end{align*}
Sympy. Time used: 0.037 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - x*y(x) + Derivative(y(x), (x, 2)) + 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} Ai\left (x\right ) + C_{2} Bi\left (x\right ) \]