2.2.3 Problem 3

Maple
Mathematica
Sympy

Internal problem ID [9126]
Book : Second order enumerated odes
Section : section 2
Problem number : 3
Date solved : Sunday, March 30, 2025 at 02:17:05 PM
CAS classification : [_Liouville, [_2nd_order, _reducible, _mu_x_y1], [_2nd_order, _reducible, _mu_xy]]

Maple. Time used: 0.021 (sec). Leaf size: 61
ode:=diff(diff(y(x),x),x)+(1-x)*diff(y(x),x)+y(x)^2*diff(y(x),x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ c_1 \,\operatorname {erf}\left (\frac {i \sqrt {2}\, \left (x -1\right )}{2}\right )-c_2 +\frac {2 \,3^{{5}/{6}} y \pi }{9 \Gamma \left (\frac {2}{3}\right ) \left (-y^{3}\right )^{{1}/{3}}}-\frac {y \Gamma \left (\frac {1}{3}, -\frac {y^{3}}{3}\right ) 3^{{1}/{3}}}{3 \left (-y^{3}\right )^{{1}/{3}}} = 0 \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying 2nd order Liouville 
<- 2nd_order Liouville successful
 

Mathematica. Time used: 16.947 (sec). Leaf size: 64
ode=D[y[x],{x,2}]+(1-x)*D[y[x],x]+y[x]^2*(D[y[x],x])^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \text {InverseFunction}\left [-\frac {\text {$\#$1} \Gamma \left (\frac {1}{3},-\frac {\text {$\#$1}^3}{3}\right )}{3^{2/3} \sqrt [3]{-\text {$\#$1}^3}}\&\right ]\left [\int _1^x-e^{\frac {1}{2} (K[2]-2) K[2]} c_1dK[2]+c_2\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - x)*Derivative(y(x), x) + y(x)**2*Derivative(y(x), x)**2 + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(x + sqrt(x**2 - 2*x - 4*y(x)**2*Derivative(y(x), (x, 2)) + 1) - 1)/(2*y(x)**2) + Derivative(y(x), x) cannot be solved by the factorable group method