35.4.16 problem 25 part (c)

Internal problem ID [6134]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 4. OTHER METHODS FOR FIRST-ORDER EQUATIONS. page 406
Problem number : 25 part (c)
Date solved : Sunday, March 30, 2025 at 10:40:57 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _Riccati]

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

Maple. Time used: 0.005 (sec). Leaf size: 14
ode:=diff(y(x),x) = exp(-x)*y(x)^2+y(x)-exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = i \tan \left (i x +c_1 \right ) {\mathrm e}^{x} \]
Mathematica. Time used: 0.288 (sec). Leaf size: 19
ode=D[y[x],x]== Exp[-x]*y[x]^2+y[x]-Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -e^x \tanh (x-i c_1) \]
Sympy. Time used: 1.497 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x)**2*exp(-x) - y(x) + exp(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {e^{x}}{\tanh {\left (C_{1} + x \right )}} \]