49.21.4 problem 1(d)

Internal problem ID [7734]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 5. Existence and uniqueness of solutions to first order equations. Page 190
Problem number : 1(d)
Date solved : Wednesday, March 05, 2025 at 04:51:43 AM
CAS classification : [_separable]

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

Maple. Time used: 0.005 (sec). Leaf size: 12
ode:=diff(y(x),x) = exp(x-y(x))/(1+exp(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \ln \left (\ln \left ({\mathrm e}^{x}+1\right )+c_{1} \right ) \]
Mathematica. Time used: 0.484 (sec). Leaf size: 15
ode=D[y[x],x]==Exp[x-y[x]]/(1+Exp[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \log \left (\log \left (e^x+1\right )+c_1\right ) \]
Sympy. Time used: 0.215 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - exp(x - y(x))/(exp(x) + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \log {\left (C_{1} + \log {\left (e^{x} + 1 \right )} \right )} \]