12.6.20 problem 20

Internal problem ID [1699]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Section 2.5 Page 79
Problem number : 20
Date solved : Tuesday, March 04, 2025 at 01:35:21 PM
CAS classification : [_separable]

\begin{align*} \left (y^{3}-1\right ) {\mathrm e}^{x}+3 y^{2} \left ({\mathrm e}^{x}+1\right ) y^{\prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0 \end{align*}

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