23.1.571 problem 561

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

\begin{align*} a x y y^{\prime }&=x^{2}+y^{2} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 64
ode:=a*x*y(x)*diff(y(x),x) = x^2+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {\left (a -1\right ) \left (c_1 \left (a -1\right ) x^{\frac {2}{a}}+x^{2}\right )}}{a -1} \\ y &= -\frac {\sqrt {\left (a -1\right ) \left (c_1 \left (a -1\right ) x^{\frac {2}{a}}+x^{2}\right )}}{a -1} \\ \end{align*}
Mathematica. Time used: 4.108 (sec). Leaf size: 68
ode=a*x*y[x]*D[y[x],x]==x^2+y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {\sqrt {x^2+(a-1) c_1 x^{2/a}}}{\sqrt {a-1}}\\ y(x)&\to \frac {\sqrt {x^2+(a-1) c_1 x^{2/a}}}{\sqrt {a-1}} \end{align*}
Sympy. Time used: 1.277 (sec). Leaf size: 146
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a*x*y(x)*Derivative(y(x), x) - x**2 - y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \begin {cases} - \sqrt {\frac {C_{1} a e^{\frac {2 \log {\left (x \right )}}{a}}}{a - 1} - \frac {C_{1} e^{\frac {2 \log {\left (x \right )}}{a}}}{a - 1} + \frac {x^{2}}{a - 1}} & \text {for}\: a > 1 \vee a < 1 \\- \sqrt {C_{1} e^{\frac {2 \log {\left (x \right )}}{a}} + \frac {2 e^{\frac {2 \log {\left (x \right )}}{a}} \log {\left (x \right )}}{a}} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} \sqrt {\frac {C_{1} a e^{\frac {2 \log {\left (x \right )}}{a}}}{a - 1} - \frac {C_{1} e^{\frac {2 \log {\left (x \right )}}{a}}}{a - 1} + \frac {x^{2}}{a - 1}} & \text {for}\: a > 1 \vee a < 1 \\\sqrt {C_{1} e^{\frac {2 \log {\left (x \right )}}{a}} + \frac {2 e^{\frac {2 \log {\left (x \right )}}{a}} \log {\left (x \right )}}{a}} & \text {otherwise} \end {cases}\right ] \]