13.4.4 problem 6

Internal problem ID [2341]
Book : Differential equations and their applications, 3rd ed., M. Braun
Section : Section 1.9. Page 66
Problem number : 6
Date solved : Tuesday, March 04, 2025 at 01:59:41 PM
CAS classification : [[_1st_order, _with_linear_symmetries], [_Abel, `2nd type`, `class A`]]

\begin{align*} \frac {y^{2}}{2}-2 \,{\mathrm e}^{t} y+\left (-{\mathrm e}^{t}+y\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.036 (sec). Leaf size: 45
ode:=1/2*y(t)^2-2*exp(t)*y(t)+(-exp(t)+y(t))*diff(y(t),t) = 0; 
dsolve(ode,y(t), singsol=all);
 
\begin{align*} y &= \left (1-\sqrt {\left ({\mathrm e}^{3 t}+c_1 \right ) {\mathrm e}^{-3 t}}\right ) {\mathrm e}^{t} \\ y &= \left (1+\sqrt {\left ({\mathrm e}^{3 t}+c_1 \right ) {\mathrm e}^{-3 t}}\right ) {\mathrm e}^{t} \\ \end{align*}
Mathematica. Time used: 1.216 (sec). Leaf size: 70
ode=1/2*y[t]^2-2*Exp[t]*y[t]+(-Exp[t]+y[t])*D[y[t],t] == 0; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to e^t-\frac {\sqrt {-e^{3 t}-c_1}}{\sqrt {-e^t}} \\ y(t)\to e^t+\frac {\sqrt {-e^{3 t}-c_1}}{\sqrt {-e^t}} \\ \end{align*}
Sympy. Time used: 1.598 (sec). Leaf size: 37
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq((y(t) - exp(t))*Derivative(y(t), t) + y(t)**2/2 - 2*y(t)*exp(t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ \left [ y{\left (t \right )} = \left (1 - \sqrt {C_{1} e^{- 3 t} + 1}\right ) e^{t}, \ y{\left (t \right )} = \left (\sqrt {C_{1} e^{- 3 t} + 1} + 1\right ) e^{t}\right ] \]