69.10.1 problem 232

Internal problem ID [18135]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Section 9. The Riccati equation. Exercises page 75
Problem number : 232
Date solved : Thursday, October 02, 2025 at 02:43:40 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: 23
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 {{\mathrm e}^{2 x} c_1 +{\mathrm e}^{x}+c_1}{c_1 \,{\mathrm e}^{x}+1} \]
Mathematica. Time used: 0.19 (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.542 (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}} \]