15.4.6 problem 6

Internal problem ID [2919]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 8, page 34
Problem number : 6
Date solved : Sunday, March 30, 2025 at 12:55:24 AM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

\begin{align*} 2 x y-\left (x^{2}+y^{2}\right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.126 (sec). Leaf size: 47
ode:=2*x*y(x)-(x^2+y(x)^2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {1-\sqrt {4 c_1^{2} x^{2}+1}}{2 c_1} \\ y &= \frac {1+\sqrt {4 c_1^{2} x^{2}+1}}{2 c_1} \\ \end{align*}
Mathematica. Time used: 1.028 (sec). Leaf size: 70
ode=2*x*y[x]-(x^2+y[x]^2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \left (-\sqrt {4 x^2+e^{2 c_1}}-e^{c_1}\right ) \\ y(x)\to \frac {1}{2} \left (\sqrt {4 x^2+e^{2 c_1}}-e^{c_1}\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 1.470 (sec). Leaf size: 46
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x) - (x**2 + y(x)**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt {4 x^{2} + e^{2 C_{1}}}}{2} - \frac {e^{C_{1}}}{2}, \ y{\left (x \right )} = \frac {\sqrt {4 x^{2} + e^{2 C_{1}}}}{2} - \frac {e^{C_{1}}}{2}\right ] \]