6.5.35 problem 32

Internal problem ID [1659]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 32
Date solved : Tuesday, September 30, 2025 at 04:42:11 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {y}{y-2 x} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 305
ode:=diff(y(x),x) = y(x)/(y(x)-2*x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\left (-12 c_1 +8 x^{3}+4 \sqrt {3}\, \sqrt {c_1 \left (-4 x^{3}+3 c_1 \right )}\right )^{{1}/{3}}}{2}+\frac {2 x^{2}}{\left (-12 c_1 +8 x^{3}+4 \sqrt {3}\, \sqrt {c_1 \left (-4 x^{3}+3 c_1 \right )}\right )^{{1}/{3}}}+x \\ y &= \frac {i \left (-\left (-12 c_1 +8 x^{3}+4 \sqrt {3}\, \sqrt {-4 c_1 \,x^{3}+3 c_1^{2}}\right )^{{2}/{3}}+4 x^{2}\right ) \sqrt {3}-{\left (\left (-12 c_1 +8 x^{3}+4 \sqrt {3}\, \sqrt {-4 c_1 \,x^{3}+3 c_1^{2}}\right )^{{1}/{3}}-2 x \right )}^{2}}{4 \left (-12 c_1 +8 x^{3}+4 \sqrt {3}\, \sqrt {-4 c_1 \,x^{3}+3 c_1^{2}}\right )^{{1}/{3}}} \\ y &= \frac {i \left (\left (-12 c_1 +8 x^{3}+4 \sqrt {3}\, \sqrt {-4 c_1 \,x^{3}+3 c_1^{2}}\right )^{{2}/{3}}-4 x^{2}\right ) \sqrt {3}-{\left (\left (-12 c_1 +8 x^{3}+4 \sqrt {3}\, \sqrt {-4 c_1 \,x^{3}+3 c_1^{2}}\right )^{{1}/{3}}-2 x \right )}^{2}}{4 \left (-12 c_1 +8 x^{3}+4 \sqrt {3}\, \sqrt {-4 c_1 \,x^{3}+3 c_1^{2}}\right )^{{1}/{3}}} \\ \end{align*}
Mathematica. Time used: 21.491 (sec). Leaf size: 479
ode=D[y[x],x]==y[x]/(y[x]-2*x); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\sqrt [3]{2 x^3+\sqrt {e^{6 c_1}-4 e^{3 c_1} x^3}-e^{3 c_1}}}{\sqrt [3]{2}}+\frac {\sqrt [3]{2} x^2}{\sqrt [3]{2 x^3+\sqrt {e^{6 c_1}-4 e^{3 c_1} x^3}-e^{3 c_1}}}+x\\ y(x)&\to \frac {i \left (\sqrt {3}+i\right ) \sqrt [3]{2 x^3+\sqrt {e^{6 c_1}-4 e^{3 c_1} x^3}-e^{3 c_1}}}{2 \sqrt [3]{2}}-\frac {\left (1+i \sqrt {3}\right ) x^2}{2^{2/3} \sqrt [3]{2 x^3+\sqrt {e^{6 c_1}-4 e^{3 c_1} x^3}-e^{3 c_1}}}+x\\ y(x)&\to -\frac {\left (1+i \sqrt {3}\right ) \sqrt [3]{2 x^3+\sqrt {e^{6 c_1}-4 e^{3 c_1} x^3}-e^{3 c_1}}}{2 \sqrt [3]{2}}+\frac {i \left (\sqrt {3}+i\right ) x^2}{2^{2/3} \sqrt [3]{2 x^3+\sqrt {e^{6 c_1}-4 e^{3 c_1} x^3}-e^{3 c_1}}}+x\\ y(x)&\to 0\\ y(x)&\to -\frac {i \left (\sqrt [3]{x^3}-x\right ) \left (\left (\sqrt {3}-i\right ) \sqrt [3]{x^3}-2 i x\right )}{2 x}\\ y(x)&\to \frac {i \left (\sqrt [3]{x^3}-x\right ) \left (\left (\sqrt {3}+i\right ) \sqrt [3]{x^3}+2 i x\right )}{2 x}\\ y(x)&\to \sqrt [3]{x^3}+\frac {\left (x^3\right )^{2/3}}{x}+x \end{align*}
Sympy. Time used: 21.714 (sec). Leaf size: 298
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - y(x)/(-2*x + y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {\sqrt [3]{2} x^{2}}{\sqrt [3]{C_{1} - 2 x^{3} + \sqrt {C_{1} \left (C_{1} - 4 x^{3}\right )}}} + x - \frac {2^{\frac {2}{3}} \sqrt [3]{C_{1} - 2 x^{3} + \sqrt {C_{1} \left (C_{1} - 4 x^{3}\right )}}}{2}, \ y{\left (x \right )} = \frac {\frac {2 \sqrt [3]{2} x^{2}}{\sqrt [3]{C_{1} - 2 x^{3} + \sqrt {C_{1} \left (C_{1} - 4 x^{3}\right )}}} + x - \sqrt {3} i x - \frac {2^{\frac {2}{3}} \sqrt [3]{C_{1} - 2 x^{3} + \sqrt {C_{1} \left (C_{1} - 4 x^{3}\right )}}}{2} - \frac {2^{\frac {2}{3}} \sqrt {3} i \sqrt [3]{C_{1} - 2 x^{3} + \sqrt {C_{1} \left (C_{1} - 4 x^{3}\right )}}}{2}}{1 - \sqrt {3} i}, \ y{\left (x \right )} = \frac {\frac {2 \sqrt [3]{2} x^{2}}{\sqrt [3]{C_{1} - 2 x^{3} + \sqrt {C_{1} \left (C_{1} - 4 x^{3}\right )}}} + x + \sqrt {3} i x - \frac {2^{\frac {2}{3}} \sqrt [3]{C_{1} - 2 x^{3} + \sqrt {C_{1} \left (C_{1} - 4 x^{3}\right )}}}{2} + \frac {2^{\frac {2}{3}} \sqrt {3} i \sqrt [3]{C_{1} - 2 x^{3} + \sqrt {C_{1} \left (C_{1} - 4 x^{3}\right )}}}{2}}{1 + \sqrt {3} i}\right ] \]