82.18.1 problem Ex. 1

Internal problem ID [18752]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter III. Equations of the first order but not of the first degree. Examples on chapter III. page 38
Problem number : Ex. 1
Date solved : Monday, March 31, 2025 at 06:07:47 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

Maple. Time used: 0.045 (sec). Leaf size: 36
ode:=x^2*diff(y(x),x)^2-2*x*y(x)*diff(y(x),x)+2*y(x)^2-x^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -x \\ y &= x \\ y &= \sin \left (-\ln \left (x \right )+c_1 \right ) x \\ y &= -\sin \left (-\ln \left (x \right )+c_1 \right ) x \\ \end{align*}
Mathematica. Time used: 0.203 (sec). Leaf size: 35
ode=x^2*D[y[x],x]^2-2*x*y[x]*D[y[x],x]+2*y[x]^2-x^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -x \cosh (c_1-i \log (x)) \\ y(x)\to -x \cosh (i \log (x)+c_1) \\ \end{align*}
Sympy. Time used: 179.996 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x)**2 - x**2 - 2*x*y(x)*Derivative(y(x), x) + 2*y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x \sin {\left (C_{1} - \log {\left (x \right )} \right )}, \ y{\left (x \right )} = - x \sin {\left (C_{1} - \log {\left (x \right )} \right )}\right ] \]