64.12.22 problem 22

Internal problem ID [13455]
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 : 22
Date solved : Monday, March 31, 2025 at 07:58:23 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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