56.2.21 problem 20

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

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

Maple. Time used: 0.009 (sec). Leaf size: 30
ode:=diff(diff(y(x),x),x)-2*diff(y(x),x)-x*y(x)-x^3-x^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \operatorname {AiryAi}\left (1+x \right ) c_2 +{\mathrm e}^{x} \operatorname {AiryBi}\left (1+x \right ) c_1 -x^{2}-x +4 \]
Mathematica. Time used: 7.977 (sec). Leaf size: 91
ode=D[y[x],{x,2}]-2*D[y[x],x]-x*y[x]-x^3-x^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x \left (\operatorname {AiryAi}(x+1) \int _1^x-e^{-K[1]} \pi \operatorname {AiryBi}(K[1]+1) K[1]^2 (K[1]+1)dK[1]+\operatorname {AiryBi}(x+1) \int _1^xe^{-K[2]} \pi \operatorname {AiryAi}(K[2]+1) K[2]^2 (K[2]+1)dK[2]+c_1 \operatorname {AiryAi}(x+1)+c_2 \operatorname {AiryBi}(x+1)\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - x**2 - x*y(x) - 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE x**3/2 + x**2/2 + x*y(x)/2 + Derivative(y(x), x) - Derivative(y(x), (x, 2))/2 cannot be solved by the factorable group method