23.1.333 problem 319

Internal problem ID [4940]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 319
Date solved : Tuesday, September 30, 2025 at 09:03:29 AM
CAS classification : [_linear]

\begin{align*} x \left (1-x \right ) y^{\prime }+2-3 x y+y&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=x*(1-x)*diff(y(x),x)+2-3*x*y(x)+y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{2}+c_1 -2 x}{\left (-1+x \right )^{2} x} \]
Mathematica. Time used: 0.089 (sec). Leaf size: 83
ode=x*(1-x)*D[y[x],x]+(2-3*x*y[x]+y[x])==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \exp \left (\int _1^x\frac {1-3 K[1]}{(K[1]-1) K[1]}dK[1]\right ) \left (\int _1^x\frac {2 \exp \left (-\int _1^{K[2]}\frac {1-3 K[1]}{(K[1]-1) K[1]}dK[1]\right )}{(K[2]-1) K[2]}dK[2]+c_1\right ) \end{align*}
Sympy. Time used: 0.215 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*(1 - x)*Derivative(y(x), x) - 3*x*y(x) + y(x) + 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\frac {C_{1}}{x} + x - 2}{x^{2} - 2 x + 1} \]