35.8.9 problem 9

Internal problem ID [6216]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 13. Miscellaneous problems. page 466
Problem number : 9
Date solved : Sunday, March 30, 2025 at 10:43:27 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _Bernoulli]

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

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