60.1.27 problem 27

Internal problem ID [10041]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 27
Date solved : Sunday, March 30, 2025 at 02:55:08 PM
CAS classification : [_Riccati]

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

Maple. Time used: 0.094 (sec). Leaf size: 73
ode:=diff(y(x),x)+a*y(x)*(y(x)-x)-1 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\sqrt {\pi }\, \operatorname {erf}\left (\frac {\sqrt {2}\, \sqrt {a}\, x}{2}\right ) \sqrt {2}\, a x +2 a^{{3}/{2}} c_1 x +2 \sqrt {a}\, {\mathrm e}^{-\frac {a \,x^{2}}{2}}}{a \left (\sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {\sqrt {2}\, \sqrt {a}\, x}{2}\right )+2 c_1 \sqrt {a}\right )} \]
Mathematica. Time used: 0.527 (sec). Leaf size: 134
ode=D[y[x],x] + a*y[x]*(y[x]-x) - 1==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {\sqrt {2 \pi } c_1 x \text {erf}\left (\frac {\sqrt {a} x}{\sqrt {2}}\right )+\frac {2 \left (a x+c_1 e^{-\frac {a x^2}{2}}\right )}{\sqrt {a}}}{2 \sqrt {a}+\sqrt {2 \pi } c_1 \text {erf}\left (\frac {\sqrt {a} x}{\sqrt {2}}\right )} \\ y(x)\to \frac {\sqrt {\frac {2}{\pi }} e^{-\frac {a x^2}{2}}}{\sqrt {a} \text {erf}\left (\frac {\sqrt {a} x}{\sqrt {2}}\right )}+x \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a*(-x + y(x))*y(x) + Derivative(y(x), x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -a*x*y(x) + a*y(x)**2 + Derivative(y(x), x) - 1 cannot be solved by the factorable group method