83.49.4 problem Ex 4 page 122

Internal problem ID [19546]
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 4 page 122
Date solved : Monday, March 31, 2025 at 07:32:56 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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