58.12.23 problem 23

Internal problem ID [14808]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.4. Variation of parameters. Exercises page 162
Problem number : 23
Date solved : Thursday, October 02, 2025 at 09:55:09 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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