63.1.3 problem 3

Internal problem ID [12948]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.1 First order equations. Exercises page 10
Problem number : 3
Date solved : Wednesday, March 05, 2025 at 08:54:33 PM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }&=-x^{2} \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 9
ode:=diff(x(t),t) = -x(t)^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = \frac {1}{t +c_{1}} \]
Mathematica. Time used: 0.039 (sec). Leaf size: 39
ode=D[x[t],t]==-t/x[t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to -\sqrt {-t^2+2 c_1} \\ x(t)\to \sqrt {-t^2+2 c_1} \\ \end{align*}
Sympy. Time used: 0.147 (sec). Leaf size: 7
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t)**2 + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {1}{C_{1} + t} \]