12.5.10 problem 6

Internal problem ID [1634]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 6
Date solved : Tuesday, March 04, 2025 at 12:57:52 PM
CAS classification : [_rational, _Bernoulli]

\begin{align*} y^{\prime }-\frac {\left (1+x \right ) y}{3 x}&=y^{4} \end{align*}

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