15.2.8 problem 8

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

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

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