87.5.16 problem 20

Internal problem ID [23309]
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 : 20
Date solved : Thursday, October 02, 2025 at 09:31:29 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*}

With initial conditions

\begin{align*} y \left (1\right )&=2 \\ \end{align*}
Maple. Time used: 0.180 (sec). Leaf size: 16
ode:=diff(y(x),x) = (-x+y(x)+1)/(-x+y(x)+3); 
ic:=[y(1) = 2]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = x +2 \sqrt {-x +5}-3 \]
Mathematica. Time used: 0.065 (sec). Leaf size: 19
ode=D[y[x],x]==(y[x]-x+1)/(-x+y[x]+3); 
ic={y[1]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x-2 i \sqrt {x-5}-3 \end{align*}
Sympy. Time used: 0.647 (sec). Leaf size: 14
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 = {y(1): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x + \sqrt {20 - 4 x} - 3 \]