68.4.54 problem 54

Internal problem ID [17234]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Exercises 2.2, page 39
Problem number : 54
Date solved : Thursday, October 02, 2025 at 01:59:19 PM
CAS classification : [_separable]

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

With initial conditions

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