23.1.525 problem 515

Internal problem ID [5132]
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 : 515
Date solved : Tuesday, September 30, 2025 at 11:43:49 AM
CAS classification : [_separable]

\begin{align*} x y y^{\prime }&=a +b y^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 48
ode:=x*y(x)*diff(y(x),x) = a+b*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {-b \left (-x^{2 b} c_1 b +a \right )}}{b} \\ y &= -\frac {\sqrt {-b \left (-x^{2 b} c_1 b +a \right )}}{b} \\ \end{align*}
Mathematica. Time used: 0.771 (sec). Leaf size: 94
ode=x*y[x]*D[y[x],x]==a+b*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {\sqrt {-a+e^{2 b (\log (x)+c_1)}}}{\sqrt {b}}\\ y(x)&\to \frac {\sqrt {-a+e^{2 b (\log (x)+c_1)}}}{\sqrt {b}}\\ y(x)&\to -\frac {i \sqrt {a}}{\sqrt {b}}\\ y(x)&\to \frac {i \sqrt {a}}{\sqrt {b}} \end{align*}
Sympy. Time used: 0.759 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a - b*y(x)**2 + x*y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \sqrt {\frac {- a + e^{b \left (C_{1} + 2 \log {\left (x \right )}\right )}}{b}}, \ y{\left (x \right )} = - \sqrt {\frac {- a + e^{b \left (C_{1} + 2 \log {\left (x \right )}\right )}}{b}}\right ] \]