76.1.8 problem 8

Internal problem ID [17236]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 2. First order differential equations. Section 2.1 (Separable equations). Problems at page 44
Problem number : 8
Date solved : Monday, March 31, 2025 at 03:45:31 PM
CAS classification : [_separable]

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

Maple. Time used: 0.004 (sec). Leaf size: 25
ode:=diff(y(x),x) = (x^2+exp(-x))/(y(x)^2-exp(y(x))); 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {x^{3}}{3}-{\mathrm e}^{-x}-\frac {y^{3}}{3}+{\mathrm e}^{y}+c_1 = 0 \]
Mathematica. Time used: 0.616 (sec). Leaf size: 35
ode=D[y[x],x]==(x^2+Exp[-x])/(y[x]^2-Exp[y[x]]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \text {InverseFunction}\left [e^{\text {$\#$1}}-\frac {\text {$\#$1}^3}{3}\&\right ]\left [-\frac {x^3}{3}+e^{-x}+c_1\right ] \]
Sympy. Time used: 0.638 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x**2 + exp(-x))/(y(x)**2 - exp(y(x))) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \frac {x^{3}}{3} + \frac {y^{3}{\left (x \right )}}{3} - e^{y{\left (x \right )}} + e^{- x} = C_{1} \]