72.3.3 problem 3

Internal problem ID [14596]
Book : DIFFERENTIAL EQUATIONS by Paul Blanchard, Robert L. Devaney, Glen R. Hall. 4th edition. Brooks/Cole. Boston, USA. 2012
Section : Chapter 1. First-Order Differential Equations. Exercises section 1.4 page 61
Problem number : 3
Date solved : Monday, March 31, 2025 at 12:39:36 PM
CAS classification : [[_Riccati, _special]]

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

With initial conditions

\begin{align*} y \left (0\right )&={\frac {1}{2}} \end{align*}

Maple. Time used: 0.213 (sec). Leaf size: 125
ode:=diff(y(t),t) = y(t)^2-4*t; 
ic:=y(0) = 1/2; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {\left (-3 \,2^{{2}/{3}} \left (\operatorname {AiryAi}\left (1, 2^{{2}/{3}} t \right ) 3^{{2}/{3}}+\operatorname {AiryBi}\left (1, 2^{{2}/{3}} t \right ) 3^{{1}/{6}}\right ) \Gamma \left (\frac {2}{3}\right )^{2}-\operatorname {AiryAi}\left (1, 2^{{2}/{3}} t \right ) 3^{{5}/{6}} \pi +\operatorname {AiryBi}\left (1, 2^{{2}/{3}} t \right ) \pi 3^{{1}/{3}}\right ) 2^{{2}/{3}}}{3^{{5}/{6}} \pi \operatorname {AiryAi}\left (2^{{2}/{3}} t \right )+3 \,3^{{1}/{6}} \Gamma \left (\frac {2}{3}\right )^{2} 2^{{2}/{3}} \operatorname {AiryBi}\left (2^{{2}/{3}} t \right )+3 \,6^{{2}/{3}} \Gamma \left (\frac {2}{3}\right )^{2} \operatorname {AiryAi}\left (2^{{2}/{3}} t \right )-\pi 3^{{1}/{3}} \operatorname {AiryBi}\left (2^{{2}/{3}} t \right )} \]
Mathematica. Time used: 9.478 (sec). Leaf size: 193
ode=D[y[t],t]==y[t]^2-4*t; 
ic={y[0]==1/2}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to -\frac {4 i t^{3/2} \operatorname {Gamma}\left (\frac {1}{3}\right ) \operatorname {BesselJ}\left (-\frac {2}{3},\frac {4}{3} i t^{3/2}\right )+2^{2/3} \sqrt [3]{3} \left (\sqrt {3}-i\right ) \operatorname {Gamma}\left (\frac {2}{3}\right ) \left (2 t^{3/2} \operatorname {BesselJ}\left (-\frac {4}{3},\frac {4}{3} i t^{3/2}\right )-2 t^{3/2} \operatorname {BesselJ}\left (\frac {2}{3},\frac {4}{3} i t^{3/2}\right )-i \operatorname {BesselJ}\left (-\frac {1}{3},\frac {4}{3} i t^{3/2}\right )\right )}{2 t \left (2^{2/3} \sqrt [3]{3} \left (-1-i \sqrt {3}\right ) \operatorname {Gamma}\left (\frac {2}{3}\right ) \operatorname {BesselJ}\left (-\frac {1}{3},\frac {4}{3} i t^{3/2}\right )+\operatorname {Gamma}\left (\frac {1}{3}\right ) \operatorname {BesselJ}\left (\frac {1}{3},\frac {4}{3} i t^{3/2}\right )\right )} \]
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(4*t - y(t)**2 + Derivative(y(t), t),0) 
ics = {y(0): 1/2} 
dsolve(ode,func=y(t),ics=ics)
 
TypeError : bad operand type for unary -: list