36.1.9 problem 9

Internal problem ID [6264]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.2, Separable Equations. Exercises. page 46
Problem number : 9
Date solved : Sunday, March 30, 2025 at 10:45:13 AM
CAS classification : [_separable]

\begin{align*} x^{\prime }&=\frac {t \,{\mathrm e}^{-t -2 x}}{x} \end{align*}

Maple. Time used: 0.008 (sec). Leaf size: 25
ode:=diff(x(t),t) = t/x(t)/exp(t+2*x(t)); 
dsolve(ode,x(t), singsol=all);
 
\[ x = \frac {\operatorname {LambertW}\left (-4 \left (-c_1 \,{\mathrm e}^{t}+t +1\right ) {\mathrm e}^{-t -1}\right )}{2}+\frac {1}{2} \]
Mathematica. Time used: 60.188 (sec). Leaf size: 31
ode=D[x[t],t]==t/(x[t]*Exp[t+2*x[t]]); 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to \frac {1}{2} \left (1+W\left (-4 e^{-t-1} \left (t-c_1 e^t+1\right )\right )\right ) \]
Sympy. Time used: 0.442 (sec). Leaf size: 29
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-t*exp(-t - 2*x(t))/x(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {W\left (C_{1} - 4 t e^{- t - 1} - 4 e^{- t - 1}\right )}{2} + \frac {1}{2} \]