10.3.15 problem 19

Internal problem ID [1180]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.4. Page 76
Problem number : 19
Date solved : Tuesday, March 04, 2025 at 12:17:14 PM
CAS classification : [_Bernoulli]

\begin{align*} y^{\prime }&=-y \left (3-t y\right ) \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 20
ode:=diff(y(t),t) = -y(t)*(3-t*y(t)); 
dsolve(ode,y(t), singsol=all);
 
\[ y = \frac {9}{1+9 c_1 \,{\mathrm e}^{3 t}+3 t} \]
Mathematica. Time used: 0.128 (sec). Leaf size: 28
ode=D[y[t],t] == -y[t]*(3-t*y[t]); 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to \frac {9}{3 t+9 c_1 e^{3 t}+1} \\ y(t)\to 0 \\ \end{align*}
Sympy. Time used: 0.271 (sec). Leaf size: 15
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq((-t*y(t) + 3)*y(t) + Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \frac {9}{C_{1} e^{3 t} + 3 t + 1} \]