4.12.12 \(a x y(x) y'(x)+x^2-y(x)^2=0\)

ODE
\[ a x y(x) y'(x)+x^2-y(x)^2=0 \] ODE Classification

[[_homogeneous, `class A`], _rational, _Bernoulli]

Book solution method
Homogeneous equation

Mathematica
cpu = 0.011585 (sec), leaf count = 72

\[\left \{\left \{y(x)\to -\frac {\sqrt {(a-1) c_1 x^{2/a}-x^2}}{\sqrt {a-1}}\right \},\left \{y(x)\to \frac {\sqrt {(a-1) c_1 x^{2/a}-x^2}}{\sqrt {a-1}}\right \}\right \}\]

Maple
cpu = 0.008 (sec), leaf count = 27

\[ \left \{ {\frac {{x}^{2}}{a-1}}-{x}^{2\,{a}^{-1}}{\it \_C1}+ \left ( y \left ( x \right ) \right ) ^{2}=0 \right \} \] Mathematica raw input

DSolve[x^2 - y[x]^2 + a*x*y[x]*y'[x] == 0,y[x],x]

Mathematica raw output

{{y[x] -> -(Sqrt[-x^2 + (-1 + a)*x^(2/a)*C[1]]/Sqrt[-1 + a])}, {y[x] -> Sqrt[-x^
2 + (-1 + a)*x^(2/a)*C[1]]/Sqrt[-1 + a]}}

Maple raw input

dsolve(a*x*y(x)*diff(y(x),x)+x^2-y(x)^2 = 0, y(x),'implicit')

Maple raw output

x^2/(a-1)-x^(2/a)*_C1+y(x)^2 = 0