9.7.19 problem 19

Internal problem ID [3000]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 11, page 45
Problem number : 19
Date solved : Tuesday, September 30, 2025 at 06:15:16 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(y)]`]]

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

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.098 (sec). Leaf size: 18
ode:=diff(y(x),x) = x*(1-exp(2*y(x)-x^2)); 
ic:=[y(0) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {x^{2}}{2}-\frac {\ln \left (x^{2}+1\right )}{2} \]
Mathematica. Time used: 0.324 (sec). Leaf size: 21
ode=D[y[x],x]==x*(1-Exp[2*y[x]-x^2]); 
ic={y[0]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \left (x^2-\log \left (x^2+1\right )\right ) \end{align*}
Sympy. Time used: 0.934 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*(1 - exp(-x**2 + 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 (\frac {e^{x^{2}}}{x^{2} + 1} \right )}}{2} \]