66.1.43 problem Problem 57

Internal problem ID [13819]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 57
Date solved : Monday, March 31, 2025 at 08:14:01 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {x +y-3}{1-x +y} \end{align*}

Maple. Time used: 0.185 (sec). Leaf size: 30
ode:=diff(y(x),x) = (x+y(x)-3)/(-x+y(x)+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\sqrt {2 \left (x -2\right )^{2} c_1^{2}+1}+\left (x -1\right ) c_1}{c_1} \]
Mathematica. Time used: 0.116 (sec). Leaf size: 59
ode=D[y[x],x]== (x+y[x]-3)/(1-x+y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -i \sqrt {-2 x^2+8 x-1-c_1}+x-1 \\ y(x)\to i \sqrt {-2 x^2+8 x-1-c_1}+x-1 \\ \end{align*}
Sympy. Time used: 1.709 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x + y(x) - 3)/(-x + y(x) + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x - \sqrt {C_{1} + 2 x^{2} - 8 x} - 1, \ y{\left (x \right )} = x + \sqrt {C_{1} + 2 x^{2} - 8 x} - 1\right ] \]