75.20.26 problem 665

Internal problem ID [17081]
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 : 665
Date solved : Thursday, March 13, 2025 at 09:13:20 AM
CAS classification : [[_2nd_order, _missing_y]]

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

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