71.3.19 problem 14

Internal problem ID [14298]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.1, page 40
Problem number : 14
Date solved : Monday, March 31, 2025 at 12:16:03 PM
CAS classification : [_separable]

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

Maple. Time used: 0.003 (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.785 (sec). Leaf size: 12
ode=D[y[x],x]==Exp[x-y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \log \left (e^x+c_1\right ) \]
Sympy. Time used: 0.179 (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 )} \]