75.20.13 problem 648

Internal problem ID [17076]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.5 Linear equations with variable coefficients. The Lagrange method. Exercises page 148
Problem number : 648
Date solved : Monday, March 31, 2025 at 03:40:02 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&=x^{2} \end{align*}

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