23.1.437 problem 427

Internal problem ID [5044]
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 : 427
Date solved : Tuesday, September 30, 2025 at 11:29:52 AM
CAS classification : [_rational, _Bernoulli]

\begin{align*} y y^{\prime }&=a x +b y^{2} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 61
ode:=y(x)*diff(y(x),x) = a*x+b*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -\frac {\sqrt {4 \,{\mathrm e}^{2 b x} c_1 \,b^{2}-4 a x b -2 a}}{2 b} \\ y &= \frac {\sqrt {4 \,{\mathrm e}^{2 b x} c_1 \,b^{2}-4 a x b -2 a}}{2 b} \\ \end{align*}
Mathematica. Time used: 0.173 (sec). Leaf size: 76
ode=y[x]*D[y[x],x]==a*x+b*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -e^{b x} \sqrt {2 \int _1^xa e^{-2 b K[1]} K[1]dK[1]+c_1}\\ y(x)&\to e^{b x} \sqrt {2 \int _1^xa e^{-2 b K[1]} K[1]dK[1]+c_1} \end{align*}
Sympy. Time used: 0.915 (sec). Leaf size: 116
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a*x - b*y(x)**2 + y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \begin {cases} - \frac {\sqrt {4 C_{1} e^{2 b x} - \frac {4 a x}{b} - \frac {2 a}{b^{2}}}}{2} & \text {for}\: b > 0 \vee b < 0 \\- \sqrt {C_{1} e^{2 b x} + a x^{2} e^{2 b x}} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} \frac {\sqrt {4 C_{1} e^{2 b x} - \frac {4 a x}{b} - \frac {2 a}{b^{2}}}}{2} & \text {for}\: b > 0 \vee b < 0 \\\sqrt {C_{1} e^{2 b x} + a x^{2} e^{2 b x}} & \text {otherwise} \end {cases}\right ] \]