78.1.10 problem 1 (k)

Internal problem ID [17986]
Book : DIFFERENTIAL EQUATIONS WITH APPLICATIONS AND HISTORICAL NOTES by George F. Simmons. 3rd edition. 2017. CRC press, Boca Raton FL.
Section : Chapter 1. The Nature of Differential Equations. Separable Equations. Section 2. Problems at page 9
Problem number : 1 (k)
Date solved : Thursday, March 13, 2025 at 11:18:07 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} 2 x y y^{\prime }&=x^{2}+y^{2} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 23
ode:=2*diff(y(x),x)*x*y(x) = x^2+y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \sqrt {\left (x +c_{1} \right ) x} \\ y &= -\sqrt {\left (x +c_{1} \right ) x} \\ \end{align*}
Mathematica. Time used: 0.194 (sec). Leaf size: 38
ode=2*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 -\sqrt {x} \sqrt {x+c_1} \\ y(x)\to \sqrt {x} \sqrt {x+c_1} \\ \end{align*}
Sympy. Time used: 0.383 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + 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} + x\right )}, \ y{\left (x \right )} = \sqrt {x \left (C_{1} + x\right )}\right ] \]