23.1.243 problem 238

Internal problem ID [4850]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 238
Date solved : Tuesday, September 30, 2025 at 08:44:17 AM
CAS classification : [_rational, _Bernoulli]

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