32.1.11 problem 11

Internal problem ID [7716]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Test excercise 24. page 1067
Problem number : 11
Date solved : Tuesday, September 30, 2025 at 05:01:54 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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