74.7.1 problem 1

Internal problem ID [16007]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.5, page 64
Problem number : 1
Date solved : Monday, March 31, 2025 at 02:25:59 PM
CAS classification : [_rational, _Bernoulli]

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

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