75.5.16 problem 115

Internal problem ID [16681]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 5. Homogeneous equations. Exercises page 44
Problem number : 115
Date solved : Monday, March 31, 2025 at 03:05:18 PM
CAS classification : [[_homogeneous, `class C`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.007 (sec). Leaf size: 39
ode:=x+y(x)+(-1+x+y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -x +1-\sqrt {2 c_1 -2 x +1} \\ y &= -x +1+\sqrt {2 c_1 -2 x +1} \\ \end{align*}
Mathematica. Time used: 0.118 (sec). Leaf size: 43
ode=(x+y[x])+(x+y[x]-1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -x-\sqrt {-2 x+1+c_1}+1 \\ y(x)\to -x+\sqrt {-2 x+1+c_1}+1 \\ \end{align*}
Sympy. Time used: 0.789 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x + (x + y(x) - 1)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - x - \sqrt {C_{1} - 2 x} + 1, \ y{\left (x \right )} = - x + \sqrt {C_{1} - 2 x} + 1\right ] \]