80.3.4 problem 4

Internal problem ID [21168]
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 : 4
Date solved : Thursday, October 02, 2025 at 07:15:17 PM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=\frac {x^{2}+x}{2 x+1} \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.036 (sec). Leaf size: 16
ode:=diff(x(t),t) = (x(t)^2+x(t))/(2*x(t)+1); 
ic:=[x(0) = 1]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = -\frac {1}{2}+\frac {\sqrt {1+8 \,{\mathrm e}^{t}}}{2} \]
Mathematica. Time used: 0.008 (sec). Leaf size: 22
ode=D[x[t],t]==(x[t]^2+x[t])/(2*x[t]+1); 
ic={x[0]==1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {1}{2} \left (\sqrt {8 e^t+1}-1\right ) \end{align*}
Sympy. Time used: 0.473 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(Derivative(x(t), t) - (x(t)**2 + x(t))/(2*x(t) + 1),0) 
ics = {x(0): 1} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {\sqrt {8 e^{t} + 1}}{2} - \frac {1}{2} \]