85.68.5 problem 7

Internal problem ID [22916]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. B Exercises at page 217
Problem number : 7
Date solved : Friday, October 03, 2025 at 08:03:35 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} x y^{\prime \prime \prime }+2 x y^{\prime \prime }-x y^{\prime }-2 y x&=1 \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 48
ode:=x*diff(diff(diff(y(x),x),x),x)+2*x*diff(diff(y(x),x),x)-x*diff(y(x),x)-2*x*y(x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{-2 x} \left (\left (\operatorname {Ei}_{1}\left (x \right )-6 c_1 \right ) {\mathrm e}^{3 x}+3 \left (-\operatorname {Ei}_{1}\left (-x \right )-2 c_3 \right ) {\mathrm e}^{x}+2 \,\operatorname {Ei}_{1}\left (-2 x \right )-6 c_2 \right )}{6} \]
Mathematica. Time used: 0.027 (sec). Leaf size: 58
ode=x*D[y[x],{x,3}]+2*x*D[y[x],{x,2}]-x*D[y[x],{x,1}]-2*x*y[x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{6} e^{-2 x} \left (e^{3 x} \operatorname {ExpIntegralEi}(-x)-3 e^x \operatorname {ExpIntegralEi}(x)+2 \operatorname {ExpIntegralEi}(2 x)+6 c_2 e^x+6 c_3 e^{3 x}+6 c_1\right ) \end{align*}
Sympy. Time used: 0.574 (sec). Leaf size: 41
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*y(x) - x*Derivative(y(x), x) + 2*x*Derivative(y(x), (x, 2)) + x*Derivative(y(x), (x, 3)) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - \frac {\operatorname {Ei}{\left (x \right )}}{2}\right ) e^{- x} + \left (C_{2} + \frac {\operatorname {Ei}{\left (2 x \right )}}{3}\right ) e^{- 2 x} + \left (C_{3} + \frac {\operatorname {Ei}{\left (x e^{i \pi } \right )}}{6}\right ) e^{x} \]