14.12.11 problem Problem 30

Internal problem ID [3805]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.10, Chapter review. page 575
Problem number : Problem 30
Date solved : Tuesday, September 30, 2025 at 06:57:34 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+x y&=\sin \left (x \right ) \end{align*}
Maple. Time used: 0.015 (sec). Leaf size: 48
ode:=diff(diff(y(x),x),x)+x*y(x) = sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \pi \int \operatorname {AiryBi}\left (-x \right ) \sin \left (x \right )d x \operatorname {AiryAi}\left (-x \right )-\pi \int \operatorname {AiryAi}\left (-x \right ) \sin \left (x \right )d x \operatorname {AiryBi}\left (-x \right )+\operatorname {AiryAi}\left (-x \right ) c_2 +\operatorname {AiryBi}\left (-x \right ) c_1 \]
Mathematica. Time used: 58.747 (sec). Leaf size: 99
ode=D[y[x],{x,2}]+x*y[x]==Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \operatorname {AiryAi}\left (\sqrt [3]{-1} x\right ) \int _1^x(-1)^{2/3} \pi \operatorname {AiryBi}\left (\sqrt [3]{-1} K[1]\right ) \sin (K[1])dK[1]+\operatorname {AiryBi}\left (\sqrt [3]{-1} x\right ) \int _1^x-(-1)^{2/3} \pi \operatorname {AiryAi}\left (\sqrt [3]{-1} K[2]\right ) \sin (K[2])dK[2]+c_1 \operatorname {AiryAi}\left (\sqrt [3]{-1} x\right )+c_2 \operatorname {AiryBi}\left (\sqrt [3]{-1} x\right ) \end{align*}
Sympy. Time used: 0.040 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) - sin(x) + Derivative(y(x), (x, 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 ) \]