85.36.15 problem 6 (d)

Internal problem ID [22743]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 171
Problem number : 6 (d)
Date solved : Thursday, October 02, 2025 at 09:14:15 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+\left (1-x \right ) y^{\prime }-y x&=x \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 28
ode:=diff(diff(y(x),x),x)+(1-x)*diff(y(x),x)-x*y(x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} c_2 +{\mathrm e}^{-x} \operatorname {erf}\left (\frac {i \sqrt {2}\, \left (1+x \right )}{2}\right ) c_1 -1 \]
Mathematica. Time used: 0.157 (sec). Leaf size: 45
ode=D[y[x],{x,2}]+(1-x)*D[y[x],x]-x*y[x]==x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \sqrt {\frac {\pi }{2 e}} c_2 e^{-x} \text {erfi}\left (\frac {x+1}{\sqrt {2}}\right )+c_1 e^{-x}-1 \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x) - x + (1 - x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-x*y(x) - x + Derivative(y(x), (x, 2)))/(