82.12.8 problem Ex. 8

Internal problem ID [18694]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Examples on chapter II at page 29
Problem number : Ex. 8
Date solved : Thursday, March 13, 2025 at 12:38:53 PM
CAS classification : [[_homogeneous, `class C`], _exact, _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.792 (sec). Leaf size: 33
ode:=2*x-y(x)+1+(2*y(x)-x-1)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {-\sqrt {4-27 \left (x +\frac {1}{3}\right )^{2} c_{1}^{2}}+\left (3 x +3\right ) c_{1}}{6 c_{1}} \]
Mathematica. Time used: 0.122 (sec). Leaf size: 67
ode=(2*x-y[x]+1)+(2*y[x]-x-1)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{2} \left (-i \sqrt {3 x^2+2 x-1-4 c_1}+x+1\right ) \\ y(x)\to \frac {1}{2} \left (i \sqrt {3 x^2+2 x-1-4 c_1}+x+1\right ) \\ \end{align*}
Sympy. Time used: 2.475 (sec). Leaf size: 48
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (-x + 2*y(x) - 1)*Derivative(y(x), x) - y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x}{2} - \frac {\sqrt {C_{1} - 27 x^{2} - 18 x}}{6} + \frac {1}{2}, \ y{\left (x \right )} = \frac {x}{2} + \frac {\sqrt {C_{1} - 27 x^{2} - 18 x}}{6} + \frac {1}{2}\right ] \]