23.1.268 problem 262

Internal problem ID [4875]
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 : 262
Date solved : Tuesday, September 30, 2025 at 08:45:58 AM
CAS classification : [_separable]

\begin{align*} x^{2} y^{\prime }&=a +b y^{2} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 28
ode:=x^2*diff(y(x),x) = a+b*y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\tan \left (\frac {\sqrt {a b}\, \left (c_1 x -1\right )}{x}\right ) \sqrt {a b}}{b} \]
Mathematica. Time used: 0.14 (sec). Leaf size: 69
ode=x^2*D[y[x],x]==a + b*y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{b K[1]^2+a}dK[1]\&\right ]\left [-\frac {1}{x}+c_1\right ]\\ y(x)&\to -\frac {i \sqrt {a}}{\sqrt {b}}\\ y(x)&\to \frac {i \sqrt {a}}{\sqrt {b}} \end{align*}
Sympy. Time used: 6.722 (sec). Leaf size: 61
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a - b*y(x)**2 + x**2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \frac {\sqrt {- \frac {1}{a b}} \log {\left (- a \sqrt {- \frac {1}{a b}} + y{\left (x \right )} \right )}}{2} + \frac {\sqrt {- \frac {1}{a b}} \log {\left (a \sqrt {- \frac {1}{a b}} + y{\left (x \right )} \right )}}{2} + \frac {1}{x} = C_{1} \]