89.7.4 problem 4

Internal problem ID [24435]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 4. Additional topics on equations of first order and first degree. Exercises at page 61
Problem number : 4
Date solved : Thursday, October 02, 2025 at 10:31:50 PM
CAS classification : [_Bernoulli]

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