87.6.20 problem 23

Internal problem ID [23337]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 1. Elementary methods. First order differential equations. Exercise at page 53
Problem number : 23
Date solved : Thursday, October 02, 2025 at 09:38:37 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class C`], _dAlembert]

\begin{align*} y^{\prime }&=\frac {2 x}{x -y+1} \end{align*}
Maple. Time used: 0.160 (sec). Leaf size: 47
ode:=diff(y(x),x) = 2*x/(x-y(x)+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = 1+\frac {x}{2}-\frac {\sqrt {7}\, x \tan \left (\operatorname {RootOf}\left (\sqrt {7}\, \ln \left (\frac {7 x^{2}}{4}+\frac {7 x^{2} \tan \left (\textit {\_Z} \right )^{2}}{4}\right )+2 \sqrt {7}\, c_1 +2 \textit {\_Z} \right )\right )}{2} \]
Mathematica. Time used: 0.054 (sec). Leaf size: 70
ode=D[y[x],x]==2*x/(x-y[x]+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [2 \sqrt {7} \arctan \left (\frac {\frac {4 x}{-y(x)+x+1}-1}{\sqrt {7}}\right )=7 \left (\log \left (\frac {2 x^2+y(x)^2-(x+2) y(x)+x+1}{2 x^2}\right )+2 \log (x)+4 c_1\right ),y(x)\right ] \]
Sympy. Time used: 4.263 (sec). Leaf size: 53
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x/(x - y(x) + 1) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \log {\left (\sqrt {2 - \frac {y{\left (x \right )} - 1}{x} + \frac {\left (y{\left (x \right )} - 1\right )^{2}}{x^{2}}} \right )} - \frac {\sqrt {7} \operatorname {atan}{\left (\frac {\sqrt {7} \left (1 - \frac {2 \left (y{\left (x \right )} - 1\right )}{x}\right )}{7} \right )}}{7} \]