15.3.5 problem 5

Internal problem ID [2898]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 7, page 28
Problem number : 5
Date solved : Sunday, March 30, 2025 at 12:48:43 AM
CAS classification : [[_homogeneous, `class C`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.007 (sec). Leaf size: 35
ode:=x-y(x)+(y(x)-x+1)*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.105 (sec). Leaf size: 49
ode=(x-y[x])+(y[x]-x+1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to x-i \sqrt {2 x-1-c_1}-1 \\ y(x)\to x+i \sqrt {2 x-1-c_1}-1 \\ \end{align*}
Sympy. Time used: 0.902 (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 ] \]