30.5.28 problem 28

Internal problem ID [7527]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.6, Substitutions and Transformations. Exercises. page 76
Problem number : 28
Date solved : Tuesday, September 30, 2025 at 04:42:05 PM
CAS classification : [_Bernoulli]

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