29.8.30 problem 235

Internal problem ID [4835]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 235
Date solved : Sunday, March 30, 2025 at 04:02:54 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.472 (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: 4.697 (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 ] \]