10.5.21 problem 28

Internal problem ID [1213]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Section 2.6. Page 100
Problem number : 28
Date solved : Saturday, March 29, 2025 at 10:47:36 PM
CAS classification : [[_1st_order, _with_exponential_symmetries]]

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

Maple. Time used: 0.028 (sec). Leaf size: 24
ode:=y(x)+(-exp(-2*y(x))+2*x*y(x))*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{\operatorname {RootOf}\left ({\mathrm e}^{-2 \,{\mathrm e}^{\textit {\_Z}}} c_1 +\textit {\_Z} \,{\mathrm e}^{-2 \,{\mathrm e}^{\textit {\_Z}}}-x \right )} \]
Mathematica. Time used: 0.254 (sec). Leaf size: 25
ode=y[x]+(-Exp[-2*y[x]]+2*x*y[x])*D[y[x],x] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x=e^{-2 y(x)} \log (y(x))+c_1 e^{-2 y(x)},y(x)\right ] \]
Sympy. Time used: 0.973 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((2*x*y(x) - exp(-2*y(x)))*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + x e^{2 y{\left (x \right )}} - \log {\left (y{\left (x \right )} \right )} = 0 \]