14.2.18 problem 19

Internal problem ID [2506]
Book : Differential equations and their applications, 4th ed., M. Braun
Section : Chapter 1. First order differential equations. Section 1.4 separable equations. Excercises page 24
Problem number : 19
Date solved : Sunday, March 30, 2025 at 12:05:40 AM
CAS classification : [[_homogeneous, `class A`], _dAlembert]

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

Maple. Time used: 0.039 (sec). Leaf size: 20
ode:=exp(t/y(t))*(y(t)-t)*diff(y(t),t)+y(t)*(1+exp(t/y(t))) = 0; 
dsolve(ode,y(t), singsol=all);
 
\[ y = -\frac {t}{\operatorname {LambertW}\left (\frac {c_1 t}{c_1 t -1}\right )} \]
Mathematica. Time used: 1.39 (sec). Leaf size: 34
ode=Exp[t/y[t]]*(y[t]-t)*D[y[t],t]+y[t]*(1+Exp[t/y[t]])==0; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to -\frac {t}{W\left (\frac {t}{t-e^{c_1}}\right )} \\ y(t)\to -\frac {t}{W(1)} \\ \end{align*}
Sympy. Time used: 2.306 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq((-t + y(t))*exp(t/y(t))*Derivative(y(t), t) + (exp(t/y(t)) + 1)*y(t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = - \frac {t}{W\left (\frac {t}{C_{1} + t}\right )} \]