81.15.14 problem 19-15

Internal problem ID [21722]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 19. Change of variables. Page 483
Problem number : 19-15
Date solved : Thursday, October 02, 2025 at 08:01:18 PM
CAS classification : [_Riccati]

\begin{align*} y^{\prime }+x \left (y-x \right )+x^{3} \left (y-x \right )^{2}&=1 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 40
ode:=diff(y(x),x)+x*(y(x)-x)+x^3*(y(x)-x)^2 = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 \left (x^{3}+2 x -1\right ) {\mathrm e}^{-\frac {x^{2}}{2}}+x}{1+c_1 \left (x^{2}+2\right ) {\mathrm e}^{-\frac {x^{2}}{2}}} \]
Mathematica. Time used: 0.206 (sec). Leaf size: 53
ode=D[y[x],x]+x*(y[x]-x)+x^3*(y[x]-x)^2==1 ; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^3+x \left (2-c_1 e^{\frac {x^2}{2}}\right )-1}{x^2-c_1 e^{\frac {x^2}{2}}+2}\\ y(x)&\to x \end{align*}
Sympy. Time used: 0.265 (sec). Leaf size: 68
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**3*(-x + y(x))**2 + x*(-x + y(x)) + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} x^{3} e^{\frac {x^{2}}{2}} + 2 C_{1} x e^{\frac {x^{2}}{2}} - C_{1} e^{\frac {x^{2}}{2}} - x e^{x^{2}}}{C_{1} x^{2} e^{\frac {x^{2}}{2}} + 2 C_{1} e^{\frac {x^{2}}{2}} - e^{x^{2}}} \]