85.41.1 problem 1

Internal problem ID [22767]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. C Exercises at page 178
Problem number : 1
Date solved : Thursday, October 02, 2025 at 09:14:27 PM
CAS classification : [_Hermite]

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

Using reduction of order method given that one solution is

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