23.1.554 problem 544

Internal problem ID [5161]
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 : 544
Date solved : Tuesday, September 30, 2025 at 11:47:05 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

\begin{align*} 2 x y y^{\prime }&=a x +y^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=2*x*y(x)*diff(y(x),x) = a*x+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {\left (a \ln \left (x \right )+c_1 \right ) x} \\ y &= -\sqrt {\left (a \ln \left (x \right )+c_1 \right ) x} \\ \end{align*}
Mathematica. Time used: 0.146 (sec). Leaf size: 44
ode=2*x*y[x]*D[y[x],x]==a*x +y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\sqrt {x} \sqrt {a \log (x)+c_1}\\ y(x)&\to \sqrt {x} \sqrt {a \log (x)+c_1} \end{align*}
Sympy. Time used: 0.297 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*x + 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 {x \left (C_{1} + a \log {\left (x \right )}\right )}, \ y{\left (x \right )} = \sqrt {x \left (C_{1} + a \log {\left (x \right )}\right )}\right ] \]