81.12.17 problem 16-18

Internal problem ID [21670]
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-18
Date solved : Thursday, October 02, 2025 at 07:59:41 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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