19.1.4 problem 4

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

\begin{align*} y^{\prime }&={\mathrm e}^{x -y} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 9
ode:=diff(y(x),x) = exp(x-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \ln \left ({\mathrm e}^{x}+c_1 \right ) \]
Mathematica. Time used: 0.558 (sec). Leaf size: 12
ode=D[y[x],x]==Exp[x-y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \log \left (e^x+c_1\right ) \end{align*}
Sympy. Time used: 0.098 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-exp(x - y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \log {\left (C_{1} + e^{x} \right )} \]