80.3.23 problem 24

Internal problem ID [21187]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 3. First order nonlinear differential equations. Excercise 3.7 at page 67
Problem number : 24
Date solved : Thursday, October 02, 2025 at 07:16:12 PM
CAS classification : [_exact]

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

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ \end{align*}
Maple. Time used: 0.054 (sec). Leaf size: 20
ode:=exp(x)-1/2*y(x)^2+(exp(y(x))-x*y(x))*diff(y(x),x) = 0; 
ic:=[y(0) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \operatorname {RootOf}\left (x \,\textit {\_Z}^{2}-2 \,{\mathrm e}^{\textit {\_Z}}-2 \,{\mathrm e}^{x}+4\right ) \]
Mathematica. Time used: 0.279 (sec). Leaf size: 23
ode=(Exp[x]-1/2*y[x]^2)+(Exp[y[x]]-x*y[x])*D[y[x],x]==0; 
ic={y[0]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [x y(x)^2-2 e^{y(x)}-2 e^x=-4,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x*y(x) + exp(y(x)))*Derivative(y(x), x) - y(x)**2/2 + exp(x),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-y(x)**2/2 + exp(x))/(x*y(x) - exp(y(x))) cannot be solved by the factorable group method