10.3.16 problem 20

Internal problem ID [1181]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.4. Page 76
Problem number : 20
Date solved : Saturday, March 29, 2025 at 10:44:52 PM
CAS classification : [_Riccati]

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

Maple. Time used: 0.007 (sec). Leaf size: 31
ode:=diff(y(t),t) = t-1-y(t)^2; 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {\operatorname {AiryAi}\left (1, t -1\right ) c_1 +\operatorname {AiryBi}\left (1, t -1\right )}{\operatorname {AiryAi}\left (t -1\right ) c_1 +\operatorname {AiryBi}\left (t -1\right )} \]
Mathematica. Time used: 0.127 (sec). Leaf size: 47
ode=D[y[t],t] == t-1-y[t]^2; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to \frac {\operatorname {AiryBiPrime}(t-1)+c_1 \operatorname {AiryAiPrime}(t-1)}{\operatorname {AiryBi}(t-1)+c_1 \operatorname {AiryAi}(t-1)} \\ y(t)\to \frac {\operatorname {AiryAiPrime}(t-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 = {} 
dsolve(ode,func=y(t),ics=ics)
 
TypeError : bad operand type for unary -: list