87.5.3 problem 3

Internal problem ID [23296]
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 47
Problem number : 3
Date solved : Thursday, October 02, 2025 at 09:29:00 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {y-x +1}{3-x +y} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 35
ode:=diff(y(x),x) = (-x+y(x)+1)/(-x+y(x)+3); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= x -3-\sqrt {4 c_1 -4 x +9} \\ y &= x -3+\sqrt {4 c_1 -4 x +9} \\ \end{align*}
Mathematica. Time used: 0.063 (sec). Leaf size: 49
ode=D[y[x],x]==(y[x]-x+1)/(-x+y[x]+3); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x-i \sqrt {4 x-9-c_1}-3\\ y(x)&\to x+i \sqrt {4 x-9-c_1}-3 \end{align*}
Sympy. Time used: 0.662 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(-x + y(x) + 1)/(-x + y(x) + 3) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x - \sqrt {C_{1} - 4 x} - 3, \ y{\left (x \right )} = x + \sqrt {C_{1} - 4 x} - 3\right ] \]