80.3.41 problem 44

Internal problem ID [21205]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 3. First order nonlinear differential equations. Excercise 3.7 at page 67
Problem number : 44
Date solved : Thursday, October 02, 2025 at 07:26:35 PM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

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