53.1.12 problem 12

Internal problem ID [8446]
Book : Elementary differential equations. By Earl D. Rainville, Phillip E. Bedient. Macmilliam Publishing Co. NY. 6th edition. 1981.
Section : CHAPTER 16. Nonlinear equations. Section 94. Factoring the left member. EXERCISES Page 309
Problem number : 12
Date solved : Wednesday, March 05, 2025 at 05:48:02 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.030 (sec). Leaf size: 55
ode:=(4*x-y(x))*diff(y(x),x)^2+6*(x-y(x))*diff(y(x),x)+2*x-5*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -x +c_{1} \\ y &= \frac {-4 c_{1} x +\sqrt {-12 c_{1} x +1}+1}{2 c_{1}} \\ y &= \frac {-4 c_{1} x -\sqrt {-12 c_{1} x +1}+1}{2 c_{1}} \\ \end{align*}
Mathematica. Time used: 1.35 (sec). Leaf size: 90
ode=(4*x-y[x])*(D[y[x],x])^2+6*(x-y[x])*D[y[x],x]+2*x-5*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \left (-4 x-e^{\frac {c_1}{2}} \sqrt {12 x+e^{c_1}}-e^{c_1}\right ) \\ y(x)\to \frac {1}{2} \left (-4 x+e^{\frac {c_1}{2}} \sqrt {12 x+e^{c_1}}-e^{c_1}\right ) \\ y(x)\to -x+c_1 \\ \end{align*}
Sympy. Time used: 2.696 (sec). Leaf size: 48
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (4*x - y(x))*Derivative(y(x), x)**2 + (6*x - 6*y(x))*Derivative(y(x), x) - 5*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = C_{1} - x, \ y{\left (x \right )} = - 2 C_{1} - 2 x - 2 \sqrt {C_{1} \left (C_{1} + 3 x\right )}, \ y{\left (x \right )} = - 2 C_{1} - 2 x + 2 \sqrt {C_{1} \left (C_{1} + 3 x\right )}\right ] \]