34.13.3 problem 23

Internal problem ID [8044]
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 : 23
Date solved : Tuesday, September 30, 2025 at 05:14:40 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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