83.49.19 problem Ex 19 page 134

Internal problem ID [19561]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter VIII. Linear equations of second order
Problem number : Ex 19 page 134
Date solved : Monday, March 31, 2025 at 07:33:30 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x y^{\prime \prime }+\left (x -1\right ) y^{\prime }-y&=x^{2} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 19
ode:=x*diff(diff(y(x),x),x)+(x-1)*diff(y(x),x)-y(x) = x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (x -1\right ) c_2 +{\mathrm e}^{-x} c_1 +x^{2} \]
Mathematica. Time used: 0.037 (sec). Leaf size: 27
ode=x*D[y[x],{x,2}]+(x-1)*D[y[x],x]-y[x]==x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^2-2 x+c_1 e^{-x}+c_2 (x-1)+2 \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x*Derivative(y(x), (x, 2)) + (x - 1)*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x**2 - x*Derivative(y(x), (x, 2)) + y(x))/(x - 1) cannot be solved by the factorable group method