34.13.8 problem 28

Internal problem ID [8049]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 18. Linear equations with variable coefficients (Equations of second order). Supplemetary problems. Page 120
Problem number : 28
Date solved : Tuesday, September 30, 2025 at 05:14:44 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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