63.5.3 problem 1(c)

Internal problem ID [12998]
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.4.1. Integrating factors. Exercises page 41
Problem number : 1(c)
Date solved : Wednesday, March 05, 2025 at 08:56:49 PM
CAS classification : [[_Riccati, _special]]

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

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