23.1.553 problem 543

Internal problem ID [5160]
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 : 543
Date solved : Tuesday, September 30, 2025 at 11:47:03 AM
CAS classification : [_separable]

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