74.4.4 problem 4

Internal problem ID [15826]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.2, page 39
Problem number : 4
Date solved : Monday, March 31, 2025 at 01:57:09 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.004 (sec). Leaf size: 29
ode:=diff(y(t),t) = (1+y(t)^2)/y(t); 
dsolve(ode,y(t), singsol=all);
 
\begin{align*} y &= \sqrt {{\mathrm e}^{2 t} c_1 -1} \\ y &= -\sqrt {{\mathrm e}^{2 t} c_1 -1} \\ \end{align*}
Mathematica. Time used: 2.362 (sec). Leaf size: 53
ode=D[y[t],t]==(1+y[t]^2)/y[t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to -\sqrt {-1+e^{2 (t+c_1)}} \\ y(t)\to \sqrt {-1+e^{2 (t+c_1)}} \\ y(t)\to -i \\ y(t)\to i \\ \end{align*}
Sympy. Time used: 0.567 (sec). Leaf size: 29
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-(y(t)**2 + 1)/y(t) + Derivative(y(t), t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ \left [ y{\left (t \right )} = - \sqrt {C_{1} e^{2 t} - 1}, \ y{\left (t \right )} = \sqrt {C_{1} e^{2 t} - 1}\right ] \]