81.6.26 problem 7-25

Internal problem ID [21572]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 7. Linear Differential Equations. Page 101.
Problem number : 7-25
Date solved : Thursday, October 02, 2025 at 07:49:58 PM
CAS classification : [_Bernoulli]

\begin{align*} y^{\prime }+y&=x y^{3} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 39
ode:=diff(y(x),x)+y(x) = x*y(x)^3; 
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.476 (sec). Leaf size: 50
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+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.485 (sec). Leaf size: 49
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 ] \]