47.1.21 problem 21

Internal problem ID [7402]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number : 21
Date solved : Sunday, March 30, 2025 at 11:57:32 AM
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.786 (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.226 (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 )} \]