8.5.26 problem 26

Internal problem ID [754]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Section 1.6, Substitution methods and exact equations. Page 74
Problem number : 26
Date solved : Tuesday, March 04, 2025 at 11:42:30 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _Bernoulli]

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

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