77.36.6 problem 6

Internal problem ID [20724]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (A) at page 125
Problem number : 6
Date solved : Thursday, October 02, 2025 at 06:22:26 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} -y+x y^{\prime }+y^{\prime \prime }&=X \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 36
ode:=diff(diff(y(x),x),x)+x*diff(y(x),x)-y(x) = X; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \pi \,\operatorname {erf}\left (\frac {\sqrt {2}\, x}{2}\right ) c_1 x +\sqrt {\pi }\, \sqrt {2}\, {\mathrm e}^{-\frac {x^{2}}{2}} c_1 +c_2 x -X \]
Mathematica. Time used: 0.045 (sec). Leaf size: 48
ode=D[y[x],{x,2}]+x*D[y[x],x]-y[x]==X; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sqrt {\frac {\pi }{2}} c_2 x \text {erf}\left (\frac {x}{\sqrt {2}}\right )-c_2 e^{-\frac {x^2}{2}}+c_1 x-X \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
X = symbols("X") 
y = Function("y") 
ode = Eq(-X + x*Derivative(y(x), x) - y(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) - Derivative(y(x), (x, 2)))/x cannot be solved by the factorable group method