78.14.16 problem 6 (a)

Internal problem ID [18281]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 3. Second order linear equations. Section 19. The Method of Variation of Parameters. Problems at page 135
Problem number : 6 (a)
Date solved : Monday, March 31, 2025 at 05:24:43 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.005 (sec). Leaf size: 20
ode:=(x^2-1)*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+2*y(x) = (x^2-1)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_2 x +c_1 \,x^{2}+c_1 +\frac {1}{2}+\frac {1}{6} x^{4} \]
Mathematica. Time used: 0.194 (sec). Leaf size: 111
ode=(x^2-1)*D[y[x],{x,2}]-2*x*D[y[x],x] +2*y[x]==(x^2-1)^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {-x^6+4 x^4-2 x^3+3 x^2 \left (-1+2 c_1 \sqrt {-\left (x^2-1\right )^2}\right )+2 x \left (-6 c_1 \sqrt {-\left (x^2-1\right )^2}+3 c_2 \sqrt {-\left (x^2-1\right )^2}+1\right )+6 c_1 \sqrt {-\left (x^2-1\right )^2}}{6-6 x^2} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x*Derivative(y(x), x) - (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*(-x**2 + Derivative(y(x), (x, 2)) + 2) + 2*y(x) - Derivative(y(x), (x, 2)) - 1)/(2*x) cannot be solved by the factorable group method