78.1.22 problem 12.b

Internal problem ID [20948]
Book : A FIRST COURSE IN DIFFERENTIAL EQUATIONS FOR SCIENTISTS AND ENGINEERS. By Russell Herman. University of North Carolina Wilmington. LibreText. compiled on 06/09/2025
Section : Chapter 1, First order ODEs. Problems section 1.5
Problem number : 12.b
Date solved : Thursday, October 02, 2025 at 06:50:02 PM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)]`], _Riccati]

\begin{align*} {\mathrm e}^{-x} y^{\prime }+y^{2}-2 y \,{\mathrm e}^{x}&=1-{\mathrm e}^{2 x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 20
ode:=diff(y(x),x)*exp(-x)+y(x)^2-2*y(x)*exp(x) = 1-exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {1+2 c_1 \cosh \left (x \right )}{c_1 +{\mathrm e}^{-x}} \]
Mathematica. Time used: 0.175 (sec). Leaf size: 24
ode=D[y[x],x]*Exp[-x]+y[x]^2-2*y[x]*Exp[x]==1-Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x+\frac {1}{e^x+c_1}\\ y(x)&\to e^x \end{align*}
Sympy. Time used: 0.555 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)**2 - 2*y(x)*exp(x) + exp(2*x) - 1 + exp(-x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} e^{x} + e^{2 x} + 1}{C_{1} + e^{x}} \]