74.3.33 problem 28

Internal problem ID [15822]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.1, page 32
Problem number : 28
Date solved : Monday, March 31, 2025 at 01:56:55 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=-y^{3} \end{align*}

With initial conditions

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

Maple. Time used: 0.063 (sec). Leaf size: 11
ode:=diff(y(t),t) = -y(t)^3; 
ic:=y(0) = 1/2; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {1}{\sqrt {2 t +4}} \]
Mathematica. Time used: 0.003 (sec). Leaf size: 18
ode=D[y[t],t]==-y[t]^3; 
ic={y[0]==1/2}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {i}{\sqrt {-2 t-4}} \]
Sympy. Time used: 0.391 (sec). Leaf size: 20
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(y(t)**3 + Derivative(y(t), t),0) 
ics = {y(0): 1/2} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \frac {\sqrt {2} \sqrt {- \frac {1}{- t - 2}}}{2} \]