80.3.43 problem 46

Internal problem ID [21207]
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 : 46
Date solved : Thursday, October 02, 2025 at 07:26:41 PM
CAS classification : [_Bernoulli]

\begin{align*} x^{\prime }-x&=t x^{2} \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=a \\ \end{align*}
Maple. Time used: 0.026 (sec). Leaf size: 23
ode:=diff(x(t),t)-x(t) = t*x(t)^2; 
ic:=[x(0) = a]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = -\frac {a}{\left (a -1\right ) {\mathrm e}^{-t}+a \left (t -1\right )} \]
Mathematica. Time used: 0.094 (sec). Leaf size: 24
ode=D[x[t],t]-x[t]==t*x[t]^2; 
ic={x[0]==a}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -\frac {a e^t}{a e^t (t-1)+a-1} \end{align*}
Sympy. Time used: 0.144 (sec). Leaf size: 19
from sympy import * 
t = symbols("t") 
a = symbols("a") 
x = Function("x") 
ode = Eq(-t*x(t)**2 - x(t) + Derivative(x(t), t),0) 
ics = {x(0): a} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {e^{t}}{- t e^{t} + e^{t} + \frac {1 - a}{a}} \]