12.5.9 problem 5

Internal problem ID [1633]
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 : 5
Date solved : Tuesday, March 04, 2025 at 12:57:51 PM
CAS classification : [_Bernoulli]

\begin{align*} y^{\prime }-x y&=x^{3} y^{3} \end{align*}

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