14.3.4 problem 6

Internal problem ID [2513]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 1. First order differential equations. Section 1.9. Exact equations. Excercises page 66
Problem number : 6
Date solved : Sunday, March 30, 2025 at 12:06:18 AM
CAS classification : [[_1st_order, _with_linear_symmetries], [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.023 (sec). Leaf size: 39
ode:=1/2*y(t)^2-2*exp(t)*y(t)+(y(t)-exp(t))*diff(y(t),t) = 0; 
dsolve(ode,y(t), singsol=all);
 
\begin{align*} y &= \left (1-\sqrt {1+{\mathrm e}^{-3 t} c_1}\right ) {\mathrm e}^{t} \\ y &= \left (1+\sqrt {1+{\mathrm e}^{-3 t} c_1}\right ) {\mathrm e}^{t} \\ \end{align*}
Mathematica. Time used: 1.342 (sec). Leaf size: 70
ode=(y[t]^2/2-2*y[t]*Exp[t])+(y[t]-Exp[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.559 (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 ] \]