63.2.2 problem 2

Internal problem ID [12956]
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 : Wednesday, March 05, 2025 at 08:54:50 PM
CAS classification : [[_Riccati, _special]]

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

Maple. Time used: 0.026 (sec). Leaf size: 43
ode:=diff(x(t),t) = x(t)^2+t^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = -\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.125 (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