57.2.2 problem 2

Internal problem ID [14316]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.1.3 Geometric. Exercises page 15
Problem number : 2
Date solved : Thursday, October 02, 2025 at 09:30:38 AM
CAS classification : [[_Riccati, _special]]

\begin{align*} x^{\prime }&=t^{2}+x^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 43
ode:=diff(x(t),t) = x(t)^2+t^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = -\frac {t \left (\operatorname {BesselJ}\left (-\frac {3}{4}, \frac {t^{2}}{2}\right ) c_1 +\operatorname {BesselY}\left (-\frac {3}{4}, \frac {t^{2}}{2}\right )\right )}{c_1 \operatorname {BesselJ}\left (\frac {1}{4}, \frac {t^{2}}{2}\right )+\operatorname {BesselY}\left (\frac {1}{4}, \frac {t^{2}}{2}\right )} \]
Mathematica. Time used: 0.077 (sec). Leaf size: 169
ode=D[x[t],t]==x[t]^2+t^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to \frac {t^2 \left (-2 \operatorname {BesselJ}\left (-\frac {3}{4},\frac {t^2}{2}\right )+c_1 \left (\operatorname {BesselJ}\left (\frac {3}{4},\frac {t^2}{2}\right )-\operatorname {BesselJ}\left (-\frac {5}{4},\frac {t^2}{2}\right )\right )\right )-c_1 \operatorname {BesselJ}\left (-\frac {1}{4},\frac {t^2}{2}\right )}{2 t \left (\operatorname {BesselJ}\left (\frac {1}{4},\frac {t^2}{2}\right )+c_1 \operatorname {BesselJ}\left (-\frac {1}{4},\frac {t^2}{2}\right )\right )}\\ x(t)&\to -\frac {t^2 \operatorname {BesselJ}\left (-\frac {5}{4},\frac {t^2}{2}\right )-t^2 \operatorname {BesselJ}\left (\frac {3}{4},\frac {t^2}{2}\right )+\operatorname {BesselJ}\left (-\frac {1}{4},\frac {t^2}{2}\right )}{2 t \operatorname {BesselJ}\left (-\frac {1}{4},\frac {t^2}{2}\right )} \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t**2 - x(t)**2 + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
TypeError : bad operand type for unary -: list