8.5.2 problem 2

Internal problem ID [2539]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 1. First order differential equations. Section 1.17. What to do in practice. Excercises page 126
Problem number : 2
Date solved : Tuesday, September 30, 2025 at 05:46:48 AM
CAS classification : [_Riccati]

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

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.171 (sec). Leaf size: 45
ode:=diff(y(t),t) = 1-t+y(t)^2; 
ic:=[y(0) = 0]; 
dsolve([ode,op(ic)],y(t), singsol=all);
 
\[ y = \frac {-\operatorname {AiryAi}\left (1, t -1\right ) \operatorname {AiryBi}\left (1, -1\right )+\operatorname {AiryBi}\left (1, t -1\right ) \operatorname {AiryAi}\left (1, -1\right )}{\operatorname {AiryAi}\left (t -1\right ) \operatorname {AiryBi}\left (1, -1\right )-\operatorname {AiryBi}\left (t -1\right ) \operatorname {AiryAi}\left (1, -1\right )} \]
Mathematica. Time used: 0.097 (sec). Leaf size: 40
ode=D[y[t],t]==1-t+y[t]^2; 
ic={y[0]==0}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)&\to \frac {\operatorname {AiryBiPrime}(-1) \operatorname {AiryAiPrime}(t-1)-\operatorname {AiryAiPrime}(-1) \operatorname {AiryBiPrime}(t-1)}{\operatorname {AiryAiPrime}(-1) \operatorname {AiryBi}(t-1)-\operatorname {AiryBiPrime}(-1) \operatorname {AiryAi}(t-1)} \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(t - y(t)**2 + Derivative(y(t), t) - 1,0) 
ics = {y(0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
TypeError : bad operand type for unary -: list