29.23.5 problem 635

Internal problem ID [5227]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 23
Problem number : 635
Date solved : Tuesday, March 04, 2025 at 08:35:14 PM
CAS classification : [[_homogeneous, `class A`], _rational, _dAlembert]

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

Maple. Time used: 0.043 (sec). Leaf size: 59
ode:=(a*x^2+2*x*y(x)-a*y(x)^2)*diff(y(x),x)+x^2-2*a*x*y(x)-y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= \frac {a -\sqrt {-4 c_{1}^{2} x^{2}+a^{2}-4 c_{1} x}}{2 c_{1}} \\ y \left (x \right ) &= \frac {a +\sqrt {-4 c_{1}^{2} x^{2}+a^{2}-4 c_{1} x}}{2 c_{1}} \\ \end{align*}
Mathematica. Time used: 4.739 (sec). Leaf size: 87
ode=(a x^2+2 x y[x]-a y[x]^2)D[y[x],x]+x^2-2 a x y[x]-y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \left (a \left (-e^{c_1}\right )-\sqrt {a^2 e^{2 c_1}+4 x \left (-x+e^{c_1}\right )}\right ) \\ y(x)\to \frac {1}{2} \left (\sqrt {a^2 e^{2 c_1}+4 x \left (-x+e^{c_1}\right )}-a e^{c_1}\right ) \\ \end{align*}
Sympy. Time used: 3.016 (sec). Leaf size: 70
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-2*a*x*y(x) + x**2 + (a*x**2 - a*y(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 )} = - \frac {a e^{C_{1}}}{2} - \frac {\sqrt {a^{2} e^{2 C_{1}} - 4 x^{2} + 4 x e^{C_{1}}}}{2}, \ y{\left (x \right )} = - \frac {a e^{C_{1}}}{2} + \frac {\sqrt {a^{2} e^{2 C_{1}} - 4 x^{2} + 4 x e^{C_{1}}}}{2}\right ] \]