83.41.15 problem 5 (ii)

Internal problem ID [19416]
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 at end of chapter VIII. Page 141
Problem number : 5 (ii)
Date solved : Thursday, March 13, 2025 at 02:24:35 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

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