19.1.14 problem 14

Internal problem ID [4226]
Book : Advanced Mathematica, Book2, Perkin and Perkin, 1992
Section : Chapter 11.3, page 316
Problem number : 14
Date solved : Tuesday, September 30, 2025 at 07:07:47 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.096 (sec). Leaf size: 12
ode:=diff(y(x),x) = x*exp(-2*y(x)); 
ic:=[y(0) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {\ln \left (x^{2}+1\right )}{2} \]
Mathematica. Time used: 0.205 (sec). Leaf size: 15
ode=D[y[x],x]==x*Exp[-2*y[x]]; 
ic=y[0]==0; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \log \left (x^2+1\right ) \end{align*}
Sympy. Time used: 0.246 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(-2*y(x)) + Derivative(y(x), x),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\log {\left (x^{2} + 1 \right )}}{2} \]