80.3.45 problem 48

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

\begin{align*} x^{\prime }-x t&=x^{2} \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 35
ode:=diff(x(t),t)-t*x(t) = x(t)^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {2 \,{\mathrm e}^{\frac {t^{2}}{2}}}{i \sqrt {\pi }\, \sqrt {2}\, \operatorname {erf}\left (\frac {i \sqrt {2}\, t}{2}\right )+2 c_1} \]
Mathematica. Time used: 0.142 (sec). Leaf size: 45
ode=D[x[t],t]-t*x[t]==x[t]^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {2 e^{\frac {t^2}{2}}}{-\sqrt {2 \pi } \text {erfi}\left (\frac {t}{\sqrt {2}}\right )+2 c_1}\\ x(t)&\to 0 \end{align*}
Sympy. Time used: 0.195 (sec). Leaf size: 32
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t*x(t) - x(t)**2 + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {2 e^{\frac {t^{2}}{2}}}{C_{1} - \sqrt {2} \sqrt {\pi } \operatorname {erfi}{\left (\frac {\sqrt {2} t}{2} \right )}} \]