81.12.16 problem 16-17

Internal problem ID [21669]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 16. Variation of Parameters. Page 375.
Problem number : 16-17
Date solved : Thursday, October 02, 2025 at 07:59:39 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x y^{\prime \prime }+y^{\prime }-\frac {4 y}{x}&=x^{3}+x \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 34
ode:=x*diff(diff(y(x),x),x)+diff(y(x),x)-4*y(x)/x = x^3+x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {12 \ln \left (x \right ) x^{4}+4 x^{6}+\left (48 c_1 -3\right ) x^{4}+48 c_2}{48 x^{2}} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 36
ode=x*D[y[x],{x,2}]+D[y[x],x]-4/x*y[x]==x+x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{48} x^2 \left (4 x^2+12 \log (x)-3\right )+c_2 x^2+\frac {c_1}{x^2} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - x + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 4*y(x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : solve: Cannot solve -x**3 - x + Derivative(y(x), x) + Derivative(y(x), (x, 2)) - 4*y(x)/x