64.6.14 problem 14

Internal problem ID [13285]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, Miscellaneous Review. Exercises page 60
Problem number : 14
Date solved : Wednesday, March 05, 2025 at 09:33:41 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class B`]]

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

Maple. Time used: 0.048 (sec). Leaf size: 57
ode:=diff(y(x),x) = (2*x^2+y(x)^2)/(2*x*y(x)-x^2); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {c_{1} x -\sqrt {9 c_{1}^{2} x^{2}+4 c_{1} x}}{2 c_{1}} \\ y &= \frac {c_{1} x +\sqrt {9 c_{1}^{2} x^{2}+4 c_{1} x}}{2 c_{1}} \\ \end{align*}
Mathematica. Time used: 2.759 (sec). Leaf size: 93
ode=D[y[x],x]==(2*x^2+y[x]^2)/(2*x*y[x]-x^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \left (x-\sqrt {x \left (9 x-4 e^{c_1}\right )}\right ) \\ y(x)\to \frac {1}{2} \left (x+\sqrt {x \left (9 x-4 e^{c_1}\right )}\right ) \\ y(x)\to \frac {1}{2} \left (x-3 \sqrt {x^2}\right ) \\ y(x)\to \frac {1}{2} \left (3 \sqrt {x^2}+x\right ) \\ \end{align*}
Sympy. Time used: 1.329 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (2*x**2 + y(x)**2)/(-x**2 + 2*x*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x \left (1 - \sqrt {\frac {C_{1}}{x} + 9}\right )}{2}, \ y{\left (x \right )} = \frac {x \left (\sqrt {\frac {C_{1}}{x} + 9} + 1\right )}{2}\right ] \]